ImageEditor.st
author Claus Gittinger <cg@exept.de>
Sat, 11 Nov 2017 17:30:01 +0100
changeset 3500 51cbdcf5b2cb
parent 3497 632e25674f39
child 3505 a7aec486480c
permissions -rw-r--r--
#BUGFIX by cg class: Tools::ViewTreeInspectorApplication changed: #processButtonReleaseEvent: care widgets being no longer present
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
3180
9ee8f0e74b96 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3173
diff changeset
    14
"{ NameSpace: Smalltalk }"
9ee8f0e74b96 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3173
diff changeset
    15
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    16
ResourceSpecEditor subclass:#ImageEditor
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
    17
	instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
    18
		selectedColorIndex postOpenAction imageSeqNr drawingColormap
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
    19
		lastShiftUsedWrap lastGrabbedScreenArea
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
    20
		allowedToChangeImageDimensionAndDepth savedImage savedFile'
3416
9d51a45479e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3415
diff changeset
    21
	classVariableNames:'DefaultRelativeSizes LastColormapMode LastDirectory
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
    22
		LastSizeString LastURL MaskClipboard LastDepth
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
    23
		LastNumThresholdGrayColors'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
    24
	poolDictionaries:''
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
    25
	category:'Interface-UIPainter'
400
228524287573 intitial checkin
tz
parents:
diff changeset
    26
!
228524287573 intitial checkin
tz
parents:
diff changeset
    27
228524287573 intitial checkin
tz
parents:
diff changeset
    28
!ImageEditor class methodsFor:'documentation'!
228524287573 intitial checkin
tz
parents:
diff changeset
    29
228524287573 intitial checkin
tz
parents:
diff changeset
    30
copyright
228524287573 intitial checkin
tz
parents:
diff changeset
    31
"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    32
 COPYRIGHT (c) 1997-1998 by eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
    33
              All Rights Reserved
228524287573 intitial checkin
tz
parents:
diff changeset
    34
228524287573 intitial checkin
tz
parents:
diff changeset
    35
 This software is furnished under a license and may be used
228524287573 intitial checkin
tz
parents:
diff changeset
    36
 only in accordance with the terms of that license and with the
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
    37
 inclusion of the above copyright notice. This software may not
400
228524287573 intitial checkin
tz
parents:
diff changeset
    38
 be provided or otherwise made available to, or used by, any
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
    39
 other person. No title to or ownership of the software is
400
228524287573 intitial checkin
tz
parents:
diff changeset
    40
 hereby transferred.
228524287573 intitial checkin
tz
parents:
diff changeset
    41
"
228524287573 intitial checkin
tz
parents:
diff changeset
    42
!
228524287573 intitial checkin
tz
parents:
diff changeset
    43
228524287573 intitial checkin
tz
parents:
diff changeset
    44
documentation
228524287573 intitial checkin
tz
parents:
diff changeset
    45
"
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
    46
    Image Editor allows you to create, design, modify or just inspect images.
3375
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
    47
    It is also used subclasses as a tool to post-process captured screen images and
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
    48
    bitmaps in expecco.
400
228524287573 intitial checkin
tz
parents:
diff changeset
    49
228524287573 intitial checkin
tz
parents:
diff changeset
    50
    [start with:]
228524287573 intitial checkin
tz
parents:
diff changeset
    51
        ImageEditor open
941
6d75430a8120 fixed start call in docu
tz
parents: 937
diff changeset
    52
        ImageEditor openOnClass:Icon andSelector:#startIcon
3466
2d5ea09863c6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3465
diff changeset
    53
        (Image fromFile:'../../goodies/bitmaps/gifImages/garfield.gif') edit
2d5ea09863c6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3465
diff changeset
    54
        (Image fromScreen:(0@0 corner:100@100)) edit
400
228524287573 intitial checkin
tz
parents:
diff changeset
    55
228524287573 intitial checkin
tz
parents:
diff changeset
    56
    [see also:]
228524287573 intitial checkin
tz
parents:
diff changeset
    57
        ImageEditView Image
228524287573 intitial checkin
tz
parents:
diff changeset
    58
228524287573 intitial checkin
tz
parents:
diff changeset
    59
    [author:]
544
8fa6ee20c3cd help menu item aligned to the right
tz
parents: 535
diff changeset
    60
        Thomas Zwick, eXept Software AG
1806
2d642633ff7b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1799
diff changeset
    61
        Claus Gittinger, eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
    62
"
228524287573 intitial checkin
tz
parents:
diff changeset
    63
! !
228524287573 intitial checkin
tz
parents:
diff changeset
    64
228524287573 intitial checkin
tz
parents:
diff changeset
    65
!ImageEditor class methodsFor:'instance creation'!
228524287573 intitial checkin
tz
parents:
diff changeset
    66
3357
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
    67
openLoadingImageWith:aBlock modal:modalBoolean
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
    68
    "opens an Image Editor on anImage.
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
    69
     Returns the editor (to access its attributes)"
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
    |editor|
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    72
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    73
    editor := self new.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    74
    editor allButOpen.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    75
    aBlock value:editor.
3357
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
    76
    modalBoolean ifTrue:[
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
    77
        editor openWindowModal.
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
    78
    ] ifFalse:[
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
    79
        editor openWindow.
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
    80
    ].
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
    81
    ^ editor
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
    82
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
    83
    "Modified (comment): / 07-03-2017 / 16:36:16 / cg"
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    84
!
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    85
400
228524287573 intitial checkin
tz
parents:
diff changeset
    86
openModalOnClass: aClass andSelector: aSelector
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    87
    "opens a modal Image Editor on aClass and aSelector.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    88
     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
    89
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    90
    |imageEditor imageEditView className resourceClass resourceSelector| 
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    91
400
228524287573 intitial checkin
tz
parents:
diff changeset
    92
    imageEditor := self new.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    93
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    94
    aClass isClass  ifTrue: [className := aClass name].
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
    95
    aClass isString ifTrue: [className := aClass].      
903
63203d996e61 openModal bug fixed
tz
parents: 901
diff changeset
    96
    aClass isNil    ifTrue: [className := ''].      
400
228524287573 intitial checkin
tz
parents:
diff changeset
    97
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
    98
    imageEditor postOpenAction: [
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
    99
            imageEditView := imageEditor imageEditView. 
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   100
            imageEditor loadFromOrPrepareForClass: aClass andSelector: aSelector
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   101
        ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
   102
    imageEditor openModal.
228524287573 intitial checkin
tz
parents:
diff changeset
   103
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   104
    resourceClass := imageEditView resourceClass.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   105
    resourceSelector := imageEditView resourceSelector.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   106
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   107
    (resourceClass isNil or:[resourceSelector isNil]) ifTrue:[^ nil].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   108
    ^ Array with:resourceClass with:resourceSelector
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   109
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   110
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   111
     self openModalOnClass: self andSelector: #leftMouseKeyIcon
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   112
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
   113
!
228524287573 intitial checkin
tz
parents:
diff changeset
   114
3357
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
   115
openModalOnFile:aFileName
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   116
    "opens an Image Editor on aFileName.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   117
     Returns the editor (to access its attributes)"
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   118
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   119
    ^ self openOnFile:aFileName modal:true
3357
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
   120
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
   121
    "
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
   122
     self openModalOnFile: '../../goodies/bitmaps/gifImages/back.gif'
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
   123
    "
3411
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
   124
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   125
    "Modified: / 07-03-2017 / 16:36:32 / cg"
3357
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
   126
!
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
   127
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   128
openModalOnImage:anImage
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   129
    "opens a modal Image Editor on an image.
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   130
     Returns the modified image or nil if unsaved/unchanged"
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   131
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   132
    |imageEditor imageEditView newImage| 
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   133
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   134
    imageEditor := self new.
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
   135
    imageEditor allowedToChangeImageDimensionAndDepth:false.
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   136
    imageEditor postOpenAction: [
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   137
            imageEditView := imageEditor imageEditView. 
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   138
            imageEditor loadFromImage: anImage
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   139
        ].
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   140
    imageEditor openModal.
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   141
2766
88fa6c4bf6d3 changed: #openModalOnImage:
Claus Gittinger <cg@exept.de>
parents: 2765
diff changeset
   142
    newImage := imageEditor savedImage.
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   143
    ^ newImage
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   144
!
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   145
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   146
openOnClass:aClass andSelector:aSelector
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   147
    "opens an Image Editor on aClass and aSelector.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   148
     Returns the editor (to access its attributes)"
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   149
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   150
    ^ self openOnClass:aClass andSelector:aSelector modal:false
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   151
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   152
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   153
     self openOnClass:self andSelector:#leftMouseKeyIcon
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   154
     self openOnClass:self andSelector:nil
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
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   157
    "Modified: / 07-03-2017 / 16:36:58 / cg"
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   158
!
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   159
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   160
openOnClass:aClass andSelector:aSelector modal:modal
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   161
    "opens an Image Editor on aClass and aSelector.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   162
     Returns the editor (to access its attributes)"
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   163
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   164
    ^ self 
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   165
        openLoadingImageWith:[:editor | 
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   166
            editor loadFromClass:(aClass theNonMetaclass) andSelector:aSelector
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   167
        ] 
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   168
        modal:modal.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   169
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   170
    "
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   171
     self openOnClass:self andSelector:#leftMouseKeyIcon modal:true
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   172
     self openOnClass:self andSelector:nil
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   173
    "
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   174
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   175
    "Created: / 07-03-2017 / 16:34:36 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   176
!
228524287573 intitial checkin
tz
parents:
diff changeset
   177
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   178
openOnFile:aFileName
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   179
    "opens an Image Editor on aFileName.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   180
     Returns the editor (to access its attributes)"
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   181
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   182
    ^ self openOnFile:aFileName modal:false   
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   183
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   184
    "
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   185
     self openOnFile: '../../goodies/bitmaps/gifImages/back.gif'
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   186
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   187
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   188
    "Modified: / 07-03-2017 / 16:37:33 / cg"
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   189
!
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   190
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   191
openOnFile:aFileName modal:modal
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   192
    "opens an Image Editor on aFileName.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   193
     Returns the editor (to access its attributes)"
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   194
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   195
    ^ self 
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   196
        openLoadingImageWith:[:editor | 
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   197
            editor loadFromFile:aFileName.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   198
        ] 
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   199
        modal:modal.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   200
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   201
    "
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   202
     self openOnFile: '../../goodies/bitmaps/gifImages/back.gif' modal:false
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   203
     self openOnFile: '../../goodies/bitmaps/gifImages/back.gif' modal:true
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   204
    "
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   205
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   206
    "Created: / 07-03-2017 / 16:33:12 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   207
!
228524287573 intitial checkin
tz
parents:
diff changeset
   208
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   209
openOnImage:anImage
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   210
    "opens an Image Editor on anImage.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   211
     Returns the editor (to access its attributes)"
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   212
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   213
    ^ self 
3375
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
   214
        openLoadingImageWith:[:editor | editor loadFromImage: anImage ] 
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
   215
        modal:false
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   216
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   217
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   218
     self openOnImage: Icon startIcon
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   219
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   220
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   221
    "Modified: / 07-03-2017 / 16:37:57 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   222
! !
228524287573 intitial checkin
tz
parents:
diff changeset
   223
228524287573 intitial checkin
tz
parents:
diff changeset
   224
!ImageEditor class methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
   225
228524287573 intitial checkin
tz
parents:
diff changeset
   226
listOfColorMaps
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   227
    "returns the list of default color maps for a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   228
228524287573 intitial checkin
tz
parents:
diff changeset
   229
    |colorMap|
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   230
400
228524287573 intitial checkin
tz
parents:
diff changeset
   231
    (colorMap := OrderedCollection new)
228524287573 intitial checkin
tz
parents:
diff changeset
   232
        add: Color black;
228524287573 intitial checkin
tz
parents:
diff changeset
   233
        add: Color white;
228524287573 intitial checkin
tz
parents:
diff changeset
   234
        add: Color red;
228524287573 intitial checkin
tz
parents:
diff changeset
   235
        add: Color green;
228524287573 intitial checkin
tz
parents:
diff changeset
   236
        add: Color blue;
228524287573 intitial checkin
tz
parents:
diff changeset
   237
        add: Color cyan;
228524287573 intitial checkin
tz
parents:
diff changeset
   238
        add: Color yellow;
228524287573 intitial checkin
tz
parents:
diff changeset
   239
        add: Color magenta;
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   240
        add: (Color redByte: 127 greenByte:   0 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   241
        add: (Color redByte:   0 greenByte: 127 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   242
        add: (Color redByte:   0 greenByte:   0 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   243
        add: (Color redByte:   0 greenByte: 127 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   244
        add: (Color redByte: 127 greenByte: 127 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   245
        add: (Color redByte: 127 greenByte:   0 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   246
        add: (Color redByte: 127 greenByte: 127 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   247
        add: (Color redByte: 170 greenByte: 170 blueByte: 170).
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   248
3346
15a3fc3d13d9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   249
    0 to: 5 do: [:r|                                                    
15a3fc3d13d9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   250
        0 to: 5 do: [:g|
15a3fc3d13d9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   251
            0 to: 5 do: [:b|
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   252
                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
   253
            ]
228524287573 intitial checkin
tz
parents:
diff changeset
   254
        ]
228524287573 intitial checkin
tz
parents:
diff changeset
   255
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   256
3346
15a3fc3d13d9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   257
    1 to: 25 do: [:g|                             
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   258
        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
   259
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   260
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   261
    ^ Dictionary new
2571
8b182cc4cac7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2567
diff changeset
   262
        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
   263
        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
   264
        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
   265
        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
   266
        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
   267
        at: #depth8  put: colorMap;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   268
        at: #masked8 put: colorMap;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   269
        at: #depth4  put: (colorMap copyFrom: 1 to: 16);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   270
        at: #masked4 put: (colorMap copyFrom: 1 to: 16);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   271
        at: #depth2  put: (colorMap copyFrom: 1 to: 4);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   272
        at: #masked2 put: (colorMap copyFrom: 1 to: 4);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   273
        at: #depth1  put: (colorMap copyFrom: 1 to: 2);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   274
        at: #masked1 put: (colorMap copyFrom: 1 to: 2);
400
228524287573 intitial checkin
tz
parents:
diff changeset
   275
        yourself
228524287573 intitial checkin
tz
parents:
diff changeset
   276
!
228524287573 intitial checkin
tz
parents:
diff changeset
   277
228524287573 intitial checkin
tz
parents:
diff changeset
   278
listOfDefaultSizes
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   279
    "returns the list of default sizes for a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   280
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
   281
    ^ #('8x8' '16x16' '22x22' '32x32' '48x48' '64x64')
932
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   282
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   283
    "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
   284
!
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   285
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   286
namesOfColorMaps
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   287
    ^ Dictionary new
2571
8b182cc4cac7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2567
diff changeset
   288
        at: #depth32 put: '32-plane (rgba)';
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   289
        at: #depth24 put: '24-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   290
        at: #masked24 put: '24-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   291
        at: #depth16 put: '16-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   292
        at: #masked16 put: '16-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   293
        at: #depth8  put: ' 8-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   294
        at: #masked8 put: ' 8-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   295
        at: #depth4  put: ' 4-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   296
        at: #masked4 put: ' 4-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   297
        at: #depth2  put: ' 2-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   298
        at: #masked2 put: ' 2-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   299
        at: #depth1  put: ' 1-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   300
        at: #masked1 put: ' 1-plane + mask' ;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   301
        yourself
400
228524287573 intitial checkin
tz
parents:
diff changeset
   302
! !
228524287573 intitial checkin
tz
parents:
diff changeset
   303
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   304
!ImageEditor class methodsFor:'help specs'!
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   305
1545
4f8b08f745eb flyByHelp stuff
Claus Gittinger <cg@exept.de>
parents: 1544
diff changeset
   306
flyByHelpSpec
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   307
    <resource: #programHelp>
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   308
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   309
    ^super flyByHelpSpec addPairsFrom:(self helpPairs)
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   310
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   311
    "Modified: / 16-02-2017 / 12:30:55 / cg"
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   312
!
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   313
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   314
helpPairs
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   315
    "This resource specification was automatically generated
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   316
     by the UIHelpTool of ST/X."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   317
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   318
    "Do not manually edit this!! If it is corrupted,
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   319
     the UIHelpTool may not be able to read the specification."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   320
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   321
    "
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   322
     UIHelpTool openOnClass:ImageEditor
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   323
    "
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   324
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   325
    <resource: #help>
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   326
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   327
    ^ #(
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   328
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
   329
#drawingColor1
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
   330
'The color associated to the left mouse button.\Also the color used in fill operations'
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
   331
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
   332
#drawingColor2
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
   333
'The color associated to the right mouse button.\Also the second color used in gradient fill operations'
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
   334
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
   335
#drawingAlpha
3488
e9655ba452c7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3487
diff changeset
   336
'The alpha value (in percent) to be used in edit operations.\If the "mask"-color is selected, only the alpha value will be changed.\Otherwise, the selected color plus this alpha value will be used for drawing'
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
   337
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   338
#autoCropAll
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   339
'Find and remove all borders'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   340
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   341
#autoCropBottom
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   342
'Find and remove bottom border'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   343
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   344
#autoCropLeft
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   345
'Find and remove left border'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   346
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   347
#autoCropRight
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   348
'Find and remove right border'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   349
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   350
#autoCropTop
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   351
'Find and remove top border'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   352
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   353
#colorMap
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   354
'ColorMap functions'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   355
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   356
#colorMap1
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   357
'Convert to depth-1 image'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   358
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   359
#colorMap1M
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   360
'Convert to depth-1 image plus mask'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   361
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   362
#colorMap2
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   363
'Convert to depth-2 image'
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   364
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   365
#colorMap24
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   366
'Convert to depth-24 image (rgb)'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   367
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   368
#colorMap2M
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   369
'Convert to depth-2 image plus mask'
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   370
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   371
#colorMap32
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   372
'Convert to depth-32 image (rgba)'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   373
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   374
#colorMap4
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   375
'Convert to depth-4 image'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   376
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   377
#colorMap4M
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   378
'Convert to depth-4 image plus mask'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   379
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   380
#colorMap8
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   381
'Convert to depth-8 image'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   382
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   383
#colorMap8M
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   384
'Convert to depth-8 image plus mask'
2571
8b182cc4cac7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2567
diff changeset
   385
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   386
#colorMapTable
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   387
'Shows a list of used colors of the image'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   388
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   389
#compressColormap
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   390
'Remove unneeded entries from the colorMap'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   391
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   392
#cropAll
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   393
'Crop (cut off) all four sides by the amounts entered into the above fields.'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   394
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   395
#cropBottom
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   396
'Cut off the specified number of pixels at the bottom'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   397
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   398
#cropBySelectingArea
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   399
'Select new area in the right detail view.'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   400
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   401
#cropLeft
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   402
'Cut off the specified number of pixels at the left'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   403
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   404
#cropManual
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   405
'Specify border(s) to remove.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   406
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   407
#cropRight
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   408
'Cut off the specified number of pixels at the right'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   409
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   410
#cropTop
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   411
'Cut off the specified number of pixels at the top'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   412
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   413
#cropubImage
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   414
'Select a subarea as the image''s new dimension'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   415
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   416
#drawModeBox
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   417
'Rectangle Drawing Mode'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   418
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
   419
#drawModeCircle
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   420
'Circle Drawing Mode'
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
   421
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   422
#drawModeCopy
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   423
'Area Copy Mode'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   424
3423
1b9fb486b83c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3422
diff changeset
   425
#drawModeCropSubImage
1b9fb486b83c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3422
diff changeset
   426
'Select and extract a subimage'
1b9fb486b83c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3422
diff changeset
   427
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   428
#drawModeFill
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   429
'Flood Fill Mode'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   430
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   431
#drawModeFilledBox
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   432
'Filled Rectangle Drawing Mode'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   433
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   434
#drawModeFilledCircle
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   435
'Filled Circle Drawing Mode'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   436
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   437
#drawModeMaskOutsideCircle
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   438
'Mask everything outside a Circle'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   439
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   440
#drawModeMaskOutsideRectangle
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   441
'Mask everything outside a Rectangle'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   442
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   443
#drawModePaste
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   444
'Paste Mode'
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   445
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   446
#drawModePasteUnder
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   447
'Paste-Under Mode'
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   448
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   449
#drawModePasteWithMask
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   450
'Paste-with-Mask Mode'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   451
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   452
#drawModePoint
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   453
'Point Drawing Mode'
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
   454
1639
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   455
#drawModeSpecial
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   456
'Special operations (select rectangle, then choose operation)'
1639
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   457
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   458
#drawModeSpray
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   459
'Spray Drawing Mode'
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   460
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   461
#edit3DProjection
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   462
'Generate a 3D projection'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   463
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   464
#editFlipHorizontal
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   465
'Flip the image horizontally'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   466
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   467
#editFlipVertical
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   468
'Flip the image vertically'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   469
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   470
#editMagnifyImage
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   471
'Magnify the image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   472
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   473
#editNegate
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   474
'Invert the images colors'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   475
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   476
#editResize
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   477
'Resize the image (preserving the old image)'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   478
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   479
#editRotate
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   480
'Rotate the image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   481
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   482
#fileEditMask
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   483
'Load Mask from a File'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   484
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
   485
#fileGrabImageFromScreen
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   486
'Pick an image from the screen (specify area)'
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
   487
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
   488
#fileGrabImageFromWindow
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   489
'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
   490
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   491
#fileLoadFromClass
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   492
'Select and load an image from a resource method'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   493
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   494
#fileLoadFromFile
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   495
'Select and load an image from a file'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   496
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
   497
#fileLoadFromURL
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
   498
'Load an image from the net, given its URL'
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
   499
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   500
#fileNewImage
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   501
'Create a new image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   502
3200
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   503
#fileNewImageFromClipboard
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   504
'Create a new image and initialize it from the clipboard'
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   505
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   506
#fileNewMaskFromClipboard
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   507
'Paste the image in the clipboard as a mask. Must be a depth-1 image'
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   508
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   509
#filePrint
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   510
'Print the image on a postscript printer'
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   511
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   512
#filePrint
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   513
'Print'
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   514
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   515
#fileSave
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   516
'Save the image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   517
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   518
#fileSaveAs
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   519
'Save the image to a file'
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   520
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   521
#fileSaveButtonImageAs
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   522
'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
   523
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   524
#fileSaveMaskAs
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   525
'Save the mask of the image to a file'
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
   526
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   527
#fileSaveMethod
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   528
'Save the image as resource method in the current class and selector'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   529
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   530
#fileSaveMethodAs
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   531
'Save the image as resource method in a class'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   532
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   533
#floodFillMaxError
3433
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
   534
'Specify the max. allowed deviation from the clicked pixel in a flood-fill operation.\Pixels where the hue/light values differ less than that fraction\will be included in the fill.\The range must be between 0 and 1. With 0, only areas with exactly the same pixel will be filled.\With 1, every other pixel is included.\\When filling gradiented areas, start with small values, such as 0.05, and increase slowly (undo and try with higher value).\This is especially useful when masking background areas from screenshots.'
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   535
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   536
#magnificationNumber
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   537
'Shows the current magnification'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   538
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   539
#magnifyImageDown
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   540
'Decrease magnification'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   541
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   542
#magnifyImageUp
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   543
'Increase magnification'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   544
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   545
#mouseKeyColorMode
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   546
'Toggle between left and right mouse button color'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   547
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   548
#nextImageInSequence
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   549
'Go to the next image in the animated gif image sequence.'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   550
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   551
#previewView
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   552
'Shows a preview of the image'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   553
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   554
#previousImageInSequence
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   555
'Go to the previous image in the animated gif image sequence.'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   556
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   557
#settingsGridMagnification
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   558
'Change the grid magnification of the edit view'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   559
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   560
#xdrawModeBox
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   561
'Rectangle'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   562
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   563
#xdrawModeCopy
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   564
'Copy'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   565
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   566
#xdrawModeFill
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   567
'Flood-fill'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   568
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   569
#xdrawModeFilledBox
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   570
'Filled rectangle'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   571
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   572
#xdrawModePaste
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   573
'Paste'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   574
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   575
#xdrawModePasteUnder
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   576
'Paste under'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   577
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   578
#xdrawModePasteWithMask
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   579
'Paste with Mask'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   580
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   581
#xdrawModePoint
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   582
'Point'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   583
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   584
#xfileGrabImage
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   585
'Pick from screen'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   586
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   587
#xfileLoadFromClass
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   588
'Load from method...'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   589
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   590
#xfileLoadFromFile
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   591
'Load from file...'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   592
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   593
#xfileNewImage
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   594
'New image'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   595
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   596
#xfileSaveAs
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   597
'Save to file...'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   598
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   599
#xfileSaveMaskAs
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   600
'Save mask to file...'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   601
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   602
#xfileSaveMethod
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   603
'Save as method'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   604
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   605
#xfileSaveMethodAs
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   606
'Save as Method...'
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   607
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   608
)
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   609
3488
e9655ba452c7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3487
diff changeset
   610
    "Modified: / 05-09-2017 / 10:47:35 / cg"
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   611
!
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   612
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   613
helpSpec
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   614
    "This resource specification was automatically generated
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   615
     by the UIHelpTool of ST/X."
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   616
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   617
    "Do not manually edit this!! If it is corrupted,
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   618
     the UIHelpTool may not be able to read the specification."
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   619
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   620
    "
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   621
     UIHelpTool openOnClass:ImageEditor
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   622
    "
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   623
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   624
    <resource: #programHelp>
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   625
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   626
    ^super helpSpec addPairsFrom:(self helpPairs)
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   627
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   628
    "Modified: / 16-02-2017 / 12:30:50 / cg"
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   629
! !
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   630
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   631
!ImageEditor class methodsFor:'image specs'!
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   632
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   633
brighterIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   634
    "This resource specification was automatically generated
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   635
     by the ImageEditor of ST/X."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   636
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   637
    "Do not manually edit this!! If it is corrupted,
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   638
     the ImageEditor may not be able to read the specification."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   639
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   640
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   641
     self brighterIcon inspect
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   642
     ImageEditor openOnClass:self andSelector:#brighterIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   643
     Icon flushCachedIcons
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   644
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   645
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   646
    <resource: #image>
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   647
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   648
    ^Icon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   649
        constantNamed:'ImageEditor class brighterIcon'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   650
        ifAbsentPut:[(Depth8Image width:14 height:14) bits:(ByteArray fromPackedString:'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   651
@PDA@PDA@PDA@PDA@PG%9^W%9^W%;>?/;>?/;>W%9^W%9^W/;>?/;>?/9^W%9^W%A [/;>?/;>?%9^W%9^TFA.?/;>?/;>W%9^W%9PXF;>?/;>?/9^W%A XF
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   652
A XFA [/;>?%9^TFA XFA XFA.?/;>W%9^W%9PXF;>?/;>?/9^W%9^W%A [/;>?/;>?%9^W%9^TFA.?/;>?/;>W%9^W%9^W/;>?/;>?/9^W%9^W%9^?/;>?/
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   653
;><A@PDA@PDA@PDA@PDA@P@a')
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   654
            colorMapFromArray:#[88 88 88 0 0 0 255 0 0 0 255 0 0 0 255 0 255 255 255 255 127 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170 0 0 51 0 0 102 0 0 153 0 0 204 0 51 0 0 51 51 0 51 102 0 51 153 0 51 204 0 51 255 0 102 0 0 102 51 0 102 102 0 102 153 0 102 204 0 102 255 0 153 0 0 153 51 0 153 102 0 153 153 0 153 204 0 153 255 0 204 0 0 204 51 0 204 102 0 204 153 0 204 204 0 204 255 0 255 51 0 255 102 0 255 153 0 255 204 51 0 0 51 0 51 51 0 102 51 0 153 51 0 204 51 0 255 51 51 0 51 51 51 51 51 102 51 51 153 51 51 204 51 51 255 51 102 0 51 102 51 51 102 102 51 102 153 51 102 204 51 102 255 51 153 0 51 153 51 51 153 102 51 153 153 51 153 204 51 153 255 51 204 0 51 204 51 51 204 102 51 204 153 51 204 204 51 204 255 51 255 0 51 255 51 51 255 102 51 255 153 51 255 204 51 255 255 102 0 0 102 0 51 102 0 102 102 0 153 102 0 204 102 0 255 102 51 0 102 51 51 102 51 102 102 51 153 102 51 204 102 51 255 102 102 0 102 102 51 102 102 102 102 102 153 102 102 204 102 102 255 102 153 0 102 153 51 102 153 102 102 153 153 102 153 204 102 153 255 102 204 0 102 204 51 102 204 102 102 204 153 102 204 204 102 204 255 102 255 0 102 255 51 102 255 102 102 255 153 102 255 204 102 255 255 153 0 0 153 0 51 153 0 102 153 0 153 153 0 204 153 0 255 153 51 0 153 51 51 153 51 102 153 51 153 153 51 204 153 51 255 153 102 0 153 102 51 153 102 102 153 102 153 153 102 204 153 102 255 153 153 0 153 153 51 153 153 102 153 153 153 153 153 204 153 153 255 153 204 0 153 204 51 153 204 102 153 204 153 153 204 204 153 204 255 153 255 0 153 255 51 153 255 102 153 255 153 153 255 204 153 255 255 204 0 0 204 0 51 204 0 102 204 0 153 204 0 204 204 0 255 204 51 0 204 51 51 204 51 102 204 51 153 204 51 204 204 51 255 204 102 0 204 102 51 204 102 102 204 102 153 204 102 204 204 102 255 204 153 0 204 153 51 204 153 102 204 153 153 204 153 204 204 153 255 204 204 0 204 204 51 204 204 102 204 204 153 204 204 204 204 204 255 204 255 0 204 255 51 204 255 102 204 255 153 204 255 204 204 255 255 255 0 51 255 0 102 255 0 153 255 0 204 255 51 0 255 51 51 255 51 102 255 51 153 255 51 204 255 51 255 255 102 0 255 102 51 255 102 102 255 102 153 255 102 204 255 102 255 255 153 0 255 153 51 255 153 102 255 153 153 255 153 204 255 153 255 255 204 0 255 204 51 255 204 102 255 204 153 255 204 204 255 204 255 255 255 51 255 255 102 255 255 153 255 255 204 255 255 255 9 9 9 19 19 19 29 29 29 39 39 39 49 49 49 58 58 58 68 68 68 78 78 78 98 98 98 107 107 107 117 117 117 137 137 137 147 147 147 156 156 156 166 166 166]
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   655
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'@@C??O?<??3??O?<??3??O?<??3??O?<??0@@@@a'); yourself); yourself]
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   656
!
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   657
2272
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   658
circleIcon
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   659
    "This resource specification was automatically generated
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   660
     by the ImageEditor of ST/X."
3442
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   661
2272
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   662
    "Do not manually edit this!! If it is corrupted,
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   663
     the ImageEditor may not be able to read the specification."
3442
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   664
2272
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   665
    "
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   666
     self circleIcon inspect
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   667
     ImageEditor openOnClass:self andSelector:#circleIcon
3442
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   668
     Icon flushCachedIcons
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   669
    "
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   670
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   671
    <resource: #image>
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   672
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   673
    ^Icon
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   674
        constantNamed:'ImageEditor class circleIcon'
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   675
        ifAbsentPut:[(Depth1Image width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@QAAD@@@C@X@@@@@@@CLA @@@Q@AD@@@@@a')
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   676
            colorMapFromArray:#[0 0 0 127 127 127]
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   677
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@_@CF@PDC@XH@  BB@HLA PD@1 A<@@@@@a'); yourself); yourself]
2272
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   678
!
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   679
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   680
copyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   681
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   682
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   683
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   684
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   685
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   686
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   687
     self copyIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   688
     ImageEditor openOnClass:self andSelector:#copyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   689
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   690
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   691
    ^ Icon constantNamed:'ImageEditor class copyIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   692
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   693
            (Depth2Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   694
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   695
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   696
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   697
                bitsPerSample:(#( 2 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   698
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   699
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   700
                            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
   701
                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
   702
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   703
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   704
                            height:14;
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:'@@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
   707
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   708
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   709
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   710
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   711
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   712
cropSubImageIcon
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   713
    "This resource specification was automatically generated
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   714
     by the ImageEditor of ST/X."
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   715
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   716
    "Do not manually edit this!! If it is corrupted,
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   717
     the ImageEditor may not be able to read the specification."
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   718
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   719
    "
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   720
     self cropSubImageIcon inspect
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   721
     ImageEditor openOnClass:self andSelector:#cropSubImageIcon
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   722
     Icon flushCachedIcons
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   723
    "
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   724
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   725
    <resource: #image>
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   726
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   727
    ^Icon
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   728
        constantNamed:'ImageEditor class cropSubImageIcon'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   729
        ifAbsentPut:[(Depth2Image width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@J**@@BUU @@%UX@@IUV@@BUU @@%UX@@J**@@@@@@@@@@@@@@@@@@b')
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   730
            colorMapFromArray:#[0 0 0 255 255 255 127 127 127 0 255 0]
3464
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
   731
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'??2@AH@D.@R?9K?$''>R_9I?$''?R_=HA4 @S??@@a'); yourself); yourself]
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   732
!
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   733
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   734
darkerIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   735
    "This resource specification was automatically generated
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   736
     by the ImageEditor of ST/X."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   737
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   738
    "Do not manually edit this!! If it is corrupted,
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   739
     the ImageEditor may not be able to read the specification."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   740
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   741
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   742
     self darkerIcon inspect
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   743
     ImageEditor openOnClass:self andSelector:#darkerIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   744
     Icon flushCachedIcons
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   745
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   746
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   747
    <resource: #image>
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   748
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   749
    ^Icon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   750
        constantNamed:'ImageEditor class darkerIcon'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   751
        ifAbsentPut:[(Depth8Image width:14 height:14) bits:(ByteArray fromPackedString:'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   752
@PDA@PDA@PDA@PDA@PG/;>?/;>?/9^W%9^W%9^?/;>?/;>?%9^W%9^W%;>?/;>?/;>W%9^W%9^W/;>?/;>?/9^W%9^W%9^?/;>?/;>?%9^W%9^W%;>?/A XF
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   753
A XFA [%9^W/;><FA XFA XFA.W%9^?/;>?/;>?%9^W%9^W%;>?/;>?/;>W%9^W%9^W/;>?/;>?/9^W%9^W%9^?/;>?/;>?%9^W%9^W%;>?/;>?/;>W%9^W%
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   754
9^TA@PDA@PDA@PDA@PDA@P@a')
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   755
            colorMapFromArray:#[88 88 88 0 0 0 255 0 0 0 255 0 0 0 255 0 255 255 255 255 127 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170 0 0 51 0 0 102 0 0 153 0 0 204 0 51 0 0 51 51 0 51 102 0 51 153 0 51 204 0 51 255 0 102 0 0 102 51 0 102 102 0 102 153 0 102 204 0 102 255 0 153 0 0 153 51 0 153 102 0 153 153 0 153 204 0 153 255 0 204 0 0 204 51 0 204 102 0 204 153 0 204 204 0 204 255 0 255 51 0 255 102 0 255 153 0 255 204 51 0 0 51 0 51 51 0 102 51 0 153 51 0 204 51 0 255 51 51 0 51 51 51 51 51 102 51 51 153 51 51 204 51 51 255 51 102 0 51 102 51 51 102 102 51 102 153 51 102 204 51 102 255 51 153 0 51 153 51 51 153 102 51 153 153 51 153 204 51 153 255 51 204 0 51 204 51 51 204 102 51 204 153 51 204 204 51 204 255 51 255 0 51 255 51 51 255 102 51 255 153 51 255 204 51 255 255 102 0 0 102 0 51 102 0 102 102 0 153 102 0 204 102 0 255 102 51 0 102 51 51 102 51 102 102 51 153 102 51 204 102 51 255 102 102 0 102 102 51 102 102 102 102 102 153 102 102 204 102 102 255 102 153 0 102 153 51 102 153 102 102 153 153 102 153 204 102 153 255 102 204 0 102 204 51 102 204 102 102 204 153 102 204 204 102 204 255 102 255 0 102 255 51 102 255 102 102 255 153 102 255 204 102 255 255 153 0 0 153 0 51 153 0 102 153 0 153 153 0 204 153 0 255 153 51 0 153 51 51 153 51 102 153 51 153 153 51 204 153 51 255 153 102 0 153 102 51 153 102 102 153 102 153 153 102 204 153 102 255 153 153 0 153 153 51 153 153 102 153 153 153 153 153 204 153 153 255 153 204 0 153 204 51 153 204 102 153 204 153 153 204 204 153 204 255 153 255 0 153 255 51 153 255 102 153 255 153 153 255 204 153 255 255 204 0 0 204 0 51 204 0 102 204 0 153 204 0 204 204 0 255 204 51 0 204 51 51 204 51 102 204 51 153 204 51 204 204 51 255 204 102 0 204 102 51 204 102 102 204 102 153 204 102 204 204 102 255 204 153 0 204 153 51 204 153 102 204 153 153 204 153 204 204 153 255 204 204 0 204 204 51 204 204 102 204 204 153 204 204 204 204 204 255 204 255 0 204 255 51 204 255 102 204 255 153 204 255 204 204 255 255 255 0 51 255 0 102 255 0 153 255 0 204 255 51 0 255 51 51 255 51 102 255 51 153 255 51 204 255 51 255 255 102 0 255 102 51 255 102 102 255 102 153 255 102 204 255 102 255 255 153 0 255 153 51 255 153 102 255 153 153 255 153 204 255 153 255 255 204 0 255 204 51 255 204 102 255 204 153 255 204 204 255 204 255 255 255 51 255 255 102 255 255 153 255 255 204 255 255 255 9 9 9 19 19 19 29 29 29 39 39 39 49 49 49 58 58 58 68 68 68 78 78 78 98 98 98 107 107 107 117 117 117 137 137 137 147 147 147 156 156 156 166 166 166]
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   756
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'@@C??O?<??3??O?<??3??O?<??3??O?<??0@@@@a'); yourself); yourself]
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   757
!
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   758
2155
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   759
defaultIcon
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   760
    <resource: #programImage>
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   761
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   762
    ^ ToolbarIconLibrary startImageEditorIcon
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   763
!
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   764
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   765
editIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   766
    "This resource specification was automatically generated
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   767
     by the ImageEditor of ST/X."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   768
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   769
    "Do not manually edit this!! If it is corrupted,
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   770
     the ImageEditor may not be able to read the specification."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   771
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   772
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   773
     self editIcon inspect
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   774
     ImageEditor openOnClass:self andSelector:#editIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   775
     Icon flushCachedIcons
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   776
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   777
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   778
    <resource: #image>
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   779
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   780
    ^Icon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   781
        constantNamed:'ImageEditor class editIcon'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   782
        ifAbsentPut:[(Depth8Image width:15 height:16) bits:(ByteArray fromPackedString:'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   783
@@@@@@@3V41AJ0T@@@@@@@@@@B1(TD4>EP@@@@@@@@@@@CA!!S4X2D@@@@@@@@@@@LV)XTTHX@@@@@@@@@@@@K6UTS$LR@@@@@@@@@@@9OE9VRQ8@@@@@@@@@
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   784
@@@8Z5%WR!!P@@@@@@@@@@B8;X5)RG2@@@@@@@@@@@CY-W51SF @@@@@@@@@@@B5)XE4%E0@@@@@@@@@@@B%,Y3TO@@@@@@@@@@@@@BM,M04@@@@@@@@@@@@@
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   785
@@ IDP@@@@@@@@@@@@@@@@\K@@@@@@@@@@@@@@@@@A,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@')
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   786
            colorMapFromArray:#[0 0 0 0 137 0 0 206 0 87 87 87 133 60 36 145 109 112 155 31 0 160 115 98 161 124 106 163 140 130 166 46 5 169 113 95 174 218 230 182 93 58 183 59 8 186 100 65 192 147 138 193 129 103 193 132 116 195 100 52 195 120 93 197 82 32 204 208 220 205 177 176 207 90 27 210 109 64 210 140 105 213 175 169 213 217 227 215 172 138 220 114 42 222 120 43 222 209 212 223 137 33 223 153 96 226 180 137 228 90 9 228 142 66 232 174 56 234 184 145 240 178 78 241 195 142 241 212 187 242 102 12 242 177 95 245 202 137 245 209 172 247 181 30 247 183 8 247 198 128 248 122 26 248 194 1 248 198 0 248 201 137 248 203 113 248 214 181 249 193 57 249 210 160 250 206 0 253 222 69 253 226 47 254 116 14 254 128 21 254 136 5 254 141 47 254 144 8 254 147 36 254 147 47 254 158 0 254 158 1 254 159 21 254 161 10 254 162 0 254 165 54 254 165 69 254 167 2 254 167 5 254 171 10 254 176 36 254 177 17 254 178 11 254 181 24 254 184 75 254 184 94 254 187 34 254 191 0 254 191 42 254 191 54 254 194 26 254 197 55 254 201 65 254 203 3 254 203 78 254 203 97 254 207 47 254 209 81 254 212 90 254 213 16 254 214 81 254 216 73 254 219 0 254 220 37 254 223 0 254 225 166 254 226 7 254 226 119 254 231 26 254 231 65 254 231 201 254 239 98]
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   787
            mask:((Depth1Image width:15 height:16) bits:(ByteArray fromPackedString:'A>@O0@?@G8@_ C<@O0A?@G8@_ A<@G @\@A @D@@@@@b'); yourself); yourself]
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   788
!
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   789
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   790
emptyIcon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   791
    "This resource specification was automatically generated
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   792
     by the ImageEditor of ST/X."
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   793
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   794
    "Do not manually edit this!! If it is corrupted,
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   795
     the ImageEditor may not be able to read the specification."
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   796
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   797
    "
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   798
     self emptyIcon inspect
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   799
     ImageEditor openOnClass:self andSelector:#emptyIcon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   800
     Icon flushCachedIcons
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   801
    "
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   802
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   803
    <resource: #image>
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   804
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   805
    ^Icon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   806
        constantNamed:'ImageEditor class emptyIcon'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   807
        ifAbsentPut:[(Depth4Image width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   808
@@@@@@@@@@@b')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   809
            colorMapFromArray:#[0 0 0]
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   810
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); yourself); yourself]
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   811
!
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   812
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   813
emptyIcon2
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   814
    "This resource specification was automatically generated
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   815
     by the ImageEditor of ST/X."
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   816
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   817
    "Do not manually edit this!! If it is corrupted,
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   818
     the ImageEditor may not be able to read the specification."
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   819
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   820
    "
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   821
     self emptyIcon2 inspect
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   822
     ImageEditor openOnClass:self andSelector:#emptyIcon2
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   823
     Icon flushCachedIcons
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   824
    "
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   825
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   826
    <resource: #image>
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   827
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   828
    ^Icon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   829
        constantNamed:'ImageEditor class emptyIcon2'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   830
        ifAbsentPut:[(Depth4Image width:28 height:14) bits:(ByteArray fromPackedString:'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   831
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   832
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   833
@@@@@@@@@@@@@@@@@@@@@@@a')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   834
            colorMapFromArray:#[0 0 0]
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   835
            mask:((Depth1Image width:28 height:14) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b'); yourself); yourself]
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   836
!
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   837
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   838
fillCircleIcon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   839
    "This resource specification was automatically generated
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   840
     by the ImageEditor of ST/X."
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   841
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   842
    "Do not manually edit this!! If it is corrupted,
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   843
     the ImageEditor may not be able to read the specification."
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   844
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   845
    "
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   846
     self fillCircleIcon inspect
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   847
     ImageEditor openOnClass:self andSelector:#fillCircleIcon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   848
     Icon flushCachedIcons
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   849
    "
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   850
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   851
    <resource: #image>
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   852
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   853
    ^Icon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   854
        constantNamed:'ImageEditor class fillCircleIcon'
3443
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   855
        ifAbsentPut:[(Depth1Image width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@QA@@@@@B@H@@@@@@@CH@ @@@@@AD@@@@@a')
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   856
            colorMapFromArray:#[0 0 0 127 127 127]
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   857
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@_@C>@_<C?8O? ?>C?8O? _<@? A<@@@@@a'); yourself); yourself]
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   858
!
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   859
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   860
fillDiagonalGradientRectIcon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   861
    "This resource specification was automatically generated
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   862
     by the ImageEditor of ST/X."
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   863
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   864
    "Do not manually edit this!! If it is corrupted,
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   865
     the ImageEditor may not be able to read the specification."
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   866
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   867
    "
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   868
     self fillDiagonalGradientRectIcon inspect
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   869
     ImageEditor openOnClass:self andSelector:#fillDiagonalGradientRectIcon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   870
     Icon flushCachedIcons
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   871
    "
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   872
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   873
    <resource: #image>
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   874
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   875
    ^Icon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   876
        constantNamed:'ImageEditor class fillDiagonalGradientRectIcon'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   877
        ifAbsentPut:[(Depth4Image width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@QDQDQD@@@DQDQDQ@@@ADH"H"H@@@QBH"H"@@@DP"L3L0@@ADH#L3L@@@QBH3DQ@@@DP"L1DP@@ADH#LQD@@@@@@@@@
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   878
@@@@@@@@@@@b')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   879
            colorMapFromArray:#[0 0 0 255 0 0 127 0 0 191 0 0 91 0 0]
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   880
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a'); yourself); yourself]
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   881
!
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   882
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   883
fillGradientRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   884
    <resource: #image>
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   885
    "This resource specification was automatically generated
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   886
     by the ImageEditor of ST/X."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   887
    "Do not manually edit this!! If it is corrupted,
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   888
     the ImageEditor may not be able to read the specification."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   889
    "
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   890
     self fillGradientRectIcon inspect
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   891
     ImageEditor openOnClass:self andSelector:#fillGradientRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   892
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   893
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   894
    ^ Icon constantNamed:'ImageEditor class fillGradientRectIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   895
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   896
            (Depth4Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   897
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   898
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   899
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   900
                bitsPerSample:(#[ 4 ]);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   901
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   902
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   903
                            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
   904
@@@@@@@@@@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   905
                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
   906
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   907
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   908
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   909
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   910
                                        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
   911
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   912
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   913
        ]
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   914
!
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   915
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   916
fillHorizontalGradientRectIcon
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   917
    "This resource specification was automatically generated
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   918
     by the ImageEditor of ST/X."
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   919
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   920
    "Do not manually edit this!! If it is corrupted,
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   921
     the ImageEditor may not be able to read the specification."
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   922
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   923
    "
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   924
     self fillHorizontalGradientRectIcon inspect
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   925
     ImageEditor openOnClass:self andSelector:#fillHorizontalGradientRectIcon
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   926
     Icon flushCachedIcons
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   927
    "
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   928
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   929
    <resource: #image>
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   930
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   931
    ^Icon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   932
        constantNamed:'ImageEditor class fillHorizontalGradientRectIcon'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   933
        ifAbsentPut:[(Depth4Image width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@ADH#LQD@@@QBH3DQ@@@DP"L1DP@@ADH#LQD@@@QBH3DQ@@@DP"L1DP@@ADH#LQD@@@QBH3DQ@@@DP"L1DP@@ADH#LQD@@@@@@@@@
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   934
@@@@@@@@@@@b')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   935
            colorMapFromArray:#[0 0 0 255 0 0 127 0 0 191 0 0 91 0 0]
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   936
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a'); yourself); yourself]
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   937
!
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   938
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   939
fillIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   940
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   941
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   942
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   943
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   944
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   945
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   946
     self fillIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   947
     ImageEditor openOnClass:self andSelector:#fillIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   948
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   949
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   950
    ^ Icon constantNamed:'ImageEditor class fillIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   951
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   952
            (Depth2Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   953
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   954
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   955
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   956
                bitsPerSample:(#( 2 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   957
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   958
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   959
                            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
   960
                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
   961
                mask:((ImageMask 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
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   965
                                        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
   966
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   967
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   968
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   969
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   970
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   971
fillRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   972
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   973
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   974
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   975
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   976
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   977
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   978
     self fillRectIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   979
     ImageEditor openOnClass:self andSelector:#fillRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   980
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   981
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   982
    ^ Icon constantNamed:'ImageEditor class fillRectIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   983
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   984
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   985
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   986
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   987
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   988
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   989
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   990
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   991
                            fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   992
                colorMapFromArray:#[ 0 0 0 255 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   993
                mask:((ImageMask 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
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   997
                                        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
   998
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   999
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1000
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1001
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1002
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
  1003
fillVerticalGradientRectIcon
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
  1004
    "This resource specification was automatically generated
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
  1005
     by the ImageEditor of ST/X."
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1006
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
  1007
    "Do not manually edit this!! If it is corrupted,
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
  1008
     the ImageEditor may not be able to read the specification."
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1009
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
  1010
    "
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1011
     self fillVerticalGradientRectIcon inspect
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1012
     ImageEditor openOnClass:self andSelector:#fillVerticalGradientRectIcon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1013
     Icon flushCachedIcons
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1014
    "
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1015
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1016
    <resource: #image>
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1017
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1018
    ^Icon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1019
        constantNamed:'ImageEditor class fillVerticalGradientRectIcon'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1020
        ifAbsentPut:[(Depth4Image width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DQDQDQD@@ADQDQDQ@@@H"H"H"H@@BH"H"H"@@@3L3L3L0@@L3L3L3L@@ADQDQDQ@@@QDQDQDP@@DQDQDQD@@@@@@@@@
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1021
@@@@@@@@@@@b')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1022
            colorMapFromArray:#[0 0 0 255 0 0 127 0 0 191 0 0 91 0 0]
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1023
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a'); yourself); yourself]
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
  1024
!
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
  1025
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1026
flipHorizontalIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1027
    <resource: #image>
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1028
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1029
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1030
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1031
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1032
    "
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1033
     self flipHorizontalIcon inspect
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1034
     ImageEditor openOnClass:self andSelector:#flipHorizontalIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1035
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1036
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1037
    ^ Icon constantNamed:'ImageEditor class flipHorizontalIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1038
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1039
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1040
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1041
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1042
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1043
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1044
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1045
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1046
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1047
                colorMapFromArray:#[ 0 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1048
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1049
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1050
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1051
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1052
                                        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
  1053
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1054
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1055
        ]
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1056
!
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1057
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1058
flipVerticalIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1059
    <resource: #image>
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1060
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1061
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1062
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1063
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1064
    "
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1065
     self flipVerticalIcon inspect
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1066
     ImageEditor openOnClass:self andSelector:#flipVerticalIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1067
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1068
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1069
    ^ Icon constantNamed:'ImageEditor class flipVerticalIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1070
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1071
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1072
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1073
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1074
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1075
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1076
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1077
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1078
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1079
                colorMapFromArray:#[ 0 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1080
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1081
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1082
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1083
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1084
                                        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
  1085
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1086
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1087
        ]
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1088
!
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1089
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1090
leftMouseKeyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1091
    <resource: #image>
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1092
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1093
     by the ImageEditor of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1094
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1095
     the ImageEditor may not be able to read the specification."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1096
    "
1405
0b2e421db465 images compactified
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
  1097
     self leftMouseKeyIcon inspect
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1098
     ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1099
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1100
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1101
    ^ Icon constantNamed:'ImageEditor class leftMouseKeyIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1102
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1103
            (Depth2Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1104
                width:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1105
                height:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1106
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1107
                bitsPerSample:(#( 2 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1108
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1109
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1110
                            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
  1111
                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
  1112
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1113
                            width:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1114
                            height:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1115
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1116
                                        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
  1117
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1118
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1119
        ]
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1120
!
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1121
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1122
maskOutsideCircleIcon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1123
    "This resource specification was automatically generated
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1124
     by the ImageEditor of ST/X."
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1125
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1126
    "Do not manually edit this!! If it is corrupted,
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1127
     the ImageEditor may not be able to read the specification."
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1128
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1129
    "
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1130
     self maskOutsideCircleIcon inspect
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1131
     ImageEditor openOnClass:self andSelector:#maskOutsideCircleIcon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1132
     Icon flushCachedIcons
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1133
    "
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1134
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1135
    <resource: #image>
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1136
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1137
    ^Icon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1138
        constantNamed:'ImageEditor class maskOutsideCircleIcon'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1139
        ifAbsentPut:[(Depth1Image width:14 height:14) bits:(ByteArray fromPackedString:'??3??O1=<A3 CN@L0@S@AL@G8@3 CO@\?G3??@@a')
3407
2e0024e012e9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3405
diff changeset
  1140
            colorMapFromArray:#[0 0 0 255 127 127]
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1141
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'??3??O?<??3??O?<??3??O?<??3??O?<??3??@@a'); yourself); yourself]
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1142
!
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1143
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1144
maskOutsideRectangleIcon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1145
    "This resource specification was automatically generated
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1146
     by the ImageEditor of ST/X."
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1147
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1148
    "Do not manually edit this!! If it is corrupted,
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1149
     the ImageEditor may not be able to read the specification."
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1150
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1151
    "
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1152
     self maskOutsideRectangleIcon inspect
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1153
     ImageEditor openOnClass:self andSelector:#maskOutsideRectangleIcon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1154
     Icon flushCachedIcons
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1155
    "
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1156
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1157
    <resource: #image>
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1158
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1159
    ^Icon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1160
        constantNamed:'ImageEditor class maskOutsideRectangleIcon'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1161
        ifAbsentPut:[(Depth1Image width:14 height:14) bits:(ByteArray fromPackedString:'??3??L@M0@3@CL@L0@3@CL@L0@3@CL@L??7??@@a')
3407
2e0024e012e9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3405
diff changeset
  1162
            colorMapFromArray:#[0 0 0 255 127 127]
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1163
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'??3??O?<??3??O?<??3??O?<??3??O?<??3??@@a'); yourself); yourself]
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1164
!
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1165
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1166
pasteIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1167
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1168
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1169
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1170
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1171
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1172
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1173
     self pasteIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1174
     ImageEditor openOnClass:self andSelector:#pasteIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1175
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1176
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1177
    ^ Icon constantNamed:'ImageEditor class pasteIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1178
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1179
            (Depth4Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1180
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1181
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1182
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1183
                bitsPerSample:(#( 4 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1184
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1185
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1186
                            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
  1187
@@@@@@@@@@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1188
                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
  1189
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1190
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1191
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1192
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1193
                                        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
  1194
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1195
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1196
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1197
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1198
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1199
pasteUnderIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1200
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1201
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1202
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1203
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1204
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1205
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1206
     self pasteUnderIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1207
     ImageEditor openOnClass:self andSelector:#pasteUnderIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1208
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1209
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1210
    ^ Icon constantNamed:'ImageEditor class pasteUnderIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1211
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1212
            (Depth4Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1213
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1214
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1215
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1216
                bitsPerSample:(#( 4 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1217
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1218
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1219
                            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
  1220
@@@@@@@@@@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1221
                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
  1222
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1223
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1224
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1225
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1226
                                        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
  1227
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1228
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1229
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1230
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1231
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1232
pasteWithMaskIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1233
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1234
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1235
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1236
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1237
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1238
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1239
     self pasteWithMaskIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1240
     ImageEditor openOnClass:self andSelector:#pasteWithMaskIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1241
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1242
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1243
    ^ Icon constantNamed:'ImageEditor class pasteWithMaskIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1244
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1245
            (Depth4Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1246
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1247
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1248
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1249
                bitsPerSample:(#( 4 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1250
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1251
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1252
                            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
  1253
@@@@@@@@@@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1254
                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
  1255
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1256
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1257
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1258
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1259
                                        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
  1260
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1261
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1262
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1263
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1264
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1265
pointIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1266
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1267
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1268
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1269
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1270
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1271
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1272
     self pointIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1273
     ImageEditor openOnClass:self andSelector:#pointIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1274
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1275
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1276
    ^ Icon constantNamed:'ImageEditor class pointIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1277
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1278
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1279
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1280
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1281
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1282
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1283
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1284
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1285
                            fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1286
                colorMapFromArray:#[ 0 0 0 255 255 255 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1287
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1288
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1289
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1290
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1291
                                        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
  1292
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1293
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1294
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1295
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1296
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1297
rectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1298
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1299
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1300
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1301
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1302
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1303
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1304
     self rectIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1305
     ImageEditor openOnClass:self andSelector:#rectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1306
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1307
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1308
    ^ Icon constantNamed:'ImageEditor class rectIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1309
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1310
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1311
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1312
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1313
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1314
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1315
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1316
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1317
                            fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1318
                colorMapFromArray:#[ 0 0 0 255 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1319
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1320
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1321
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1322
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1323
                                        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
  1324
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1325
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1326
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1327
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1328
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1329
rightMouseKeyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1330
    <resource: #image>
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1331
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1332
     by the ImageEditor of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1333
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1334
     the ImageEditor may not be able to read the specification."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1335
    "
1405
0b2e421db465 images compactified
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
  1336
     self rightMouseKeyIcon inspect
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1337
     ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1338
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1339
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1340
    ^ Icon constantNamed:'ImageEditor class rightMouseKeyIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1341
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1342
            (Depth2Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1343
                width:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1344
                height:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1345
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1346
                bitsPerSample:(#( 2 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1347
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1348
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1349
                            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
  1350
                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
  1351
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1352
                            width:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1353
                            height:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1354
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1355
                                        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
  1356
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1357
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1358
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1359
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1360
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1361
slightlyBrighterIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1362
    "This resource specification was automatically generated
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1363
     by the ImageEditor of ST/X."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1364
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1365
    "Do not manually edit this!! If it is corrupted,
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1366
     the ImageEditor may not be able to read the specification."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1367
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1368
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1369
     self slightlyBrighterIcon inspect
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1370
     ImageEditor openOnClass:self andSelector:#slightlyBrighterIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1371
     Icon flushCachedIcons
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1372
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1373
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1374
    <resource: #image>
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1375
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1376
    ^Icon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1377
        constantNamed:'ImageEditor class slightlyBrighterIcon'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1378
        ifAbsentPut:[(Depth8Image width:14 height:14) bits:(ByteArray fromPackedString:'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1379
@PDA@PDA@PDA@PDA@PD@@@@@@@@@;>?/;>?/;0@@@@@@@@C/;>?/;>?/@@@@@@@@A [/;>?/;><@@@@@@@@FA.?/;>?/;0@@@@@@@@XF;>?/;>?/@@@@A XF
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1380
A XFA [/;><@@@@FA XFA XFA.?/;0@@@@@@@@XF;>?/;>?/@@@@@@@@A [/;>?/;><@@@@@@@@FA.?/;>?/;0@@@@@@@@C/;>?/;>?/@@@@@@@@@N?/;>?/
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1381
;><A@PDA@PDA@PDA@PDA@P@a')
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1382
            colorMapFromArray:#[88 88 88 0 0 0 255 0 0 0 255 0 0 0 255 0 255 255 255 255 127 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170 0 0 51 0 0 102 0 0 153 0 0 204 0 51 0 0 51 51 0 51 102 0 51 153 0 51 204 0 51 255 0 102 0 0 102 51 0 102 102 0 102 153 0 102 204 0 102 255 0 153 0 0 153 51 0 153 102 0 153 153 0 153 204 0 153 255 0 204 0 0 204 51 0 204 102 0 204 153 0 204 204 0 204 255 0 255 51 0 255 102 0 255 153 0 255 204 51 0 0 51 0 51 51 0 102 51 0 153 51 0 204 51 0 255 51 51 0 51 51 51 51 51 102 51 51 153 51 51 204 51 51 255 51 102 0 51 102 51 51 102 102 51 102 153 51 102 204 51 102 255 51 153 0 51 153 51 51 153 102 51 153 153 51 153 204 51 153 255 51 204 0 51 204 51 51 204 102 51 204 153 51 204 204 51 204 255 51 255 0 51 255 51 51 255 102 51 255 153 51 255 204 51 255 255 102 0 0 102 0 51 102 0 102 102 0 153 102 0 204 102 0 255 102 51 0 102 51 51 102 51 102 102 51 153 102 51 204 102 51 255 102 102 0 102 102 51 102 102 102 102 102 153 102 102 204 102 102 255 102 153 0 102 153 51 102 153 102 102 153 153 102 153 204 102 153 255 102 204 0 102 204 51 102 204 102 102 204 153 102 204 204 102 204 255 102 255 0 102 255 51 102 255 102 102 255 153 102 255 204 102 255 255 153 0 0 153 0 51 153 0 102 153 0 153 153 0 204 153 0 255 153 51 0 153 51 51 153 51 102 153 51 153 153 51 204 153 51 255 153 102 0 153 102 51 153 102 102 153 102 153 153 102 204 153 102 255 153 153 0 153 153 51 153 153 102 153 153 153 153 153 204 153 153 255 153 204 0 153 204 51 153 204 102 153 204 153 153 204 204 153 204 255 153 255 0 153 255 51 153 255 102 153 255 153 153 255 204 153 255 255 204 0 0 204 0 51 204 0 102 204 0 153 204 0 204 204 0 255 204 51 0 204 51 51 204 51 102 204 51 153 204 51 204 204 51 255 204 102 0 204 102 51 204 102 102 204 102 153 204 102 204 204 102 255 204 153 0 204 153 51 204 153 102 204 153 153 204 153 204 204 153 255 204 204 0 204 204 51 204 204 102 204 204 153 204 204 204 204 204 255 204 255 0 204 255 51 204 255 102 204 255 153 204 255 204 204 255 255 255 0 51 255 0 102 255 0 153 255 0 204 255 51 0 255 51 51 255 51 102 255 51 153 255 51 204 255 51 255 255 102 0 255 102 51 255 102 102 255 102 153 255 102 204 255 102 255 255 153 0 255 153 51 255 153 102 255 153 153 255 153 204 255 153 255 255 204 0 255 204 51 255 204 102 255 204 153 255 204 204 255 204 255 255 255 51 255 255 102 255 255 153 255 255 204 255 255 255 9 9 9 19 19 19 29 29 29 39 39 39 49 49 49 58 58 58 68 68 68 78 78 78 98 98 98 107 107 107 117 117 117 137 137 137 147 147 147 156 156 156 166 166 166]
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1383
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'@@C??O?<??3??O?<??3??O?<??3??O?<??0@@@@a'); yourself); yourself]
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1384
!
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1385
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1386
slightlyDarkerIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1387
    "This resource specification was automatically generated
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1388
     by the ImageEditor of ST/X."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1389
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1390
    "Do not manually edit this!! If it is corrupted,
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1391
     the ImageEditor may not be able to read the specification."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1392
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1393
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1394
     self slightlyDarkerIcon inspect
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1395
     ImageEditor openOnClass:self andSelector:#slightlyDarkerIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1396
     Icon flushCachedIcons
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1397
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1398
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1399
    <resource: #image>
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1400
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1401
    ^Icon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1402
        constantNamed:'ImageEditor class slightlyDarkerIcon'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1403
        ifAbsentPut:[(Depth8Image width:14 height:14) bits:(ByteArray fromPackedString:'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1404
@PDA@PDA@PDA@PDA@PG/;>?/;>?/@@@@@@@@@N?/;>?/;><@@@@@@@@@;>?/;>?/;0@@@@@@@@C/;>?/;>?/@@@@@@@@@N?/;>?/;><@@@@@@@@@;>?/A XF
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1405
A XFA X@@@C/;><FA XFA XFA @@@N?/;>?/;><@@@@@@@@@;>?/;>?/;0@@@@@@@@C/;>?/;>?/@@@@@@@@@N?/;>?/;><@@@@@@@@@;>?/;>?/;0@@@@@@
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1406
@@@A@PDA@PDA@PDA@PDA@P@a')
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1407
            colorMapFromArray:#[88 88 88 0 0 0 255 0 0 0 255 0 0 0 255 0 255 255 255 255 127 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170 0 0 51 0 0 102 0 0 153 0 0 204 0 51 0 0 51 51 0 51 102 0 51 153 0 51 204 0 51 255 0 102 0 0 102 51 0 102 102 0 102 153 0 102 204 0 102 255 0 153 0 0 153 51 0 153 102 0 153 153 0 153 204 0 153 255 0 204 0 0 204 51 0 204 102 0 204 153 0 204 204 0 204 255 0 255 51 0 255 102 0 255 153 0 255 204 51 0 0 51 0 51 51 0 102 51 0 153 51 0 204 51 0 255 51 51 0 51 51 51 51 51 102 51 51 153 51 51 204 51 51 255 51 102 0 51 102 51 51 102 102 51 102 153 51 102 204 51 102 255 51 153 0 51 153 51 51 153 102 51 153 153 51 153 204 51 153 255 51 204 0 51 204 51 51 204 102 51 204 153 51 204 204 51 204 255 51 255 0 51 255 51 51 255 102 51 255 153 51 255 204 51 255 255 102 0 0 102 0 51 102 0 102 102 0 153 102 0 204 102 0 255 102 51 0 102 51 51 102 51 102 102 51 153 102 51 204 102 51 255 102 102 0 102 102 51 102 102 102 102 102 153 102 102 204 102 102 255 102 153 0 102 153 51 102 153 102 102 153 153 102 153 204 102 153 255 102 204 0 102 204 51 102 204 102 102 204 153 102 204 204 102 204 255 102 255 0 102 255 51 102 255 102 102 255 153 102 255 204 102 255 255 153 0 0 153 0 51 153 0 102 153 0 153 153 0 204 153 0 255 153 51 0 153 51 51 153 51 102 153 51 153 153 51 204 153 51 255 153 102 0 153 102 51 153 102 102 153 102 153 153 102 204 153 102 255 153 153 0 153 153 51 153 153 102 153 153 153 153 153 204 153 153 255 153 204 0 153 204 51 153 204 102 153 204 153 153 204 204 153 204 255 153 255 0 153 255 51 153 255 102 153 255 153 153 255 204 153 255 255 204 0 0 204 0 51 204 0 102 204 0 153 204 0 204 204 0 255 204 51 0 204 51 51 204 51 102 204 51 153 204 51 204 204 51 255 204 102 0 204 102 51 204 102 102 204 102 153 204 102 204 204 102 255 204 153 0 204 153 51 204 153 102 204 153 153 204 153 204 204 153 255 204 204 0 204 204 51 204 204 102 204 204 153 204 204 204 204 204 255 204 255 0 204 255 51 204 255 102 204 255 153 204 255 204 204 255 255 255 0 51 255 0 102 255 0 153 255 0 204 255 51 0 255 51 51 255 51 102 255 51 153 255 51 204 255 51 255 255 102 0 255 102 51 255 102 102 255 102 153 255 102 204 255 102 255 255 153 0 255 153 51 255 153 102 255 153 153 255 153 204 255 153 255 255 204 0 255 204 51 255 204 102 255 204 153 255 204 204 255 204 255 255 255 51 255 255 102 255 255 153 255 255 204 255 255 255 9 9 9 19 19 19 29 29 29 39 39 39 49 49 49 58 58 58 68 68 68 78 78 78 98 98 98 107 107 107 117 117 117 137 137 137 147 147 147 156 156 156 166 166 166]
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1408
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'@@C??O?<??3??O?<??3??O?<??3??O?<??0@@@@a'); yourself); yourself]
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1409
!
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1410
3191
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1411
smoothIcon
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1412
    "This resource specification was automatically generated
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1413
     by the ImageEditor of ST/X."
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1414
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1415
    "Do not manually edit this!! If it is corrupted,
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1416
     the ImageEditor may not be able to read the specification."
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1417
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1418
    "
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1419
     self smoothIcon inspect
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1420
     ImageEditor openOnClass:self andSelector:#smoothIcon
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1421
     Icon flushCachedIcons
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1422
    "
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1423
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1424
    <resource: #image>
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1425
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1426
    ^Icon
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1427
        constantNamed:'ImageEditor smoothIcon'
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1428
        ifAbsentPut:[(Depth4Image new) width:14; height:14; bits:(ByteArray fromPackedString:'@@@@@@@@@@@RH@@@H!!@@HRD@@RD @BHQ@@DRH@@ADP@ADP@@@@@QD@@@@@@@DQ@@@@@@@ADP@@@@@QD@@QD@@BHQ@@DRH@@!!HP@AHR@@D"@@@BHP@@@@@@@@
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1429
@@@@@@@@@@@b') ; colorMapFromArray:#[127 126 127 255 0 0 255 255 255]; mask:((ImageMask new) width:14; height:14; bits:(ByteArray fromPackedString:'_?1<_G1<_G1??D_DQ<QG1G?<_G1<_G1<_?0@@@@a') ; yourself); yourself]
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1430
!
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1431
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1432
specialCircleIcon
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1433
    "This resource specification was automatically generated
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1434
     by the ImageEditor of ST/X."
3442
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1435
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1436
    "Do not manually edit this!! If it is corrupted,
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1437
     the ImageEditor may not be able to read the specification."
3442
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1438
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1439
    "
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1440
     self specialCircleIcon inspect
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1441
     ImageEditor openOnClass:self andSelector:#specialCircleIcon
3442
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1442
     Icon flushCachedIcons
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1443
    "
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1444
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1445
    <resource: #image>
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1446
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1447
    ^Icon
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1448
        constantNamed:'ImageEditor class specialCircleIcon'
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1449
        ifAbsentPut:[(Depth2Image width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@PA@@@RBD@@P@@P@P@@A@D@@@PA@@@D@PHHA@A@@A@@D@A@@@PA@@@@@@@@@@@@@b')
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1450
            colorMapFromArray:#[0 0 0 255 0 0 127 127 127]
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1451
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@-@E:@''$D^HQ8!!G"D^HH1@PH@-@@0@@@@@a'); yourself); yourself]
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1452
!
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1453
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1454
specialRectangleIcon
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1455
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1456
     by the ImageEditor of ST/X."
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1457
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1458
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1459
     the ImageEditor may not be able to read the specification."
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1460
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1461
    "
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1462
     self specialRectangleIcon inspect
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1463
     ImageEditor openOnClass:self andSelector:#specialRectangleIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1464
     Icon flushCachedIcons
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1465
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1466
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1467
    <resource: #image>
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1468
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1469
    ^Icon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1470
        constantNamed:'ImageEditor class specialRectangleIcon'
3442
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1471
        ifAbsentPut:[(Depth2Image width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@@@@@@UPAU@DBB@PA@@@D@P@@A@D@@@PA@@@D@PHHA@D@@@PA@@@D@UPAU@@@@@@@@@@@@b')
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1472
            colorMapFromArray:#[0 0 0 255 0 0 127 127 127]
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1473
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@G-8Q8!!G"D^HQ8!!G"D^HP0!!@BG-8@0@@@@@a'); yourself); yourself]
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1474
!
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1475
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1476
sprayIcon
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1477
    "This resource specification was automatically generated
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1478
     by the ImageEditor of ST/X."
3191
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1479
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1480
    "Do not manually edit this!! If it is corrupted,
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1481
     the ImageEditor may not be able to read the specification."
3191
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1482
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1483
    "
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1484
     self sprayIcon inspect
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1485
     ImageEditor openOnClass:self andSelector:#sprayIcon
3191
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1486
     Icon flushCachedIcons
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1487
    "
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1488
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1489
    <resource: #image>
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1490
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1491
    ^Icon
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1492
        constantNamed:'ImageEditor sprayIcon'
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1493
        ifAbsentPut:[(Depth4Image new) width:14; height:14; bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@P@@@@@@DA@P@@@@@PDA@@@@@@@PDA@@@@@@@PD@@@@"H@@PD@@@H"@@@@@@@ADP@@@@@@@QD@@@@@@@DQ@@@@@@@ADP@@
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1494
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((ImageMask new) width:14; height:14; bits:(ByteArray fromPackedString:'@@@@@@@HA%PF*@ITA2 O%@>@C8@O @>@C8@O @@a') ; yourself); yourself]
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1495
! !
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1496
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1497
!ImageEditor class methodsFor:'interface specs'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1498
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1499
changeHLSDialogSpec
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1500
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1501
     by the UIPainter of ST/X."
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1502
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1503
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1504
     the UIPainter may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1505
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1506
    "
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1507
     UIPainter new openOnClass:ImageEditor andSelector:#changeHLSDialogSpec
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1508
     ImageEditor new openInterface:#changeHLSDialogSpec
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1509
    "
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1510
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1511
    <resource: #canvas>
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1512
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1513
    ^ 
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1514
    #(FullSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1515
       name: changeHLSDialogSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1516
       window: 
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1517
      (WindowSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1518
         label: 'HLS Edit Dialog'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1519
         name: 'HLS Edit Dialog'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1520
         min: (Point 10 10)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1521
         bounds: (Rectangle 0 0 378 312)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1522
       )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1523
       component: 
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1524
      (SpecCollection
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1525
         collection: (
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1526
          (LabelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1527
             label: 'Hue-Shift:'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1528
             name: 'HueLabel'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1529
             layout: (LayoutFrame 20 0 21 0 187 0 43 0)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1530
             translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1531
             adjust: right
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1532
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1533
          (InputFieldSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1534
             name: 'HueShiftEntryField'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1535
             layout: (LayoutFrame 194 0 21 0 237 0 43 0)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1536
             tabable: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1537
             model: hueShiftAmount
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1538
             type: numberInRange
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1539
             minValue: 0
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1540
             maxValue: 360
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1541
             acceptChannel: acceptChannel
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1542
             acceptOnPointerLeave: false
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1543
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1544
          (ThumbWheelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1545
             name: 'HueWheel'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1546
             layout: (LayoutFrame 246 0 22 0 363 0 42 0)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1547
             model: hueShiftAmount
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1548
             orientation: horizontal
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1549
             step: 1
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1550
             endlessRotation: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1551
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1552
          (LabelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1553
             label: 'Light Factor:'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1554
             name: 'LightLabel'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1555
             layout: (LayoutFrame 20 0 50 0 187 0 72 0)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1556
             translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1557
             adjust: right
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1558
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1559
          (InputFieldSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1560
             name: 'LightEntryField'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1561
             layout: (LayoutFrame 194 0 50 0 237 0 72 0)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1562
             tabable: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1563
             model: lightAmount
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1564
             type: numberInRange
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1565
             minValue: 0
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1566
             maxValue: 1000
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1567
             acceptChannel: acceptChannel
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1568
             acceptOnPointerLeave: false
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1569
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1570
          (ThumbWheelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1571
             name: 'LightWheel'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1572
             layout: (LayoutFrame 246 0 51 0 363 0 71 0)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1573
             model: lightAmount
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1574
             orientation: horizontal
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1575
             stop: 1000
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1576
             step: 1
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1577
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1578
          (LabelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1579
             label: 'Saturation Factor:'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1580
             name: 'SaturationLabel'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1581
             layout: (LayoutFrame 20 0 79 0 187 0 101 0)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1582
             translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1583
             adjust: right
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1584
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1585
          (InputFieldSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1586
             name: 'SaturationEntryField'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1587
             layout: (LayoutFrame 194 0 79 0 237 0 101 0)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1588
             tabable: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1589
             model: saturationAmount
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1590
             type: numberInRange
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1591
             minValue: 0
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1592
             maxValue: 1000
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1593
             acceptChannel: acceptChannel
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1594
             acceptOnPointerLeave: false
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1595
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1596
          (ThumbWheelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1597
             name: 'SaturationWheel'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1598
             layout: (LayoutFrame 246 0 80 0 363 0 100 0)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1599
             model: saturationAmount
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1600
             orientation: horizontal
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1601
             stop: 1000
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1602
             step: 1
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1603
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1604
          (LabelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1605
             label: 'Color Shift'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1606
             name: 'Label2'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1607
             layout: (LayoutFrame 5 0 127 0 -15 0.5 149 0)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1608
             translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1609
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1610
          (LabelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1611
             name: 'HueColorLabel'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1612
             layout: (LayoutFrame 18 0.0 150 0 -41 0.5 234 0)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1613
             level: -1
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1614
             backgroundChannel: hlsColor
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1615
             translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1616
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1617
          (LabelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1618
             label: 'Preview'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1619
             name: 'Label3'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1620
             layout: (LayoutFrame 5 0.5 127 0 -5 1 149 0)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1621
             translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1622
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1623
          (LabelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1624
             name: 'PreviewLabel'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1625
             layout: (LayoutFrame 36 0.5 150 0 -23 1.0 234 0)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1626
             level: -1
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1627
             translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1628
             labelChannel: previewImageHolder
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1629
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1630
          (HorizontalPanelViewSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1631
             name: 'HorizontalPanel1'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1632
             layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1633
             horizontalLayout: fitSpace
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1634
             verticalLayout: center
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1635
             horizontalSpace: 3
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1636
             verticalSpace: 3
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1637
             reverseOrderIfOKAtLeft: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1638
             component: 
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1639
            (SpecCollection
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1640
               collection: (
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1641
                (ActionButtonSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1642
                   label: 'Cancel'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1643
                   name: 'Button1'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1644
                   translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1645
                   tabable: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1646
                   model: cancel
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1647
                   extent: (Point 183 28)
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1648
                 )
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1649
                (ActionButtonSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1650
                   label: 'OK'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1651
                   name: 'Button2'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1652
                   translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1653
                   tabable: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1654
                   model: accept
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1655
                   extent: (Point 183 28)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1656
                 )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1657
                )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1658
              
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1659
             )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1660
             keepSpaceForOSXResizeHandleH: true
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1661
           )
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1662
          )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1663
        
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1664
       )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1665
     )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1666
!
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1667
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1668
cropSpec
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1669
    "This resource specification was automatically generated
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1670
     by the UIPainter of ST/X."
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1671
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1672
    "Do not manually edit this!! If it is corrupted,
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1673
     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
  1674
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1675
    "
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1676
     UIPainter new openOnClass:ImageEditor andSelector:#cropSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1677
     ImageEditor new openInterface:#cropSpec
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1678
    "
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1679
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1680
    <resource: #canvas>
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1681
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1682
    ^ 
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1683
    #(FullSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1684
       name: cropSpec
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1685
       window: 
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1686
      (WindowSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1687
         label: 'Crop Border(s)'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1688
         name: 'Crop Border(s)'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1689
         min: (Point 10 10)
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1690
         bounds: (Rectangle 0 0 364 312)
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1691
       )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1692
       component: 
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1693
      (SpecCollection
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1694
         collection: (
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1695
          (LabelSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1696
             label: 'Left:'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1697
             name: 'CropLeftLabel'
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1698
             layout: (LayoutFrame 14 0 24 0 90 0 46 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1699
             activeHelpKey: cropLeft
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1700
             translateLabel: true
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1701
             adjust: left
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1702
           )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1703
          (InputFieldSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1704
             name: 'CropLeftEntryField'
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1705
             layout: (LayoutFrame 95 0 24 0 125 0 46 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1706
             activeHelpKey: cropLeft
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1707
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1708
             model: cropLeftAmount
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1709
             type: number
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1710
             acceptChannel: acceptChannel
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1711
             acceptOnPointerLeave: false
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1712
           )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1713
          (ActionButtonSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1714
             label: 'Crop Now'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1715
             name: 'CropLeftNowButton'
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1716
             layout: (LayoutFrame 133 0 21 0 229 0 50 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1717
             activeHelpKey: cropLeft
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1718
             translateLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1719
             resizeForLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1720
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1721
             model: cropLeftNow
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1722
             autoRepeat: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1723
             usePreferredWidth: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1724
           )
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1725
          (ActionButtonSpec
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1726
             label: 'Auto'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1727
             name: 'Button6'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1728
             layout: (LayoutFrame 236 0 21 0 289 0 50 0)
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1729
             activeHelpKey: autoCropLeft
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1730
             translateLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1731
             resizeForLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1732
             tabable: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1733
             model: autoCropLeft
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1734
             autoRepeat: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1735
             usePreferredWidth: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1736
           )
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1737
          (LabelSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1738
             label: 'Right:'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1739
             name: 'CropRightLabel'
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1740
             layout: (LayoutFrame 14 0 55 0 90 0 77 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1741
             activeHelpKey: cropRight
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1742
             translateLabel: true
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1743
             adjust: left
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1744
           )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1745
          (InputFieldSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1746
             name: 'CropRightEntryField'
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1747
             layout: (LayoutFrame 95 0 55 0 125 0 77 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1748
             activeHelpKey: cropRight
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1749
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1750
             model: cropRightAmount
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1751
             type: number
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1752
             acceptChannel: acceptChannel
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1753
             acceptOnPointerLeave: false
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1754
           )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1755
          (ActionButtonSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1756
             label: 'Crop Now'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1757
             name: 'CropRightButton'
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1758
             layout: (LayoutFrame 133 0 51 0 229 0 80 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1759
             activeHelpKey: cropRight
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1760
             translateLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1761
             resizeForLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1762
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1763
             model: cropRightNow
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1764
             autoRepeat: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1765
             usePreferredWidth: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1766
           )
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1767
          (ActionButtonSpec
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1768
             label: 'Auto'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1769
             name: 'Button7'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1770
             layout: (LayoutFrame 236 0 51 0 289 0 80 0)
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1771
             activeHelpKey: autoCropRight
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1772
             translateLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1773
             resizeForLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1774
             tabable: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1775
             model: autoCropRight
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1776
             autoRepeat: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1777
             usePreferredWidth: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1778
           )
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1779
          (LabelSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1780
             label: 'Top:'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1781
             name: 'CropTopLabel'
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1782
             layout: (LayoutFrame 14 0 85 0 90 0 107 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1783
             activeHelpKey: cropTop
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1784
             translateLabel: true
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1785
             adjust: left
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1786
           )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1787
          (InputFieldSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1788
             name: 'CropTopEntryField'
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1789
             layout: (LayoutFrame 95 0 85 0 125 0 107 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1790
             activeHelpKey: cropTop
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1791
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1792
             model: cropTopAmount
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1793
             type: number
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1794
             acceptChannel: acceptChannel
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1795
             acceptOnPointerLeave: false
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1796
           )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1797
          (ActionButtonSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1798
             label: 'Crop Now'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1799
             name: 'CropTopButton'
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1800
             layout: (LayoutFrame 133 0 81 0 229 0 110 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1801
             activeHelpKey: cropTop
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1802
             translateLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1803
             resizeForLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1804
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1805
             model: cropTopNow
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1806
             autoRepeat: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1807
             usePreferredWidth: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1808
           )
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1809
          (ActionButtonSpec
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1810
             label: 'Auto'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1811
             name: 'Button8'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1812
             layout: (LayoutFrame 236 0 81 0 289 0 110 0)
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1813
             activeHelpKey: autoCropTop
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1814
             translateLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1815
             resizeForLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1816
             tabable: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1817
             model: autoCropTop
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1818
             autoRepeat: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1819
             usePreferredWidth: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1820
           )
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1821
          (LabelSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1822
             label: 'Bottom:'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1823
             name: 'CropBottomLabel'
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1824
             layout: (LayoutFrame 14 0 115 0 90 0 137 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1825
             activeHelpKey: cropBottom
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1826
             translateLabel: true
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1827
             adjust: left
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1828
           )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1829
          (InputFieldSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1830
             name: 'CropBottomEntryField'
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1831
             layout: (LayoutFrame 95 0 115 0 125 0 137 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1832
             activeHelpKey: cropBottom
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1833
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1834
             model: cropBottomAmount
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1835
             type: number
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1836
             acceptChannel: acceptChannel
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1837
             acceptOnPointerLeave: false
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1838
           )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1839
          (ActionButtonSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1840
             label: 'Crop Now'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1841
             name: 'CropBottomButton'
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1842
             layout: (LayoutFrame 133 0 111 0 229 0 140 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1843
             activeHelpKey: cropBottom
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1844
             translateLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1845
             resizeForLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1846
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1847
             model: cropBottomNow
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1848
             autoRepeat: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1849
             usePreferredWidth: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1850
           )
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1851
          (ActionButtonSpec
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1852
             label: 'Auto'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1853
             name: 'Button9'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1854
             layout: (LayoutFrame 236 0 111 0 289 0 140 0)
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1855
             activeHelpKey: autoCropBottom
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1856
             translateLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1857
             resizeForLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1858
             tabable: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1859
             model: autoCropBottom
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1860
             autoRepeat: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1861
             usePreferredWidth: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1862
           )
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1863
          (ActionButtonSpec
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1864
             label: 'All'
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1865
             name: 'Button4'
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1866
             layout: (LayoutFrame 133 0 148 0 229 0 176 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1867
             activeHelpKey: cropAll
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1868
             translateLabel: true
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1869
             resizeForLabel: true
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1870
             tabable: true
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1871
             model: applyCropAction
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1872
           )
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1873
          (HorizontalPanelViewSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1874
             name: 'HorizontalPanel1'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1875
             layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1)
3400
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  1876
             visibilityChannel: cropBoxIsDialog
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1877
             horizontalLayout: fitSpace
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1878
             verticalLayout: center
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1879
             horizontalSpace: 3
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1880
             verticalSpace: 3
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1881
             reverseOrderIfOKAtLeft: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1882
             component: 
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1883
            (SpecCollection
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1884
               collection: (
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1885
                (ActionButtonSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1886
                   label: 'Cancel'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1887
                   name: 'Button1'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1888
                   translateLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1889
                   resizeForLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1890
                   tabable: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1891
                   model: cancel
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1892
                   extent: (Point 116 28)
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1893
                 )
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1894
                (ActionButtonSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1895
                   label: 'Apply'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1896
                   name: 'Button3'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1897
                   translateLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1898
                   resizeForLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1899
                   tabable: true
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1900
                   model: applyCropAction
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1901
                   extent: (Point 116 28)
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1902
                 )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1903
                (ActionButtonSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1904
                   label: 'OK'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1905
                   name: 'Button2'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1906
                   translateLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1907
                   resizeForLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1908
                   tabable: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1909
                   model: accept
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1910
                   extent: (Point 116 28)
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1911
                 )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1912
                )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1913
              
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1914
             )
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1915
           )
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1916
          (ActionButtonSpec
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1917
             label: 'All'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1918
             name: 'Button10'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1919
             layout: (LayoutFrame 236 0 148 0 289 0 176 0)
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1920
             activeHelpKey: autoCropAll
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1921
             translateLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1922
             resizeForLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1923
             tabable: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1924
             model: autoCropAll
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1925
           )
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1926
          )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1927
        
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1928
       )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1929
     )
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1930
!
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1931
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1932
dialogSpecForNewImage
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1933
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1934
     by the UIPainter of ST/X."
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1935
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1936
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1937
     the UIPainter may not be able to read the specification."
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1938
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1939
    "
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1940
     UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  1941
     ImageEditor new openInterface:#dialogSpecForNewImage
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1942
    "
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1943
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1944
    <resource: #canvas>
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  1945
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  1946
    ^ 
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1947
    #(FullSpec
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1948
       name: dialogSpecForNewImage
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1949
       window: 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1950
      (WindowSpec
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1951
         label: 'New Image'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1952
         name: 'New Image'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1953
         min: (Point 10 10)
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1954
         bounds: (Rectangle 0 0 301 119)
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1955
       )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1956
       component: 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1957
      (SpecCollection
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1958
         collection: (
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1959
          (ViewSpec
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1960
             name: 'View'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1961
             layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 -35 1.0)
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1962
             level: 1
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1963
             component: 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1964
            (SpecCollection
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1965
               collection: (
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1966
                (FramedBoxSpec
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1967
                   label: 'Size'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1968
                   name: 'framedBox1'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1969
                   layout: (LayoutFrame 1 0.0 7 0.0 0 0.40000000000000002 76 0)
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1970
                   style: (FontDescription helvetica medium roman 12)
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1971
                   labelPosition: topLeft
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1972
                   translateLabel: true
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1973
                   component: 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1974
                  (SpecCollection
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1975
                     collection: (
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1976
                      (ComboBoxSpec
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1977
                         name: 'defaultSizesComboBox'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1978
                         layout: (LayoutFrame 0 0.0 10 0.0 0 1 35 0.0)
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1979
                         model: selectionOfSize
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1980
                         type: string
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1981
                         acceptOnPointerLeave: false
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1982
                         comboList: listOfDefaultSizes
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1983
                         isFilenameBox: false
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1984
                       )
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1985
                      )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1986
                    
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1987
                   )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1988
                 )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1989
                (FramedBoxSpec
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1990
                   label: 'Color Map'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1991
                   name: 'framedBox2'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1992
                   layout: (LayoutFrame 0 0.40000000000000002 7 0.0 -1 1.0 76 0)
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1993
                   style: (FontDescription helvetica medium roman 12)
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1994
                   labelPosition: topLeft
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1995
                   translateLabel: true
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1996
                   component: 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1997
                  (SpecCollection
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1998
                     collection: (
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  1999
                      (ComboListSpec
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2000
                         name: 'colorMapComboBox'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2001
                         layout: (LayoutFrame 0 0.0 10 0.0 0 1 35 0.0)
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2002
                         model: selectionOfColorMap
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2003
                         comboList: listOfColorMaps
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2004
                         useIndex: false
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2005
                         hidePullDownMenuButton: false
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2006
                       )
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2007
                      )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2008
                    
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2009
                   )
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  2010
                 )
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2011
                )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2012
              
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2013
             )
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  2014
           )
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2015
          (UISubSpecification
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2016
             name: 'windowSpecForCommitWithoutChannels'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2017
             layout: (LayoutFrame 2 0.0 -37 1 -2 1.0 -2 1.0)
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2018
             minorKey: windowSpecForCommitWithoutChannels
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2019
             keepSpaceForOSXResizeHandleH: true
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2020
           )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2021
          )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2022
        
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2023
       )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2024
     )
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  2025
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  2026
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2027
floodFillToleranceSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2028
    "This resource specification was automatically generated
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2029
     by the UIPainter of ST/X."
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2030
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2031
    "Do not manually edit this!! If it is corrupted,
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2032
     the UIPainter may not be able to read the specification."
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2033
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2034
    "
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2035
     UIPainter new openOnClass:ImageEditor andSelector:#floodFillToleranceSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2036
     ImageEditor new openInterface:#floodFillToleranceSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2037
    "
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2038
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2039
    <resource: #canvas>
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2040
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2041
    ^ 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2042
    #(FullSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2043
       name: floodFillToleranceSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2044
       window: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2045
      (WindowSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2046
         label: 'Flood Fill Tolerance'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2047
         name: 'Flood Fill Tolerance'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2048
         min: (Point 10 10)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2049
         bounds: (Rectangle 0 0 364 312)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2050
       )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2051
       component: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2052
      (SpecCollection
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2053
         collection: (
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2054
          (LabelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2055
             label: 'Flood Fill Tolerance:'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2056
             name: 'Label1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2057
             layout: (LayoutFrame 14 0 10 0 242 0 32 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2058
             activeHelpKey: floodFillMaxError
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2059
             visibilityChannel: cropBoxIsNotDialog
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2060
             translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2061
             adjust: left
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2062
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2063
          (LabelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2064
             label: 'Hue:'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2065
             name: 'Label2'
3440
4e18ffc36717 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3436
diff changeset
  2066
             layout: (LayoutFrame 29 0 38 0 127 0 60 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2067
             activeHelpKey: floodFillMaxError
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2068
             visibilityChannel: cropBoxIsNotDialog
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2069
             translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2070
             adjust: left
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2071
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2072
          (InputFieldSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2073
             name: 'EntryField2'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2074
             layout: (LayoutFrame 132 0 38 0 190 0 60 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2075
             activeHelpKey: floodFillMaxError
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2076
             visibilityChannel: cropBoxIsNotDialog
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2077
             tabable: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2078
             model: floodFillMaxHueError
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2079
             type: number
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2080
             acceptChannel: acceptChannel
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2081
             acceptOnPointerLeave: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2082
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2083
          (LabelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2084
             label: 'Light:'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2085
             name: 'Label3'
3440
4e18ffc36717 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3436
diff changeset
  2086
             layout: (LayoutFrame 29 0 64 0 127 0 86 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2087
             activeHelpKey: floodFillMaxError
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2088
             visibilityChannel: cropBoxIsNotDialog
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2089
             translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2090
             adjust: left
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2091
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2092
          (InputFieldSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2093
             name: 'EntryField3'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2094
             layout: (LayoutFrame 132 0 64 0 190 0 86 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2095
             activeHelpKey: floodFillMaxError
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2096
             visibilityChannel: cropBoxIsNotDialog
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2097
             tabable: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2098
             model: floodFillMaxLightError
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2099
             type: number
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2100
             acceptChannel: acceptChannel
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2101
             acceptOnPointerLeave: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2102
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2103
          (HorizontalPanelViewSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2104
             name: 'HorizontalPanel1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2105
             layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2106
             visibilityChannel: cropBoxIsDialog
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2107
             horizontalLayout: fitSpace
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2108
             verticalLayout: center
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2109
             horizontalSpace: 3
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2110
             verticalSpace: 3
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2111
             reverseOrderIfOKAtLeft: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2112
             component: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2113
            (SpecCollection
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2114
               collection: (
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2115
                (ActionButtonSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2116
                   label: 'Cancel'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2117
                   name: 'Button1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2118
                   translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2119
                   resizeForLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2120
                   tabable: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2121
                   model: cancel
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2122
                   extent: (Point 116 28)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2123
                 )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2124
                (ActionButtonSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2125
                   label: 'Apply'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2126
                   name: 'Button3'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2127
                   translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2128
                   resizeForLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2129
                   tabable: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2130
                   model: applyCropAction
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2131
                   extent: (Point 116 28)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2132
                 )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2133
                (ActionButtonSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2134
                   label: 'OK'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2135
                   name: 'Button2'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2136
                   translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2137
                   resizeForLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2138
                   tabable: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2139
                   model: accept
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2140
                   extent: (Point 116 28)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2141
                 )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2142
                )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2143
              
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2144
             )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2145
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2146
          )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2147
        
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2148
       )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2149
     )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2150
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2151
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2152
shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2153
    "This resource specification was automatically generated
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2154
     by the UIPainter of ST/X."
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2155
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2156
    "Do not manually edit this!! If it is corrupted,
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2157
     the UIPainter may not be able to read the specification."
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2158
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2159
    "
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2160
     UIPainter new openOnClass:ImageEditor andSelector:#shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2161
     ImageEditor new openInterface:#shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2162
    "
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2163
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2164
    <resource: #canvas>
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2165
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2166
    ^ 
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2167
     #(FullSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2168
        name: shiftDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2169
        window: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2170
       (WindowSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2171
          label: 'Shift'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2172
          name: 'Shift'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2173
          min: (Point 10 10)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2174
          bounds: (Rectangle 14 46 259 229)
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2175
        )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2176
        component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2177
       (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2178
          collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2179
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2180
              label: 'Amount:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2181
              name: 'AmountLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2182
              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
  2183
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2184
              adjust: right
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2185
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2186
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2187
              name: 'AmountEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2188
              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
  2189
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2190
              model: shiftAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2191
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2192
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2193
              acceptOnPointerLeave: false
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2194
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2195
           (HorizontalPanelViewSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2196
              name: 'HorizontalPanel1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2197
              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
  2198
              horizontalLayout: fitSpace
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2199
              verticalLayout: center
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2200
              horizontalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2201
              verticalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2202
              reverseOrderIfOKAtLeft: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2203
              component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2204
             (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2205
                collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2206
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2207
                    label: 'Cancel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2208
                    name: 'Button1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2209
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2210
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2211
                    model: cancel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2212
                    extent: (Point 118 22)
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2213
                  )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2214
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2215
                    label: 'OK'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2216
                    name: 'Button2'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2217
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2218
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2219
                    model: accept
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2220
                    extent: (Point 118 22)
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2221
                  )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2222
                 )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2223
               
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2224
              )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2225
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2226
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2227
              name: 'upArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2228
              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
  2229
              model: shiftUpNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2230
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2231
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2232
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2233
              direction: up
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2234
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2235
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2236
              name: 'leftArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2237
              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
  2238
              model: shiftLeftNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2239
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2240
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2241
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2242
              direction: left
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2243
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2244
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2245
              name: 'rightArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2246
              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
  2247
              model: shiftRightNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2248
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2249
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2250
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2251
              direction: right
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2252
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2253
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2254
              name: 'downArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2255
              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
  2256
              model: shiftDownNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2257
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2258
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2259
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2260
              direction: down
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2261
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2262
           (CheckBoxSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2263
              label: 'Wrap'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2264
              name: 'CheckBox1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2265
              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
  2266
              model: wrap
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2267
              translateLabel: true
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  2268
            )
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2269
           )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2270
         
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2271
        )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2272
      )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2273
!
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2274
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2275
uncropSpec
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2276
    "This resource specification was automatically generated
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2277
     by the UIPainter of ST/X."
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2278
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2279
    "Do not manually edit this!! If it is corrupted,
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2280
     the UIPainter may not be able to read the specification."
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2281
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2282
    "
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2283
     UIPainter new openOnClass:ImageEditor andSelector:#uncropSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2284
     ImageEditor new openInterface:#uncropSpec
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2285
    "
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2286
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2287
    <resource: #canvas>
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2288
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2289
    ^ 
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2290
    #(FullSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2291
       name: uncropSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2292
       window: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2293
      (WindowSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2294
         label: 'Add Border(s)'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2295
         name: 'Add Border(s)'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2296
         min: (Point 10 10)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2297
         max: (Point 800 478)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2298
         bounds: (Rectangle 0 0 261 228)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2299
       )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2300
       component: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2301
      (SpecCollection
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2302
         collection: (
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2303
          (LabelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2304
             label: 'Left:'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2305
             name: 'Label1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2306
             layout: (LayoutFrame 14 0 21 0 90 0 43 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2307
             translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2308
             adjust: right
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2309
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2310
          (InputFieldSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2311
             name: 'EntryField1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2312
             layout: (LayoutFrame 95 0 21 0 132 0 43 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2313
             model: cropLeftAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2314
             type: number
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2315
             acceptOnPointerLeave: false
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2316
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2317
          (LabelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2318
             label: 'Right:'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2319
             name: 'Label2'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2320
             layout: (LayoutFrame 14 0 51 0 90 0 73 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2321
             translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2322
             adjust: right
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2323
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2324
          (InputFieldSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2325
             name: 'EntryField2'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2326
             layout: (LayoutFrame 95 0 51 0 132 0 73 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2327
             model: cropRightAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2328
             type: number
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2329
             acceptOnPointerLeave: false
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2330
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2331
          (LabelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2332
             label: 'Top:'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2333
             name: 'Label3'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2334
             layout: (LayoutFrame 14 0 81 0 90 0 103 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2335
             translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2336
             adjust: right
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2337
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2338
          (InputFieldSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2339
             name: 'EntryField3'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2340
             layout: (LayoutFrame 95 0 81 0 132 0 103 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2341
             model: cropTopAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2342
             type: number
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2343
             acceptOnPointerLeave: false
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2344
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2345
          (LabelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2346
             label: 'Bottom:'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2347
             name: 'Label4'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2348
             layout: (LayoutFrame 14 0 111 0 90 0 133 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2349
             translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2350
             adjust: right
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2351
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2352
          (InputFieldSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2353
             name: 'EntryField4'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2354
             layout: (LayoutFrame 95 0 111 0 132 0 133 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2355
             model: cropBottomAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2356
             type: number
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2357
             acceptOnPointerLeave: false
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2358
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2359
          (HorizontalPanelViewSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2360
             name: 'HorizontalPanel1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2361
             layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2362
             horizontalLayout: fitSpace
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2363
             verticalLayout: center
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2364
             horizontalSpace: 3
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2365
             verticalSpace: 3
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2366
             reverseOrderIfOKAtLeft: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2367
             component: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2368
            (SpecCollection
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2369
               collection: (
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2370
                (ActionButtonSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2371
                   label: 'Cancel'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2372
                   name: 'Button1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2373
                   translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2374
                   model: cancel
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2375
                   extent: (Point 124 22)
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2376
                 )
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2377
                (ActionButtonSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2378
                   label: 'OK'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2379
                   name: 'Button2'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2380
                   translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2381
                   model: accept
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2382
                   extent: (Point 125 22)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2383
                 )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2384
                )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2385
              
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2386
             )
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2387
           )
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2388
          )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2389
        
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2390
       )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2391
     )
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2392
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2393
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2394
windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2395
    "This resource specification was automatically generated
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2396
     by the UIPainter of ST/X."
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2397
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2398
    "Do not manually edit this!! If it is corrupted,
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2399
     the UIPainter may not be able to read the specification."
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2400
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2401
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2402
     UIPainter new openOnClass:ImageEditor andSelector:#windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2403
     ImageEditor new openInterface:#windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2404
     ImageEditor open
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2405
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2406
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2407
    <resource: #canvas>
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2408
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2409
    ^ 
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2410
    #(FullSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2411
       name: windowSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2412
       window: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2413
      (WindowSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2414
         label: 'Image Editor'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2415
         name: 'Image Editor'
3443
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
  2416
         min: (Point 800 400)
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
  2417
         bounds: (Rectangle 0 0 800 446)
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2418
         menu: menu
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2419
         icon: defaultIcon
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2420
       )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2421
       component: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2422
      (SpecCollection
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2423
         collection: (
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2424
          (MenuPanelSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2425
             name: 'menuToolbarView'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2426
             layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0)
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2427
             style: (FontDescription helvetica medium roman 10)
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2428
             menu: menuToolbar
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2429
             showSeparatingLines: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2430
           )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2431
          (VariableHorizontalPanelSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2432
             name: 'mainPanel'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2433
             layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2434
             snapMode: both
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2435
             barLevel: 0
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2436
             component: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2437
            (SpecCollection
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2438
               collection: (
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2439
                (ViewSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2440
                   name: 'leftView'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2441
                   level: 1
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2442
                   component: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2443
                  (SpecCollection
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2444
                     collection: (
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2445
                      (VariableVerticalPanelSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2446
                         name: 'verticalPanel'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2447
                         layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2448
                         level: 0
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2449
                         snapMode: both
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2450
                         component: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2451
                        (SpecCollection
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2452
                           collection: (
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2453
                            (ViewSpec
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  2454
                               name: 'ColorAnCropBox'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2455
                               component: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2456
                              (SpecCollection
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2457
                                 collection: (
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2458
                                  (TabViewSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2459
                                     name: 'TabHeader1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2460
                                     layout: (LayoutFrame 0 0 0 0 0 1 36 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2461
                                     model: colorCropTabSelectionIndexHolder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2462
                                     menu: colorCropTabLabelList
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2463
                                     useIndex: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2464
                                     translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2465
                                   )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2466
                                  (ViewSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2467
                                     name: 'ColorBox'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2468
                                     layout: (LayoutFrame 0 0 36 0 0 1 0 1)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2469
                                     visibilityChannel: colorBoxVisibleHolder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2470
                                     component: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2471
                                    (SpecCollection
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2472
                                       collection: (
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2473
                                        (MenuPanelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2474
                                           name: 'MouseButtonColorToolBar'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2475
                                           layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2476
                                           level: 0
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2477
                                           menu: menuMouseButtonColors
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2478
                                         )
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2479
                                        (LabelSpec
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2480
                                           label: 'Label'
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2481
                                           name: 'Label1'
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2482
                                           layout: (LayoutFrame -160 1 0 0 -104 1 22 0)
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2483
                                           translateLabel: true
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2484
                                           labelChannel: alphaText
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2485
                                           visibilityChannel:  alphaVisibleHolder
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2486
                                           activeHelpKey: drawingAlpha
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2487
                                         )
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2488
                                        (InputFieldSpec
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2489
                                           name: 'EntryField1'
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2490
                                           layout: (LayoutFrame -106 1 2 0 -56 1 22 0)
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2491
                                           acceptOnReturn: true
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2492
                                           acceptOnTab: true
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2493
                                           acceptOnPointerLeave: true
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2494
                                           visibilityChannel:  alphaVisibleHolder
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2495
                                           activeHelpKey: drawingAlpha
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2496
                   model: alphaHolder
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2497
                   type: numberInRange
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2498
                   numChars: 3
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2499
                   minValue: 0
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2500
                   maxValue: 100
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2501
                                         )
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2502
                                        (ViewSpec
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2503
                                           name: 'Box1'
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2504
                                           layout: (LayoutFrame -40 1.0 4 0 -26 1.0 18 0)
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2505
                                           activeHelpKey: drawingColor1
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2506
                                           level: -1
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2507
                                           backgroundChannel: drawingColor1Holder
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2508
                                         )
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2509
                                        (ViewSpec
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2510
                                           name: 'Box2'
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2511
                                           layout: (LayoutFrame -25 1.0 4 0 -11 1.0 18 0)
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2512
                                           activeHelpKey: drawingColor2
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2513
                                           level: -1
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2514
                                           backgroundChannel: drawingColor2Holder
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2515
                                         )
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2516
                                        (DataSetSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2517
                                           name: 'colorDataSetView'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2518
                                           layout: (LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2519
                                           activeHelpKey: colorMapTable
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2520
                                           style: (FontDescription helvetica medium roman 10)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2521
                                           model: selectedColors
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2522
                                           menu: colorMapMenuHolder
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2523
                                           hasHorizontalScrollBar: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2524
                                           hasVerticalScrollBar: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2525
                                           miniScrollerHorizontal: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2526
                                           miniScrollerVertical: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2527
                                           dataList: listOfColors
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2528
                                           has3Dseparators: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2529
                                           doubleClickSelector: doubleClickOnColor:
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2530
                                           columnHolder: colorTableColumns
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2531
                                           multipleSelectOk: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2532
                                           verticalSpacing: 1
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2533
                                           columnAdaptor: colorColumnAdaptor
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2534
                                         )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2535
                                        )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2536
                                      
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2537
                                     )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2538
                                   )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2539
                                  (ViewSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2540
                                     name: 'FloodFillBox'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2541
                                     layout: (LayoutFrame 0 0 36 0 0 1 0 1)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2542
                                     visibilityChannel: floodFillBoxVisibleHolder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2543
                                     component: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2544
                                    (SpecCollection
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2545
                                       collection: (
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2546
                                        (UISubSpecification
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2547
                                           name: 'SubSpecification2'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2548
                                           layout: (LayoutFrame 0 0 0 0 0 1 0 1)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2549
                                           minorKey: floodFillToleranceSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2550
                                         )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2551
                                        )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2552
                                      
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2553
                                     )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2554
                                   )
3400
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2555
                                  (ViewSpec
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2556
                                     name: 'CropBox'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2557
                                     layout: (LayoutFrame 0 0 36 0 0 1 0 1)
3400
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2558
                                     visibilityChannel: cropBoxVisibleHolder
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2559
                                     component: 
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2560
                                    (SpecCollection
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2561
                                       collection: (
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2562
                                        (UISubSpecification
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2563
                                           name: 'SubSpecification1'
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2564
                                           layout: (LayoutFrame 0 0 0 0 0 1 0 1)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2565
                                           minorKey: cropSpec
3400
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2566
                                         )
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2567
                                        )
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2568
                                      
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2569
                                     )
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2570
                                   )
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2571
                                  )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2572
                                
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2573
                               )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2574
                             )
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2575
                            (ArbitraryComponentSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2576
                               name: 'imagePreView'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2577
                               activeHelpKey: previewView
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2578
                               menu: previewMenu
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2579
                               hasHorizontalScrollBar: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2580
                               hasVerticalScrollBar: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2581
                               miniScrollerHorizontal: false
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2582
                               miniScrollerVertical: false
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2583
                               hasBorder: false
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2584
                               component: ImageView
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2585
                             )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2586
                            )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2587
                          
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2588
                         )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2589
                         handles: (Any 0.5 1.0)
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2590
                       )
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2591
                      )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2592
                    
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2593
                   )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2594
                 )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2595
                (ViewSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2596
                   name: 'rightView'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2597
                   component: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2598
                  (SpecCollection
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2599
                     collection: (
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2600
                      (MenuPanelSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2601
                         name: 'ToolBar1'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2602
                         layout: (LayoutFrame 0 0 0 0.0 28 0 0 1.0)
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2603
                         level: 1
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2604
                         menu: toolsMenuToolbar
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2605
                         verticalLayout: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2606
                         centerItems: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2607
                         textDefault: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2608
                       )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2609
                      (ViewSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2610
                         name: 'editingView'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2611
                         layout: (LayoutFrame 28 0.0 0 0.0 0 1.0 0 1.0)
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2612
                         level: 1
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2613
                         component: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2614
                        (SpecCollection
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2615
                           collection: (
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2616
                            (ArbitraryComponentSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2617
                               name: 'imageEditView'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2618
                               layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0)
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2619
                               hasHorizontalScrollBar: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2620
                               hasVerticalScrollBar: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2621
                               hasBorder: false
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2622
                               component: ImageEditView
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2623
                             )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2624
                            (LabelSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2625
                               name: 'coordLabel'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2626
                               layout: (LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0)
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2627
                               level: -1
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2628
                               translateLabel: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2629
                               labelChannel: imageInfoHolder
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2630
                               resizeForLabel: false
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2631
                               adjust: left
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2632
                             )
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2633
                            (ArrowButtonSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2634
                               name: 'magnifyDownButton'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2635
                               layout: (LayoutFrame -80 1 -22 1 -58 1 0 1)
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2636
                               activeHelpKey: magnifyImageDown
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2637
                               translateLabel: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2638
                               model: doMagnifyDown
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2639
                               enableChannel: imageIsLoadedHolder
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2640
                               isTriggerOnDown: true
3479
8053bda07548 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3478
diff changeset
  2641
                               autoRepeat: true
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2642
                               direction: left
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2643
                             )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2644
                            (ArrowButtonSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2645
                               name: 'magnifyUpButton'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2646
                               layout: (LayoutFrame -24 1 -22 1 -2 1 0 1)
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2647
                               activeHelpKey: magnifyImageUp
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2648
                               translateLabel: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2649
                               model: doMagnifyUp
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2650
                               enableChannel: imageIsLoadedHolder
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2651
                               isTriggerOnDown: true
3479
8053bda07548 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3478
diff changeset
  2652
                               autoRepeat: true
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2653
                               direction: right
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2654
                             )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2655
                            (InputFieldSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2656
                               name: 'magnificationInputField'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2657
                               layout: (LayoutFrame -57 1 -22 1 -26 1 0 1)
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2658
                               activeHelpKey: magnificationNumber
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2659
                               enableChannel: imageIsLoadedHolder
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2660
                               model: magnificationHolder
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2661
                               type: numberInRange
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2662
                               acceptOnReturn: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2663
                               acceptOnTab: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2664
                               numChars: 2
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2665
                               minValue: 1
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2666
                               maxValue: 99
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2667
                               acceptOnPointerLeave: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2668
                             )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2669
                            )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2670
                          
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2671
                         )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2672
                       )
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2673
                      )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2674
                    
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2675
                   )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2676
                 )
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2677
                )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2678
              
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2679
             )
3443
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
  2680
             handles: (Any 0.47999999999999998 1.0)
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2681
           )
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2682
          (UISubSpecification
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2683
             name: 'infoBarSubSpec'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2684
             layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2685
             majorKey: ToolApplicationModel
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2686
             minorKey: windowSpecForInfoBar
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2687
           )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2688
          )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2689
        
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2690
       )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2691
     )
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2692
3488
e9655ba452c7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3487
diff changeset
  2693
    "Modified: / 05-09-2017 / 10:46:56 / cg"
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2694
! !
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2695
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2696
!ImageEditor class methodsFor:'menu specs'!
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2697
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2698
colorMapMenu
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2699
    "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
  2700
     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
  2701
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2702
    "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
  2703
     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
  2704
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2705
    "
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2706
     MenuEditor new openOnClass:ImageEditor andSelector:#colorMapMenu
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2707
     (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
  2708
    "
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2709
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2710
    <resource: #menu>
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2711
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2712
    ^ 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2713
     #(Menu
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2714
        (
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2715
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2716
            enabled: canAddColorToColormapHolder
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2717
            label: 'Add Color'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2718
            itemValue: addColorToColormap
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2719
            translateLabel: true
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2720
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2721
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2722
            enabled: canAddColorToColormapHolder
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  2723
            label: 'Add & Paste Color'
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  2724
            itemValue: addPastedColorToColormap
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  2725
            translateLabel: true
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  2726
          )
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  2727
         (MenuItem
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  2728
            enabled: canAddColorToColormapHolder
2539
3fa0fde65f75 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2520
diff changeset
  2729
            label: 'Pick and Add Color...'
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2730
            itemValue: pickAndAddColorToColormap
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2731
            translateLabel: true
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2732
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2733
         (MenuItem
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2734
            label: '-'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2735
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2736
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2737
            enabled: hasColormapAndSingleColorSelectedHolder
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2738
            label: 'Cut Color'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2739
            itemValue: cutColorFromColormap
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2740
            translateLabel: true
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2741
            isVisible: false
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2742
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2743
         (MenuItem
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2744
            enabled: hasSingleColorSelectedHolder
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2745
            label: 'Copy Color'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2746
            itemValue: copyColorFromColormap
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2747
            translateLabel: true
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  2748
            shortcutKey: Copy
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2749
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2750
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2751
            enabled: hasColormapAndSingleWritableColorSelectedHolder
2539
3fa0fde65f75 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2520
diff changeset
  2752
            label: 'Pick and Paste Color...'
1933
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  2753
            itemValue: pickAndPasteColor
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2754
            translateLabel: true
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2755
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2756
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2757
            enabled: canChangeColorInColormapHolder
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2758
            label: 'Paste Color'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2759
            itemValue: pasteColorIntoColormap
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2760
            translateLabel: true
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  2761
            shortcutKey: Paste
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2762
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2763
         (MenuItem
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2764
            label: '-'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2765
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2766
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2767
            enabled: hasColormapAndSingleWritableColorSelectedHolder
2539
3fa0fde65f75 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2520
diff changeset
  2768
            label: 'Edit Color...'
1931
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  2769
            itemValue: editSelectedColor
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  2770
            translateLabel: true
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  2771
          )
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  2772
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2773
            enabled: hasColormapAndSingleWritableColorSelectedHolder
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2774
            label: 'Brighter'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2775
            itemValue: makeSelectedColorBrighter
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2776
            translateLabel: true
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2777
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2778
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2779
            enabled: hasColormapAndSingleWritableColorSelectedHolder
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2780
            label: 'Darker'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2781
            itemValue: makeSelectedColorDarker
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2782
            translateLabel: true
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2783
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2784
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2785
            enabled: hasColormapAndSingleWritableColorSelectedHolder
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2786
            label: 'Make Gray'
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2787
            itemValue: makeSelectedColorGray
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2788
            translateLabel: true
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2789
          )
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  2790
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2791
            enabled: hasColormapAndSingleWritableColorSelectedHolder
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2792
            label: 'Color Shift'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2793
            itemValue: makeSelectedColorShifted
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2794
            translateLabel: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2795
          )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2796
         (MenuItem
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2797
            label: '-'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2798
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2799
         (MenuItem
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2800
            enabled: hasSingleColorSelectedHolder
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2801
            label: 'Inspect Color'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2802
            itemValue: inspectColor
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2803
            translateLabel: true
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2804
          )
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2805
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2806
            enabled: imageHasColormapHolder
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2807
            label: 'Inspect Colormap'
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2808
            itemValue: inspectColormap
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2809
            translateLabel: true
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2810
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2811
         )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2812
        nil
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2813
        nil
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2814
      )
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2815
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  2816
    "Modified: / 08-10-2017 / 15:02:33 / cg"
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2817
!
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2818
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2819
menu
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2820
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2821
     by the MenuEditor of ST/X."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2822
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2823
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2824
     the MenuEditor may not be able to read the specification."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2825
228524287573 intitial checkin
tz
parents:
diff changeset
  2826
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  2827
     MenuEditor new openOnClass:ImageEditor andSelector:#menu
228524287573 intitial checkin
tz
parents:
diff changeset
  2828
     (Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
  2829
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  2830
228524287573 intitial checkin
tz
parents:
diff changeset
  2831
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
  2832
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2833
    ^ 
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2834
     #(Menu
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2835
        (
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2836
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2837
            label: '&File'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2838
            translateLabel: true
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2839
            submenuChannel: menuFile
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2840
            "/ keepLinkedMenu: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2841
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2842
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2843
            label: 'Edit'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2844
            translateLabel: true
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2845
            submenuChannel: menuEdit
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2846
            "/ keepLinkedMenu: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2847
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2848
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2849
            label: 'Mode'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2850
            translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2851
            submenuChannel: modeMenu
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  2852
            isVisible: modeMenuVisible
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2853
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2854
         (MenuItem
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  2855
            label: 'Image'
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2856
            translateLabel: true
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2857
            submenuChannel: menuColors
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2858
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2859
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2860
            label: 'Settings'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2861
            translateLabel: true
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2862
            submenuChannel: menuSettings
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2863
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2864
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2865
            label: 'History'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2866
            translateLabel: true
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  2867
            isVisible: isStandAlone
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2868
            submenuChannel: menuHistory
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2869
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2870
         (MenuItem
2136
bb10485fa455 support '?' as help (for now: controlled by resources)
Claus Gittinger <cg@exept.de>
parents: 2125
diff changeset
  2871
            label: 'MENU_Help'
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2872
            translateLabel: true
2125
22ad4aa3e495 #conditionalRight
Claus Gittinger <cg@exept.de>
parents: 2073
diff changeset
  2873
            startGroup: conditionalRight
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2874
            submenuChannel: menuHelp
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2875
          )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2876
         )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2877
        nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2878
        nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2879
      )
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  2880
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  2881
    "Modified: / 23-10-2017 / 10:39:43 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2882
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2883
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2884
menuColors
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2885
    "This resource specification was automatically generated
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2886
     by the MenuEditor of ST/X."
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2887
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2888
    "Do not manually edit this!! If it is corrupted,
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2889
     the MenuEditor may not be able to read the specification."
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2890
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  2891
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2892
    "
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2893
     MenuEditor new openOnClass:ImageEditor andSelector:#menuColors
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2894
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuColors)) startUp
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2895
    "
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2896
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2897
    <resource: #menu>
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2898
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2899
    ^ 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2900
     #(Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2901
        (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2902
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  2903
            enabled: imageIsLoaded
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2904
            label: 'Depth'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2905
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2906
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2907
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2908
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2909
                  activeHelpKey: colorMap1
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  2910
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2911
                  label: '1-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2912
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2913
                  argument: depth1
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2914
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2915
                  choiceValue: depth1
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2916
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2917
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2918
                  activeHelpKey: colorMap1M
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  2919
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2920
                  label: '1-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2921
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2922
                  argument: masked1
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2923
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2924
                  choiceValue: masked1
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2925
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2926
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2927
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2928
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2929
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2930
                  activeHelpKey: colorMap2
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  2931
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2932
                  label: '2-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2933
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2934
                  argument: depth2
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2935
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2936
                  choiceValue: depth2
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2937
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2938
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2939
                  activeHelpKey: colorMap2M
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  2940
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2941
                  label: '2-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2942
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2943
                  argument: masked2
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2944
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2945
                  choiceValue: masked2
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2946
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2947
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2948
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2949
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2950
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2951
                  activeHelpKey: colorMap4
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  2952
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2953
                  label: '4-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2954
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2955
                  argument: depth4
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2956
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2957
                  choiceValue: depth4
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2958
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2959
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2960
                  activeHelpKey: colorMap4M
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  2961
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2962
                  label: '4-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2963
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2964
                  argument: masked4
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2965
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2966
                  choiceValue: masked4
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2967
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2968
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2969
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2970
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2971
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2972
                  activeHelpKey: colorMap8
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  2973
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2974
                  label: '8-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2975
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2976
                  argument: depth8
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2977
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2978
                  choiceValue: depth8
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2979
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2980
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2981
                  activeHelpKey: colorMap8M
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  2982
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2983
                  label: '8-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2984
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2985
                  argument: masked8
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2986
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2987
                  choiceValue: masked8
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2988
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2989
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2990
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2991
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2992
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2993
                  activeHelpKey: colorMap16
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  2994
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2995
                  label: '16-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2996
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2997
                  argument: depth16
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2998
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2999
                  choiceValue: depth16
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3000
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3001
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3002
                  activeHelpKey: colorMap16M
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3003
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3004
                  label: '16-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3005
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3006
                  argument: masked16
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3007
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3008
                  choiceValue: masked16
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3009
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3010
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3011
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3012
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3013
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3014
                  activeHelpKey: colorMap24
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3015
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3016
                  label: '24-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3017
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3018
                  argument: depth24
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3019
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3020
                  choiceValue: depth24
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3021
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3022
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3023
                  activeHelpKey: colorMap24M
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3024
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3025
                  label: '24-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3026
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3027
                  argument: masked24
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3028
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3029
                  choiceValue: masked24
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3030
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3031
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3032
                  label: '-'
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
                  activeHelpKey: colorMap32
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3036
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3037
                  label: '32-Plane (rgba)'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3038
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3039
                  argument: depth32
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3040
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3041
                  choiceValue: depth32
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3042
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3043
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3044
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3045
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3046
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3047
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3048
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3049
            enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3050
            label: 'ColorMap'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3051
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3052
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3053
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3054
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3055
                  activeHelpKey: compressColormap
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3056
                  enabled: hasColormapHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3057
                  label: 'Compress Colormap'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3058
                  itemValue: #'menu_compressColorMap'
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3059
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3060
               (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3061
                  enabled: hasColormapHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3062
                  label: 'Sort Colormap'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3063
                  itemValue: #'menu_sortColorMap'
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3064
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3065
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3066
                  label: 'Reduce Number of Colors by Rounding...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3067
                  itemValue: reduceNumberOfColors2
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3068
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3069
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3070
                  label: 'Reduce Number of Colors by Masking Bits...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3071
                  itemValue: reduceNumberOfColors
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  3072
                )
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3073
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3074
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3075
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3076
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3077
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3078
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3079
            enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3080
            label: 'Process'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3081
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3082
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3083
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3084
               (MenuItem
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3085
                  label: 'Negative'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3086
                  itemValue: makeNegative
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3087
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3088
               (MenuItem
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3089
                  label: 'Invert Pixel Bits'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3090
                  itemValue: makeInvertedBits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3091
                  isVisible: hasColormap
3458
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3092
                )
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3093
               (MenuItem
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3094
                  label: '-'
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3095
                )
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3096
               (MenuItem
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3097
                  enabled: allowedToChangeImageDimensionAndDepth
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3098
                  label: 'Make dithered 8Bit Palette'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3099
                  itemValue: makeDitheredPaletteImage
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3100
                  isVisible: false
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3101
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3102
               (MenuItem
3458
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3103
                  label: 'Dither to Depth...'
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3104
                  itemValue: ditherToDepth
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3105
                )
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3106
               (MenuItem
3471
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  3107
                  label: 'Threshold to Depth...'
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  3108
                  itemValue: thresholdToDepth
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3109
                )
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3110
               (MenuItem
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3111
                  label: '-'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3112
                )
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3113
               (MenuItem
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3114
                  label: 'Make Monochrome...'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3115
                  itemValue: makeMonochromeImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3116
                )
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3117
               (MenuItem
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3118
                  label: 'Make GrayScale (same Depth)'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3119
                  itemValue: makeGrayScaleImage
3471
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  3120
                )
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  3121
               (MenuItem
3460
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  3122
                  label: 'Make GrayScale with Depth (Dither)...'
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  3123
                  itemValue: ditherGrayToDepth
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  3124
                )
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  3125
               (MenuItem
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  3126
                  label: 'Make GrayScale with Depth (Threshold)...'
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  3127
                  itemValue: thresholdGrayToDepth
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3128
                )
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3129
               (MenuItem
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3130
                  label: 'Make GrayScale with N Gray Colors (Dither)...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3131
                  itemValue: ditherToNumberOfGrayColors
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3132
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3133
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3134
                  label: 'Make GrayScale with N Gray Colors (Threshold)...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3135
                  itemValue: thresholdToNumberOfGrayColors
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3136
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3137
               (MenuItem
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3138
                  label: '-'
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3139
                )
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3140
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3141
                  label: 'Make Slightly Brighter'
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3142
                  itemValue: makeSlightlyBrighter
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3143
                )
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3144
               (MenuItem
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3145
                  label: 'Make Brighter'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3146
                  itemValue: makeBrighter
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3147
                )
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3148
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3149
                  label: 'Make Slightly Darker'
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3150
                  itemValue: makeSlightlyDarker
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3151
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3152
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3153
                  label: 'Make Darker'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3154
                  itemValue: makeDarker
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3155
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3156
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3157
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3158
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3159
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3160
                  label: 'Change HLS...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3161
                  itemValue: changeHLS
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3162
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3163
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3164
                  label: 'Colorize...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3165
                  itemValue: colorize
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3166
                )
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3167
               (MenuItem
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3168
                  enabled: imageIsLoadedHolder
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3169
                  label: 'Brighten'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3170
                  itemValue: doBrightenImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3171
                )
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3172
               (MenuItem
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3173
                  enabled: imageIsLoadedHolder
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3174
                  label: 'Darken'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3175
                  itemValue: doDarkenImage
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3176
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3177
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3178
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3179
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3180
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3181
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3182
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3183
            enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3184
            label: 'Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3185
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3186
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3187
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3188
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3189
                  activeHelpKey: copyMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3190
                  enabled: hasMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3191
                  label: 'Copy Mask'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3192
                  itemValue: #'menu_copyMask'
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3193
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3194
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3195
                  activeHelpKey: pasteMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3196
                  enabled: hasMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3197
                  label: 'Paste Mask'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3198
                  itemValue: #'menu_pasteMask'
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3199
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3200
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3201
                  enabled: hasMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3202
                  label: 'Clear Masked Pixels'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3203
                  itemValue: #'menu_clearMaskedPixels'
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  3204
                )
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  3205
               (MenuItem
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  3206
                  enabled: hasMask
2653
f0e64b82fa93 changed: #menuColors
Claus Gittinger <cg@exept.de>
parents: 2652
diff changeset
  3207
                  label: 'Clear Colormap Entry for Masked Pixels'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3208
                  itemValue: #'menu_clearColormapEntry0AndMaskedPixels'
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3209
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3210
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3211
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3212
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3213
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3214
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3215
         )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3216
        nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3217
        nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3218
      )
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3219
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3220
    "Modified: / 23-10-2017 / 11:18:58 / cg"
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3221
!
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3222
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3223
menuEdit
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3224
    "This resource specification was automatically generated
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3225
     by the MenuEditor of ST/X."
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3226
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3227
    "Do not manually edit this!! If it is corrupted,
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3228
     the MenuEditor may not be able to read the specification."
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3229
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3230
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3231
    "
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3232
     MenuEditor new openOnClass:ImageEditor andSelector:#menuEdit
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3233
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuEdit)) startUp
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3234
    "
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3235
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3236
    <resource: #menu>
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3237
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3238
    ^ 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3239
     #(Menu
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3240
        (
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3241
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3242
            activeHelpKey: editUndo
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3243
            enabled: canUndoHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3244
            label: 'Undo'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3245
            itemValue: doUndo
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3246
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3247
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3248
            label: '-'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3249
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3250
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3251
            enabled: imageIsLoadedHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3252
            label: 'Copy to Clipboard'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3253
            itemValue: doCopyImageToClipboard
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3254
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3255
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3256
            label: '-'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3257
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3258
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3259
            activeHelpKey: editResize
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3260
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3261
            label: 'Resize...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3262
            itemValue: doResizeImage
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3263
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3264
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3265
            activeHelpKey: editMagnifyImage
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3266
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3267
            label: 'Magnify...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3268
            itemValue: doMagnifyImage
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3269
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3270
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3271
            activeHelpKey: editMagnifyImage
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3272
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3273
            label: 'Magnify By...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3274
            itemValue: doMagnifyImageBy
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3275
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3276
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3277
            activeHelpKey: editRotate
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3278
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3279
            label: 'Rotate...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3280
            itemValue: doRotateImage
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3281
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3282
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3283
            activeHelpKey: edit3DProjection
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3284
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3285
            label: '3D Projection...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3286
            itemValue: do3DProjection
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3287
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3288
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3289
            enabled: imageIsLoadedAndAllowedToFlipHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3290
            label: 'Flip'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3291
            submenu: 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3292
           (Menu
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3293
              (
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3294
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3295
                  activeHelpKey: editFlipVertical
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3296
                  enabled: imageIsLoadedAndNotReadonlyHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3297
                  label: 'Flip - Vertical'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3298
                  itemValue: doFlipVertical
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3299
                  labelImage: (ResourceRetriever ImageEditor flipVerticalIcon 'Flip - Vertical')
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3300
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3301
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3302
                  activeHelpKey: editFlipHorizontal
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3303
                  enabled: imageIsLoadedAndNotReadonlyHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3304
                  label: 'Flip - Horizontal'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3305
                  itemValue: doFlipHorizontal
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3306
                  labelImage: (ResourceRetriever ImageEditor flipHorizontalIcon 'Flip - Horizontal')
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3307
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3308
               )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3309
              nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3310
              nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3311
            )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3312
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3313
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3314
            label: '-'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3315
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3316
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3317
            enabled: imageIsLoadedAndAllowedToChangeImageDimension
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3318
            label: 'Crop'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3319
            submenu: 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3320
           (Menu
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3321
              (
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3322
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3323
                  activeHelpKey: cropManual
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3324
                  label: 'Manual...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3325
                  itemValue: doCropManual
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3326
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3327
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3328
                  label: '-'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3329
                  isVisible: false
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3330
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3331
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3332
                  activeHelpKey: autoCropAll
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3333
                  label: 'All'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3334
                  itemValue: autoCropAll
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3335
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3336
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3337
                  label: '-'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3338
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3339
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3340
                  activeHelpKey: autoCropLeft
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3341
                  label: 'Left'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3342
                  itemValue: autoCropLeft
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3343
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3344
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3345
                  activeHelpKey: autoCropRight
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3346
                  label: 'Right'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3347
                  itemValue: autoCropRight
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3348
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3349
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3350
                  activeHelpKey: autoCropTop
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3351
                  label: 'Top'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3352
                  itemValue: autoCropTop
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3353
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3354
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3355
                  activeHelpKey: autoCropBottom
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3356
                  label: 'Bottom'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3357
                  itemValue: autoCropBottom
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3358
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3359
               )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3360
              nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3361
              nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3362
            )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3363
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3364
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3365
            activeHelpKey: uncropManual
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3366
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3367
            label: 'Uncrop (Add Border)...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3368
            itemValue: doUnCropManual
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3369
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3370
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3371
            activeHelpKey: shiftManual
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3372
            enabled: imageIsLoadedAndAllowedToChangeImageDimension
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3373
            label: 'Shift...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3374
            itemValue: doShiftManual
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3375
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3376
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3377
            label: '-'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3378
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3379
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3380
            activeHelpKey: fileEditMask
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3381
            enabled: hasMaskHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3382
            label: 'Edit Mask'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3383
            itemValue: doEditMask
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3384
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3385
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3386
            enabled: imageIsLoadedAndNotReadonlyHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3387
            label: 'Text...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3388
            itemValue: doInsertTextFromUser
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3389
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3390
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3391
            label: '-'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3392
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3393
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3394
            enabled: imageIsLoadedHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3395
            label: 'Animation Sequence'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3396
            submenu: 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3397
           (Menu
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3398
              (
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3399
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3400
                  enabled: imageHasNextImageHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3401
                  label: 'Next in Sequence'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3402
                  itemValue: nextImageInSequence
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3403
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3404
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3405
                  enabled: imageHasPreviousImageHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3406
                  label: 'Previous in Sequence'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3407
                  itemValue: previousImageInSequence
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3408
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3409
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3410
                  label: '-'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3411
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3412
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3413
                  enabled: imageHasImageSequenceHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3414
                  label: 'Edit each from Sequence'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3415
                  itemValue: editEachImageFromSequence
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3416
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3417
               )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3418
              nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3419
              nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3420
            )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3421
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3422
         )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3423
        nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3424
        nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3425
      )
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3426
!
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3427
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3428
menuFile
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3429
    "This resource specification was automatically generated
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3430
     by the MenuEditor of ST/X."
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3431
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3432
    "Do not manually edit this!! If it is corrupted,
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3433
     the MenuEditor may not be able to read the specification."
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3434
3022
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  3435
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3436
    "
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3437
     MenuEditor new openOnClass:ImageEditor andSelector:#menuFile
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3438
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuFile)) startUp
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3439
    "
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3440
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3441
    <resource: #menu>
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3442
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3443
    ^ 
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3444
     #(Menu
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3445
        (
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3446
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3447
            activeHelpKey: fileNewImageEditor
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3448
            label: 'New ImageEditor'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3449
            itemValue: doNewImageEditor
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3450
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3451
         (MenuItem
2876
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3452
            label: '-'
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3453
          )
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3454
         (MenuItem
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3455
            activeHelpKey: fileNewImage
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3456
            label: 'New...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3457
            itemValue: doNewImage
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3458
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3459
         (MenuItem
3200
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  3460
            activeHelpKey: fileNewImageFromClipboard
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3461
            label: 'New from ClipBoard'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3462
            itemValue: doNewImageFromClipboard
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3463
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3464
         (MenuItem
3200
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  3465
            activeHelpKey: fileNewMaskFromClipboard
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  3466
            label: 'Mask from ClipBoard'
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  3467
            itemValue: doNewMaskFromClipboard
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  3468
          )
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  3469
         (MenuItem
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3470
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3471
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3472
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3473
            activeHelpKey: fileLoadFromClass
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3474
            label: 'Load...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3475
            itemValue: doLoadFromClass
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  3476
            isVisible: methodSaveAndLoadMenuItemsVisible
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3477
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3478
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3479
            activeHelpKey: fileLoadFromFile
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3480
            label: 'Load from File...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3481
            itemValue: doLoadFromFile
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3482
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3483
         (MenuItem
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  3484
            activeHelpKey: fileLoadFromURL
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  3485
            label: 'Load from URL...'
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  3486
            itemValue: doLoadFromURL
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  3487
          )
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  3488
         (MenuItem
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3489
            label: 'Grab'
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3490
            submenu: 
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3491
           (Menu
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3492
              (
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3493
               (MenuItem
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3494
                  activeHelpKey: fileGrabImageFromScreen
2717
fac7e5156235 changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2712
diff changeset
  3495
                  label: 'Grab from Screen Area...'
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3496
                  itemValue: grabScreenImage
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3497
                )
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3498
               (MenuItem
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3499
                  activeHelpKey: fileGrabImageFromScreen
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3500
                  enabled: hasLastGrabScreenArea
2711
4700f54d0040 changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2708
diff changeset
  3501
                  label: 'Grab again from same Screen Area'
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3502
                  itemValue: grabScreenImageFromLastArea
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3503
                )
2771
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3504
               (MenuItem
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3505
                  label: '-'
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3506
                )
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3507
               (MenuItem
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3508
                  activeHelpKey: fileGrabImageFromWindow
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3509
                  label: 'Grab from Window...'
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3510
                  itemValue: grabWindowImage
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3511
                )
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  3512
               (MenuItem
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  3513
                  activeHelpKey: fileGrabFullSreenImage
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  3514
                  label: 'Grab from whole Screen'
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  3515
                  itemValue: grabFullScreenImage
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  3516
                )
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3517
               )
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3518
              nil
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3519
              nil
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3520
            )
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  3521
          )
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  3522
         (MenuItem
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3523
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3524
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3525
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3526
            activeHelpKey: fileSaveMethod
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3527
            enabled: imageIsLoadedAndClassDefined
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3528
            label: 'Save'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3529
            itemValue: doSaveMethod
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  3530
            isVisible: methodSaveAndLoadMenuItemsVisible
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3531
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3532
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3533
            activeHelpKey: fileSaveMethodAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3534
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3535
            label: 'Save As...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3536
            itemValue: doSaveMethodAs
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  3537
            isVisible: methodSaveAndLoadMenuItemsVisible
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3538
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3539
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3540
            activeHelpKey: fileSaveAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3541
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3542
            label: 'Save to File...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3543
            itemValue: doSaveImageFileAs
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3544
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3545
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3546
            activeHelpKey: fileSaveMaskAs
3411
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  3547
            enabled: hasMaskHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3548
            label: 'Save Mask to File...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3549
            itemValue: doSaveImageMaskFileAs
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3550
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3551
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3552
            activeHelpKey: fileSaveButtonImageAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3553
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3554
            label: 'Save as Button to File...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3555
            itemValue: doSaveButtonImageToFileAs
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3556
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3557
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3558
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3559
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3560
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3561
            activeHelpKey: filePrint
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3562
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3563
            label: 'Print'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3564
            itemValue: doPrint
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3565
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3566
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3567
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3568
            isVisible: isStandAlone
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3569
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3570
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3571
            activeHelpKey: fileBrowseClass
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3572
            enabled: hasClassDefinedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3573
            label: 'Browse Class'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3574
            itemValue: doBrowseClass
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3575
            isVisible: isStandAlone
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3576
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3577
         (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3578
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3579
            label: 'Inspect Image'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3580
            itemValue: doInspectImage
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3581
            isVisible: isStandAlone
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3582
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3583
         (MenuItem
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3584
            activeHelpKey: fileShowStoreString
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3585
            enabled: imageIsLoadedHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3586
            label: 'Show storeString'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3587
            itemValue: doShowStoreString
3022
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  3588
          )
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  3589
         (MenuItem
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  3590
            activeHelpKey: fileShowStoreString
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  3591
            enabled: imageIsLoadedHolder
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  3592
            label: 'Show Pixel Array Literal String'
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  3593
            itemValue: doShowPixelArrayLiteralString
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3594
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3595
         (MenuItem
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3596
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3597
            isVisible: isStandAlone
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3598
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3599
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3600
            activeHelpKey: fileExit
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3601
            label: 'Exit'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3602
            itemValue: closeRequest
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3603
            isVisible: isStandAlone
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3604
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3605
         )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3606
        nil
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3607
        nil
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3608
      )
3411
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  3609
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  3610
    "Modified: / 25-02-2017 / 12:40:30 / cg"
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3611
!
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3612
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3613
menuMouseButtonColors
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3614
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3615
     by the MenuEditor of ST/X."
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3616
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3617
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3618
     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
  3619
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3620
    "
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3621
     MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3622
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3623
    "
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3624
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3625
    <resource: #menu>
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3626
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3627
    ^
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3628
     
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3629
       #(#Menu
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3630
          
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3631
           #(
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3632
             #(#MenuItem
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3633
                #label: 'Left Mouse Button'
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3634
                #nameKey: #leftMouseKeyButton
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3635
                #activeHelpKey: #mouseKeyColorMode
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3636
                #enabled: #imageIsLoadedHolder
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3637
                #labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3638
                #choice: #mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3639
                #choiceValue: 1
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3640
            )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3641
             #(#MenuItem
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3642
                #label: 'Right Mouse Button'
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3643
                #nameKey: #rightMouseKeyButton
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3644
                #activeHelpKey: #mouseKeyColorMode
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3645
                #enabled: #imageIsLoadedHolder
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3646
                #labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3647
                #choice: #mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3648
                #choiceValue: 2
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3649
            )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3650
          ) nil
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3651
          nil
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3652
      )
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3653
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3654
    "Modified: / 04-07-2010 / 10:17:37 / cg"
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3655
!
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3656
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3657
menuSettings
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3658
    "This resource specification was automatically generated
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3659
     by the MenuEditor of ST/X."
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3660
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3661
    "Do not manually edit this!! If it is corrupted,
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3662
     the MenuEditor may not be able to read the specification."
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3663
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3664
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3665
    "
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3666
     MenuEditor new openOnClass:ImageEditor andSelector:#menuSettings
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3667
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuSettings)) startUp
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3668
    "
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3669
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3670
    <resource: #menu>
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3671
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3672
    ^ 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3673
     #(Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3674
        (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3675
         (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3676
            activeHelpKey: settingsGridMagnification
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3677
            label: 'Grid Magnification Limit...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3678
            itemValue: doChangeGridMagnification
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3679
            translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3680
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3681
         (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3682
            label: 'Pen'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3683
            translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3684
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3685
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3686
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3687
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3688
                  label: '1'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3689
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3690
                  choice: penWidthHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3691
                  choiceValue: 1
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3692
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3693
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3694
                  label: '5'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3695
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3696
                  choice: penWidthHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3697
                  choiceValue: 5
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3698
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3699
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3700
                  label: '10'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3701
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3702
                  choice: penWidthHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3703
                  choiceValue: 10
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3704
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3705
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3706
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3707
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3708
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3709
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3710
         (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3711
            label: 'Spray'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3712
            translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3713
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3714
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3715
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3716
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3717
                  label: '4'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3718
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3719
                  choice: spraySpotHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3720
                  choiceValue: 4
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3721
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3722
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3723
                  label: '8'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3724
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3725
                  choice: spraySpotHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3726
                  choiceValue: 8
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3727
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3728
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3729
                  label: '16'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3730
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3731
                  choice: spraySpotHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3732
                  choiceValue: 16
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3733
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3734
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3735
                  label: '32'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3736
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3737
                  choice: spraySpotHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3738
                  choiceValue: 32
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3739
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3740
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3741
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3742
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3743
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3744
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3745
         )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3746
        nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3747
        nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3748
      )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3749
!
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3750
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3751
menuToolbar
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3752
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3753
     by the MenuEditor of ST/X."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3754
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3755
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3756
     the MenuEditor may not be able to read the specification."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3757
2876
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3758
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3759
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  3760
     MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar
228524287573 intitial checkin
tz
parents:
diff changeset
  3761
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
  3762
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  3763
228524287573 intitial checkin
tz
parents:
diff changeset
  3764
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
  3765
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3766
    ^ 
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3767
     #(Menu
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3768
        (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3769
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3770
            activeHelpKey: fileNewImage
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3771
            label: 'newImage'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3772
            itemValue: doNewImage
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3773
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1882
diff changeset
  3774
            labelImage: (ResourceRetriever ToolbarIconLibrary newImageIcon)
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3775
          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3776
         (MenuItem
2876
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3777
            activeHelpKey: fileGrabImageFromScreen
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3778
            label: 'grabScreenImage'
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3779
            itemValue: grabScreenImage
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3780
            isButton: true
2877
1a7cd3e6eea1 changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2876
diff changeset
  3781
            labelImage: (ResourceRetriever ToolbarIconLibrary snapshot24x24Icon)
2876
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3782
          )
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3783
         (MenuItem
1949
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  3784
            label: '-'
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  3785
          )
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  3786
         (MenuItem
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3787
            activeHelpKey: fileLoadFromClass
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3788
            label: 'loadFromClass'
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3789
            itemValue: doLoadFromClass
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3790
            isButton: true
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  3791
            isVisible: isStandAloneAndMethodSaveAndLoadMenuItemsVisible
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3792
            submenuChannel: menuHistory
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3793
            labelImage: (ResourceRetriever XPToolbarIconLibrary loadImageFromMethodIcon)
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3794
            keepLinkedMenu: true
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3795
          )
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3796
         (MenuItem
2567
903843f8a824 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2556
diff changeset
  3797
            activeHelpKey: fileSaveMethodAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3798
            enabled: imageIsLoadedHolder
2567
903843f8a824 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2556
diff changeset
  3799
            label: 'fileSaveMethodAs'
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3800
            itemValue: doSaveMethodAs
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3801
            isButton: true
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  3802
            isVisible: isStandAloneAndMethodSaveAndLoadMenuItemsVisible
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3803
            labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageAsMethodAsIcon)
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3804
          )
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3805
         (MenuItem
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3806
            activeHelpKey: fileSaveMethod
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3807
            enabled: imageIsLoadedHolder
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3808
            label: 'saveAsMethod'
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3809
            itemValue: doSaveMethod
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3810
            isButton: true
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  3811
            isVisible: isNotStandAloneAndMethodSaveAndLoadMenuItemsVisible
2590
9f2cb061d07f changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
  3812
            labelImage: (ResourceRetriever ToolbarIconLibrary saveImageAsMethodIcon)
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3813
          )
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3814
         (MenuItem
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3815
            label: '-'
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  3816
            isVisible: methodSaveAndLoadMenuItemsVisible
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3817
          )
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3818
         (MenuItem
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3819
            activeHelpKey: fileLoadFromFile
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3820
            label: 'loadFromFile'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3821
            itemValue: doLoadFromFile
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3822
            isButton: true
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  3823
            labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromFileIcon)
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3824
          )
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3825
         (MenuItem
3425
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3826
            activeHelpKey: fileSave
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3827
            enabled: imageIsLoadedHolder
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3828
            label: 'save'
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3829
            itemValue: doSaveImageFile
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3830
            isButton: true
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3831
            isVisible: saveButtonInToolbarVisibleHolder
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3832
            labelImage: (ResourceRetriever ToolbarIconLibrary saveImageIcon)
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3833
          )
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3834
         (MenuItem
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3835
            activeHelpKey: fileSaveAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3836
            enabled: imageIsLoadedHolder
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3837
            label: 'saveAsFile'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3838
            itemValue: doSaveImageFileAs
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3839
            isButton: true
1885
a09ede39c43f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1884
diff changeset
  3840
            labelImage: (ResourceRetriever ToolbarIconLibrary saveImageToFileAsIcon)
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3841
          )
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3842
         (MenuItem
1949
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  3843
            label: '-'
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3844
          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3845
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3846
            activeHelpKey: editUndo
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3847
            enabled: canUndoHolder
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3848
            label: 'Undo'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3849
            itemValue: doUndo
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3850
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1882
diff changeset
  3851
            labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon)
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3852
          )
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3853
         (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3854
            label: '-'
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3855
            isVisible: imageHasImageSequenceHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3856
          )
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3857
         (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3858
            activeHelpKey: previousImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3859
            enabled: imageHasPreviousImageHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3860
            label: 'Previous Image'
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3861
            itemValue: previousImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3862
            isVisible: imageHasImageSequenceHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3863
            labelImage: (ResourceRetriever ToolbarIconLibrary leftArrow24x24Icon)
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3864
          )
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3865
         (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3866
            activeHelpKey: nextImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3867
            enabled: imageHasNextImageHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3868
            label: 'Next Image'
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3869
            itemValue: nextImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3870
            isVisible: imageHasImageSequenceHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3871
            labelImage: (ResourceRetriever ToolbarIconLibrary rightArrow24x24Icon)
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3872
          )
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3873
         )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3874
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3875
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3876
      )
3425
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3877
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3878
    "Modified: / 26-02-2017 / 23:03:40 / cg"
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3879
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3880
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3881
modeMenu
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3882
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3883
     by the MenuEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3884
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3885
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3886
     the MenuEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3887
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3888
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3889
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3890
     MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3891
     (Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3892
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3893
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3894
    <resource: #menu>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3895
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3896
    ^ 
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3897
     #(Menu
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3898
        (
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3899
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3900
            activeHelpKey: drawModePoint
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3901
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3902
            label: 'Point'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3903
            labelImage: (ResourceRetriever ImageEditor pointIcon 'Point')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3904
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3905
            choiceValue: point
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3906
          )
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3907
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3908
            label: '-'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3909
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3910
         (MenuItem
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3911
            activeHelpKey: drawModePoint
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3912
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3913
            label: 'Spray'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3914
            labelImage: (ResourceRetriever ImageEditor sprayIcon 'Spray')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3915
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3916
            choiceValue: spray
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3917
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3918
         (MenuItem
3191
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  3919
            activeHelpKey: drawModeSmooth
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  3920
            enabled: imageIsLoadedHolder
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  3921
            label: 'Smooth'
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  3922
            labelImage: (ResourceRetriever ImageEditor smoothIcon 'Smooth')
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  3923
            choice: editMode
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  3924
            choiceValue: smooth
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  3925
          )
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  3926
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3927
            label: '-'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3928
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3929
         (MenuItem
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3930
            activeHelpKey: drawModeBox
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3931
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3932
            label: 'Rect'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3933
            labelImage: (ResourceRetriever ImageEditor rectIcon 'Rect')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3934
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3935
            choiceValue: box
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3936
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3937
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3938
            activeHelpKey: drawModeFilledBox
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3939
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3940
            label: 'Filled Rectangle'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3941
            labelImage: (ResourceRetriever ImageEditor fillRectIcon 'Filled Rectangle')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3942
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3943
            choiceValue: filledBox
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3944
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3945
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3946
            activeHelpKey: drawModeCircle
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3947
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3948
            label: 'Circle'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3949
            labelImage: (ResourceRetriever ImageEditor circleIcon 'Circle')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3950
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3951
            choiceValue: circle
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3952
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3953
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3954
            activeHelpKey: drawModeFilledCircle
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3955
            enabled: imageIsLoadedHolder
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3956
            label: 'Filled Circle'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3957
            labelImage: (ResourceRetriever ImageEditor fillCircleIcon 'Filled Circle')
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3958
            choice: editMode
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3959
            choiceValue: filledCircle
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3960
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3961
         (MenuItem
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3962
            activeHelpKey: drawModeFill
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3963
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3964
            label: 'Fill'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3965
            labelImage: (ResourceRetriever ImageEditor fillIcon 'Fill')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3966
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3967
            choiceValue: fill
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3968
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  3969
         (MenuItem
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3970
            enabled: imageIsLoadedHolder
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3971
            label: 'Gradient Fill'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3972
            isVisible: false
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3973
            submenu: 
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3974
           (Menu
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3975
              (
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3976
               (MenuItem
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3977
                  activeHelpKey: drawModeFill
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3978
                  enabled: imageIsLoadedHolder
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3979
                  label: 'Horizontal'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3980
                  labelImage: (ResourceRetriever ImageEditor fillHorizontalGradientRectIcon 'Horizontal')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3981
                  choice: editMode
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3982
                  choiceValue: fillHorizontalGradient
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3983
                )
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3984
               (MenuItem
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3985
                  activeHelpKey: drawModeFill
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3986
                  enabled: imageIsLoadedHolder
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3987
                  label: 'Vertical'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3988
                  labelImage: (ResourceRetriever ImageEditor fillVerticalGradientRectIcon 'Vertical')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3989
                  choice: editMode
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3990
                  choiceValue: fillVerticalGradient
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3991
                )
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3992
               (MenuItem
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3993
                  activeHelpKey: drawModeFill
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3994
                  enabled: imageIsLoadedHolder
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  3995
                  isVisible: false
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3996
                  label: 'Diagonal'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3997
                  labelImage: (ResourceRetriever ImageEditor fillDiagonalGradientRectIcon 'Diagonal')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3998
                  choice: editMode
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  3999
                  choiceValue: fillDiagonalGradient
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4000
                )
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4001
               )
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4002
              nil
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4003
              nil
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4004
            )
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4005
          )
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4006
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4007
            label: '-'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4008
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4009
         (MenuItem
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4010
            activeHelpKey: drawModeMaskOutsideRectangle
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4011
            enabled: imageHasMaskAndIsNotReadOnlyHolder
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4012
            label: 'Mask Outside Rectangle'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4013
            labelImage: (ResourceRetriever ImageEditor maskOutsideRectangleIcon 'Mask Outside Rectangle')
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4014
            choice: editMode
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4015
            choiceValue: maskOutsideRect
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4016
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4017
         (MenuItem
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4018
            activeHelpKey: drawModeMaskOutsideCircle
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4019
            enabled: imageHasMaskAndIsNotReadOnlyHolder
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4020
            label: 'Mask Outside Circle'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4021
            labelImage: (ResourceRetriever ImageEditor maskOutsideCircleIcon 'Mask Outside Circle')
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4022
            choice: editMode
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4023
            choiceValue: maskOutsideCircle
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4024
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4025
         (MenuItem
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4026
            label: '-'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4027
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4028
         (MenuItem
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4029
            activeHelpKey: drawModeCopy
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4030
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4031
            label: 'Copy'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4032
            labelImage: (ResourceRetriever ImageEditor copyIcon 'Copy')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4033
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4034
            choiceValue: copy
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4035
          )
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4036
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4037
            activeHelpKey: drawModePaste
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4038
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4039
            label: 'Paste'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4040
            labelImage: (ResourceRetriever ImageEditor pasteIcon 'Paste')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4041
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4042
            choiceValue: paste
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  4043
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4044
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4045
            activeHelpKey: drawModePasteUnder
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4046
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4047
            label: 'Paste Under'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4048
            labelImage: (ResourceRetriever ImageEditor pasteUnderIcon 'Paste Under')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4049
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4050
            choiceValue: pasteUnder
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  4051
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4052
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4053
            activeHelpKey: drawModePasteWithMask
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4054
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4055
            label: 'Paste with Mask'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4056
            labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon 'Paste with Mask')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4057
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4058
            choiceValue: pasteWithMask
1579
08a760ad7900 added paste with mask
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
  4059
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4060
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4061
            label: '-'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4062
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4063
         (MenuItem
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4064
            activeHelpKey: drawModeSpecial
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4065
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4066
            label: 'Special'
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  4067
            labelImage: (ResourceRetriever ImageEditor specialRectangleIcon 'Special')
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4068
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4069
            choiceValue: specialOperation
1411
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  4070
          )
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  4071
         )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  4072
        nil
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  4073
        nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4074
      )
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  4075
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4076
    "Modified: / 23-02-2017 / 15:53:17 / cg"
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4077
!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4078
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4079
previewMenu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4080
    "This resource specification was automatically generated
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4081
     by the MenuEditor of ST/X."
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4082
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4083
    "Do not manually edit this!! If it is corrupted,
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4084
     the MenuEditor may not be able to read the specification."
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4085
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4086
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4087
    "
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4088
     MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4089
     (Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4090
    "
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4091
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4092
    <resource: #menu>
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4093
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4094
    ^ 
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4095
     #(Menu
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4096
        (
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4097
         (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4098
            label: 'TileMode'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4099
            indication: tileModeHolder
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4100
          )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4101
         (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4102
            label: '-'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4103
          )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4104
         (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4105
            label: 'Background Color'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4106
            submenu: 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4107
           (Menu
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4108
              (
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4109
               (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4110
                  label: 'Gray'
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4111
                  choice: previewBackgroundColorHolder
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4112
                )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4113
               (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4114
                  label: 'Black'
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4115
                  choice: previewBackgroundColorHolder
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4116
                  choiceValue: black
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4117
                )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4118
               (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4119
                  label: 'White'
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4120
                  choice: previewBackgroundColorHolder
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4121
                  choiceValue: white
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4122
                )
1774
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4123
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4124
                  label: '-'
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4125
                )
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4126
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4127
                  label: 'Red'
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4128
                  choice: previewBackgroundColorHolder
1774
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4129
                  choiceValue: red
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4130
                )
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4131
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4132
                  label: 'Green'
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4133
                  choice: previewBackgroundColorHolder
1774
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4134
                  choiceValue: green
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4135
                )
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4136
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4137
                  label: 'Blue'
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4138
                  choice: previewBackgroundColorHolder
1774
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4139
                  choiceValue: blue
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4140
                )
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4141
               )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4142
              nil
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4143
              nil
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4144
            )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4145
          )
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4146
         (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4147
            label: '-'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4148
          )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4149
         (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4150
            label: 'Magnification'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4151
            submenu: 
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4152
           (Menu
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4153
              (
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4154
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4155
                  label: '0.1'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4156
                  choice: previewMagnificationHolder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4157
                  choiceValue: 0.1
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4158
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4159
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4160
                  label: '0.25'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4161
                  choice: previewMagnificationHolder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4162
                  choiceValue: 0.25
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4163
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4164
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4165
                  label: '0.5'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4166
                  choice: previewMagnificationHolder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4167
                  choiceValue: 0.5
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4168
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4169
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4170
                  label: '1'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4171
                  choice: previewMagnificationHolder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4172
                  choiceValue: 1
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4173
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4174
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4175
                  label: '2'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4176
                  choice: previewMagnificationHolder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4177
                  choiceValue: 2
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4178
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4179
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4180
                  label: '4'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4181
                  choice: previewMagnificationHolder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4182
                  choiceValue: 4
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4183
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4184
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4185
                  label: '-'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4186
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4187
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4188
                  label: 'Choose...'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4189
                  itemValue: changePreviewImageMagnification
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4190
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4191
               )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4192
              nil
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4193
              nil
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4194
            )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4195
          )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4196
         )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4197
        nil
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4198
        nil
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4199
      )
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4200
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4201
    "Modified: / 10-09-2017 / 14:54:41 / cg"
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4202
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4203
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4204
toolsMenuToolbar
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4205
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4206
     by the MenuEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4207
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4208
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4209
     the MenuEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4210
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4211
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4212
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4213
     MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4214
     (Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4215
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4216
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4217
    <resource: #menu>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4218
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4219
    ^ 
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4220
     #(Menu
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4221
        (
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4222
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4223
            activeHelpKey: drawModePoint
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  4224
            enabled: canDrawPointsHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4225
            label: 'Point'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4226
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4227
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4228
            labelImage: (ResourceRetriever ImageEditor pointIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4229
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4230
            choiceValue: point
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4231
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4232
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4233
            activeHelpKey: drawModeSpray
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  4234
            enabled: canSprayHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4235
            label: 'Spray'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4236
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4237
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4238
            labelImage: (ResourceRetriever ImageEditor sprayIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4239
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4240
            choiceValue: spray
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  4241
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4242
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4243
            activeHelpKey: drawModeBox
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  4244
            enabled: canDrawRectsHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4245
            label: 'Rect'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4246
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4247
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4248
            labelImage: (ResourceRetriever ImageEditor rectIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4249
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4250
            choiceValue: box
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4251
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4252
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4253
            activeHelpKey: drawModeFilledBox
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  4254
            enabled: canFillRectsHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4255
            label: 'FillRect'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4256
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4257
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4258
            labelImage: (ResourceRetriever ImageEditor fillRectIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4259
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4260
            choiceValue: filledBox
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4261
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4262
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4263
            activeHelpKey: drawModeCircle
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  4264
            enabled: canDrawCirclesHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4265
            label: 'Circle'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4266
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4267
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4268
            labelImage: (ResourceRetriever ImageEditor circleIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4269
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4270
            choiceValue: circle
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  4271
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4272
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4273
            activeHelpKey: drawModeFill
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  4274
            enabled: canFloodFillHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4275
            label: 'Fill'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4276
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4277
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4278
            labelImage: (ResourceRetriever ImageEditor fillIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4279
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4280
            choiceValue: fill
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4281
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4282
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4283
            activeHelpKey: drawModeCopy
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4284
            enabled: imageIsLoadedHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4285
            label: 'Copy'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4286
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4287
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4288
            labelImage: (ResourceRetriever ImageEditor copyIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4289
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4290
            choiceValue: copy
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4291
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4292
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4293
            activeHelpKey: drawModePasteWithMask
3377
6177e2e703fb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  4294
            enabled: imageIsLoadedAndNotReadonlyHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4295
            label: 'Paste With Mask'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4296
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4297
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4298
            labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4299
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4300
            choiceValue: pasteWithMask
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4301
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4302
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4303
            activeHelpKey: drawModePaste
3377
6177e2e703fb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  4304
            enabled: imageIsLoadedAndNotReadonlyHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4305
            label: 'Paste'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4306
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4307
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4308
            labelImage: (ResourceRetriever ImageEditor pasteIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4309
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4310
            choiceValue: paste
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4311
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4312
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4313
            activeHelpKey: drawModePasteUnder
3377
6177e2e703fb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  4314
            enabled: imageIsLoadedAndNotReadonlyHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4315
            label: 'Paste Under'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4316
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4317
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4318
            labelImage: (ResourceRetriever ImageEditor pasteUnderIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4319
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4320
            choiceValue: pasteUnder
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4321
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4322
         (MenuItem
3464
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4323
            activeHelpKey: drawModeCropSubImage 
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4324
            enabled: imageIsLoadedHolder
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4325
            label: 'Crop SubImage'
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4326
            translateLabel: true
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4327
            isButton: true
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4328
            labelImage: (ResourceRetriever ImageEditor cropSubImageIcon)
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4329
            choice: editMode
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4330
            choiceValue: cropSubImage
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4331
          )
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4332
         (MenuItem
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4333
            activeHelpKey: drawModeSpecial
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4334
            enabled: imageIsLoadedHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4335
            label: 'Special'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4336
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4337
            isButton: true
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  4338
            labelImage: (ResourceRetriever ImageEditor specialRectangleIcon)
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4339
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4340
            choiceValue: specialOperation
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4341
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4342
         )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4343
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4344
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4345
      )
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  4346
3464
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4347
    "Modified: / 24-08-2017 / 20:53:02 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4348
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  4349
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4350
!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
  4351
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  4352
colorTableColumns
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4353
    "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
  4354
     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
  4355
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4356
    "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
  4357
     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
  4358
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4359
    "
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4360
     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
  4361
    "
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4362
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4363
    <resource: #tableColumns>
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4364
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4365
    ^#(
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4366
      (DataSetColumnSpec
2174
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  4367
         activeHelpKey: ''
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4368
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4369
         rendererType: rowSelector
2712
cddda688a9f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
  4370
         backgroundSelector: theColorItself:
cddda688a9f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
  4371
         selectedBackgroundSelector: theColorItself:
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4372
         isResizeable: false
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4373
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4374
      (DataSetColumnSpec
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4375
         label: 'R'
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4376
         labelAlignment: left
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4377
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4378
         columnAlignment: right
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4379
         editorType: InputField
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4380
         type: number
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4381
         model: redFromColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4382
         writeSelector: redAtColor:put:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4383
         selectSelector: canSelectRedInColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4384
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4385
      (DataSetColumnSpec
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4386
         label: 'G'
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4387
         labelAlignment: left
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4388
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4389
         columnAlignment: right
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4390
         editorType: InputField
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4391
         type: number
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4392
         model: greenFromColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4393
         writeSelector: greenAtColor:put:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4394
         selectSelector: canSelectGreenInColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4395
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4396
      (DataSetColumnSpec
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4397
         label: 'B'
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4398
         labelAlignment: left
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4399
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4400
         columnAlignment: right
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4401
         editorType: InputField
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4402
         type: number
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4403
         model: blueFromColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4404
         writeSelector: blueAtColor:put:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4405
         selectSelector: canSelectBlueInColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4406
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4407
      )
2174
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  4408
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  4409
    "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
  4410
! !
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4411
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4412
!ImageEditor methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
  4413
228524287573 intitial checkin
tz
parents:
diff changeset
  4414
image
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4415
    "returns the current editing image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4416
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4417
    ^ imageEditView image
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4418
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4419
228524287573 intitial checkin
tz
parents:
diff changeset
  4420
postOpenAction: anAction
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4421
   "sets an action which is evaluated after opening"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4422
228524287573 intitial checkin
tz
parents:
diff changeset
  4423
    postOpenAction := anAction
1381
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  4424
!
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  4425
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  4426
resourceClass:aClass
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  4427
    imageEditView resourceClass:aClass
3375
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  4428
!
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  4429
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  4430
savedFile
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  4431
    "if user did a save to file, return the filename.
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  4432
     Otherwise, this returns nil"
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  4433
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  4434
    ^ savedFile
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  4435
!
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  4436
3375
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  4437
savedImage
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  4438
    "if user did a save, return what was saved last.
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  4439
     Otherwise, this returns nil"
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  4440
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  4441
    ^ savedImage
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4442
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  4443
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4444
!ImageEditor methodsFor:'accessing-behavior'!
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4445
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4446
allowedToChangeImageDimension
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4447
    "used to edit an existing image's contents only (Expecco)"
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4448
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4449
    ^ self allowedToChangeImageDimensionAndDepth
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4450
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4451
    "Created: / 16-02-2017 / 01:59:21 / cg"
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4452
!
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4453
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4454
allowedToChangeImageDimensionAndDepth
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4455
    "used to edit an existing image's contents only (Expecco)"
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4456
3378
7225434f9d46 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3377
diff changeset
  4457
    self readOnly ifTrue:[^ false].
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4458
    ^ allowedToChangeImageDimensionAndDepth ? true
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4459
!
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4460
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4461
allowedToChangeImageDimensionAndDepth:aBoolean
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4462
    "used to edit an existing image's contents only (Expecco)"
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4463
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4464
    allowedToChangeImageDimensionAndDepth := aBoolean
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4465
! !
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4466
1398
284781677ae1 category changes
Claus Gittinger <cg@exept.de>
parents: 1393
diff changeset
  4467
!ImageEditor methodsFor:'accessing-views'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4468
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4469
colorDataSetView
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4470
    "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
  4471
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  4472
    ^(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
  4473
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4474
    "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
  4475
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4476
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  4477
coordLabel
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4478
    "returns the view the coord label"
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  4479
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  4480
    ^self componentAt: #coordLabel
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  4481
!
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  4482
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4483
imageEditView
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  4484
    "returns the editor view of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4485
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4486
    imageEditView isNil ifTrue:[
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  4487
        imageEditView := (self componentAt: #imageEditView) scrolledView.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4488
        imageEditView addDependent:self.
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4489
    ].
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4490
    ^ imageEditView
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4491
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4492
    "Modified: / 10.2.2000 / 23:19:20 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4493
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4494
228524287573 intitial checkin
tz
parents:
diff changeset
  4495
imagePreView
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4496
    "returns the preview of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4497
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4498
    |imagePreViewSubViews|
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4499
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4500
    imagePreViewSubViews := (self componentAt: #imagePreView) subViews.
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4501
2043
a816ef2ce516 #imagePreView
sr
parents: 2042
diff changeset
  4502
    "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
  4503
    imagePreViewSubViews isEmptyOrNil ifTrue:[
2043
a816ef2ce516 #imagePreView
sr
parents: 2042
diff changeset
  4504
        ^ nil
a816ef2ce516 #imagePreView
sr
parents: 2042
diff changeset
  4505
    ].
a816ef2ce516 #imagePreView
sr
parents: 2042
diff changeset
  4506
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4507
    ^ imagePreViewSubViews first 
475
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  4508
! !
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  4509
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4510
!ImageEditor methodsFor:'actions'!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4511
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4512
applyCropAction
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4513
    self cropLeft:(self cropLeftAmount value) right:(self cropRightAmount value) 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4514
         top:(self cropTopAmount value) bottom:(self cropBottomAmount value)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4515
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4516
    "Created: / 17-02-2017 / 14:34:35 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4517
    "Modified: / 19-02-2017 / 15:11:41 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4518
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4519
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4520
cropBottomNow
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4521
    self cropLeft:0 right:0 top:0 bottom:(self cropBottomAmount value)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4522
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4523
    "Created: / 19-02-2017 / 15:07:36 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4524
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4525
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4526
cropLeft:left right:right top:top bottom:bottom
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4527
    |img|
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4528
    
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4529
    img := imageEditView image.
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4530
    img isNil ifTrue:[^ self].
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4531
    
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4532
    true "firstChange" ifTrue:[
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4533
        imageEditView makeUndo.
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4534
        "/ firstChange := false.
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4535
    ].
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4536
    imageEditView
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4537
        makeSubImageX:left y:top 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4538
        width:(img width - left - right)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4539
        height:(img height - top - bottom).
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4540
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4541
    self updateImagePreView.
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4542
    self updateInfoLabel
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4543
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4544
    "Created: / 19-02-2017 / 15:07:58 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4545
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4546
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4547
cropLeftNow
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4548
    self cropLeft:(self cropLeftAmount value) right:0 top:0 bottom:0
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4549
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4550
    "Created: / 19-02-2017 / 15:08:06 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4551
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4552
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4553
cropRightNow
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4554
    self cropLeft:0 right:(self cropRightAmount value) top:0 bottom:0
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4555
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4556
    "Created: / 19-02-2017 / 15:08:12 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4557
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4558
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4559
cropTopNow
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4560
    self cropLeft:0 right:0 top:(self cropTopAmount value) bottom:0
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4561
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4562
    "Created: / 19-02-2017 / 15:08:29 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4563
! !
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4564
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4565
!ImageEditor methodsFor:'aspects'!
228524287573 intitial checkin
tz
parents:
diff changeset
  4566
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  4567
activityInfoHolder
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  4568
    ^ self infoLabelHolder
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  4569
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  4570
    "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
  4571
!
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  4572
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4573
alphaHolder
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4574
    |holder|
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4575
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4576
    (holder := builder bindingAt:#alphaHolder) isNil ifTrue:[
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4577
        builder aspectAt:#alphaHolder put:(holder := 100 asValue).
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4578
        holder onChangeEvaluate:[ imageEditView drawingAlpha:holder value ].
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4579
    ].
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4580
    ^ holder
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4581
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4582
    "Created: / 05-09-2017 / 00:38:14 / cg"
3488
e9655ba452c7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3487
diff changeset
  4583
    "Modified: / 05-09-2017 / 10:47:01 / cg"
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4584
!
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4585
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4586
alphaText
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4587
    ^ 'alpha:'
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4588
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4589
    "Created: / 05-09-2017 / 00:32:55 / cg"
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4590
!
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4591
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4592
alphaVisibleHolder
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4593
    |holder|
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4594
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4595
    (holder := builder bindingAt:#alphaVisibleHolder) isNil ifTrue:[
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4596
        builder aspectAt:#alphaVisibleHolder put:(holder := false asValue).
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4597
    ].
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4598
    ^ holder
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4599
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4600
    "Created: / 05-09-2017 / 00:35:36 / cg"
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4601
!
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4602
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4603
canAddColorToColormap
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4604
    |img|
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4605
    
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4606
    img := self image.
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4607
    img isNil ifTrue:[^ false].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4608
    img photometric == #blackIs0 ifTrue:[^ false].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4609
    img photometric == #whiteIs0 ifTrue:[^ false].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4610
    ^ true
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4611
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4612
    "Created: / 31-08-2017 / 18:32:27 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4613
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4614
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4615
canAddColorToColormapHolder
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4616
    ^ [self canAddColorToColormap]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4617
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4618
    "Created: / 31-08-2017 / 18:32:40 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4619
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4620
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4621
canChangeColorInColormap
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4622
    |img|
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4623
    
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4624
    img := self image.
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4625
    img isNil ifTrue:[^ false].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4626
    img photometric == #palette ifFalse:[^ false].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4627
    ^ true
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4628
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4629
    "Created: / 31-08-2017 / 18:34:12 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4630
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4631
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4632
canChangeColorInColormapHolder
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4633
    ^ [self canChangeColorInColormap]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4634
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4635
    "Created: / 31-08-2017 / 18:34:18 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4636
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4637
3378
7225434f9d46 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3377
diff changeset
  4638
canResizeImage
7225434f9d46 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3377
diff changeset
  4639
    ^ self imageIsLoadedAndNotReadonlyHolder
7225434f9d46 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3377
diff changeset
  4640
!
7225434f9d46 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3377
diff changeset
  4641
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4642
colorBoxVisibleHolder
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4643
    |holder|
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4644
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4645
    (holder := builder bindingAt:#colorBoxVisibleHolder) isNil ifTrue:[
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4646
        builder aspectAt:#colorBoxVisibleHolder put:(holder := true asValue).
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4647
    ].
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4648
    ^ holder
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4649
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4650
    "Created: / 03-02-2017 / 11:20:21 / cg"
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4651
!
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4652
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4653
colorColumnAdaptor
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4654
    ^ self
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4655
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4656
    "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
  4657
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4658
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4659
colorCropTabLabelList
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4660
    ^ resources array:(self colorCropTabSpecList collect:#first)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4661
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4662
    "Created: / 19-02-2017 / 14:58:25 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4663
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4664
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4665
colorCropTabSelectionIndexHolder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4666
    |holder|
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4667
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4668
    (holder := builder bindingAt:#colorCropTabSelectionIndexHolder) isNil ifTrue:[
3415
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4669
        builder aspectAt:#colorCropTabSelectionIndexHolder put:(holder := self defaultEditTabIndex asValue).
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4670
        holder onChangeSend:#colorCropTabSelectionIndexChanged to:self.
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4671
    ].
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4672
    ^ holder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4673
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4674
    "Created: / 19-02-2017 / 14:59:11 / cg"
3415
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4675
    "Modified: / 19-02-2017 / 23:33:39 / cg"
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4676
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4677
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4678
colorCropTabSpecList
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4679
    ^ #( 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4680
        ('Colors' colors)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4681
        ('Crop'   crop)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4682
        ('Fill'   fill)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4683
    )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4684
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4685
    "Created: / 19-02-2017 / 15:34:33 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4686
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4687
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4688
colorCropTabSymbolList
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4689
    ^ self colorCropTabSpecList collect:#second
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4690
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4691
    "Created: / 19-02-2017 / 15:34:54 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4692
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4693
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4694
cropBottomAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4695
    ^ builder valueAspectFor:'cropBottomAmount' initialValue:1
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4696
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4697
    "Created: / 19-02-2017 / 15:09:09 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4698
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4699
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4700
cropBoxIsDialog
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4701
    ^ false
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4702
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4703
    "Created: / 03-02-2017 / 11:23:50 / cg"
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4704
    "Modified: / 19-02-2017 / 15:24:07 / cg"
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4705
!
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4706
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4707
cropBoxIsNotDialog
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4708
    ^ self cropBoxIsDialog not
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4709
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4710
    "Created: / 17-02-2017 / 14:38:04 / cg"
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4711
!
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4712
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4713
cropBoxVisibleHolder
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4714
    |holder|
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4715
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4716
    (holder := builder bindingAt:#cropBoxVisibleHolder) isNil ifTrue:[
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4717
        builder aspectAt:#cropBoxVisibleHolder put:(holder := false asValue).
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4718
    ].
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4719
    ^ holder
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4720
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4721
    "Created: / 03-02-2017 / 11:20:13 / cg"
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4722
!
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4723
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4724
cropLeftAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4725
    ^ builder valueAspectFor:'cropLeftAmount' initialValue:1
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4726
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4727
    "Created: / 19-02-2017 / 15:09:23 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4728
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4729
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4730
cropRightAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4731
    ^ builder valueAspectFor:'cropRightAmount' initialValue:1
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4732
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4733
    "Created: / 19-02-2017 / 15:09:29 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4734
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4735
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4736
cropTopAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4737
    ^ builder valueAspectFor:'cropTopAmount' initialValue:1
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4738
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4739
    "Created: / 19-02-2017 / 15:09:35 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4740
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4741
3415
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4742
defaultEditTabIndex
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4743
    "the default tab to show in the color/crop/fill tablist"
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4744
    
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4745
    ^ 1
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4746
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4747
    "Created: / 19-02-2017 / 23:34:12 / cg"
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4748
!
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4749
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4750
drawingColor1Holder
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4751
    "returns a valueHolder for the current selected mouse-button-1 color"
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4752
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4753
    |holder|
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4754
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4755
    (holder := builder bindingAt:#drawingColor1Holder) isNil ifTrue:[
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4756
        builder aspectAt:#drawingColor1Holder put:(holder := IndirectValue new)
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4757
    ].
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4758
    ^ holder
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4759
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4760
    "Created: / 23-02-2017 / 10:18:25 / cg"
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4761
!
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4762
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4763
drawingColor2Holder
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4764
    "returns a valueHolder for the current selected mouse-button-2 color"
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4765
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4766
    |holder|
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4767
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4768
    (holder := builder bindingAt:#drawingColor2Holder) isNil ifTrue:[
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4769
        builder aspectAt:#drawingColor2Holder put:(holder := IndirectValue new)
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4770
    ].
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4771
    ^ holder
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4772
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4773
    "Created: / 23-02-2017 / 10:18:33 / cg"
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4774
!
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4775
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4776
floodFillBoxVisibleHolder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4777
    |holder|
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4778
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4779
    (holder := builder bindingAt:#floodFillBoxVisibleHolder) isNil ifTrue:[
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4780
        builder aspectAt:#floodFillBoxVisibleHolder put:(holder := false asValue).
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4781
    ].
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4782
    ^ holder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4783
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4784
    "Created: / 19-02-2017 / 15:28:40 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4785
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4786
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4787
floodFillMaxHueError
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4788
    |holder|
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4789
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4790
    (holder := builder bindingAt:#floodFillMaxHueError) isNil ifTrue:[
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4791
        builder aspectAt:#floodFillMaxHueError put:(holder := 0 asValue).
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4792
        holder onChangeEvaluate:[ imageEditView floodFillMaxHueError:holder value ].
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4793
    ].
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4794
    ^ holder
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4795
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4796
    "Created: / 17-02-2017 / 15:19:17 / cg"
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4797
!
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4798
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4799
floodFillMaxLightError
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4800
    |holder|
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4801
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4802
    (holder := builder bindingAt:#floodFillMaxLightError) isNil ifTrue:[
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4803
        builder aspectAt:#floodFillMaxLightError put:(holder := 0 asValue).
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4804
        holder onChangeEvaluate:[ imageEditView floodFillMaxLightError:holder value ].
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4805
    ].
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4806
    ^ holder
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4807
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4808
    "Created: / 17-02-2017 / 15:19:11 / cg"
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4809
!
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4810
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4811
hasClassAndSelectorDefinedHolder
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4812
    ^ [
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  4813
        |cls|
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  4814
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  4815
        (cls := imageEditView resourceClass) notNil
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  4816
        and:[imageEditView resourceSelector notNil]
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4817
      ]
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4818
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4819
    "Created: / 04-07-2010 / 10:11:10 / cg"
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4820
!
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4821
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4822
hasClassDefinedHolder
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4823
    ^ [
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  4824
        imageEditView resourceClass notNil
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4825
      ]
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4826
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4827
    "Created: / 04-07-2010 / 10:11:47 / cg"
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4828
!
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4829
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4830
hasColorSelectedHolder
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  4831
    ^ [ self selectedColors value notEmptyOrNil "self selectedColorIndexOrNil notNil" ]
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4832
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4833
    "Created: / 04-07-2010 / 10:12:22 / cg"
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  4834
!
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  4835
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4836
hasColormap
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4837
    "true if a colormap is shown (might be a drwing map, not the real map)"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4838
    
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4839
    |img|
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4840
    
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4841
    ^ (img := self image) notNil 
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4842
        and:[img colorMap notNil or:[ drawingColormap notNil or:[ self listOfColors notEmptyOrNil ]]]
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4843
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4844
    "Created: / 30-09-1998 / 23:53:55 / cg"
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4845
    "Modified: / 23-02-2017 / 09:57:45 / cg"
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4846
    "Modified (comment): / 31-08-2017 / 18:36:08 / cg"
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4847
!
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4848
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  4849
hasColormapAndColorSelected
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  4850
    ^ [ self hasColormap and:[self hasColorSelectedHolder value]]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  4851
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  4852
    "Modified: / 31-08-2017 / 14:08:20 / cg"
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4853
!
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4854
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  4855
hasColormapAndSingleColorSelected
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4856
    ^ self hasColormapHolder value and:[self hasSingleColorSelectedHolder value]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4857
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4858
    "Modified: / 31-08-2017 / 18:44:49 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4859
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4860
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4861
hasColormapAndSingleColorSelectedHolder
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4862
    ^ [ self hasColormapAndSingleColorSelected value ]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4863
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4864
    "Created: / 31-08-2017 / 18:44:36 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4865
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4866
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4867
hasColormapAndSingleWritableColorSelectedHolder
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4868
    ^ [ self hasColormapAndSingleColorSelected and:[self canChangeColorInColormap ]]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4869
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4870
    "Created: / 31-08-2017 / 18:42:46 / cg"
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  4871
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  4872
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4873
hasColormapHolder
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4874
    "true if a colormap is shown (might be a drwing map, not the real map)"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4875
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4876
    ^ [self hasColormap]
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4877
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4878
    "Created: / 04-07-2010 / 10:13:05 / cg"
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4879
    "Modified (comment): / 31-08-2017 / 18:36:47 / cg"
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4880
!
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4881
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  4882
hasSingleColorSelectedHolder
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  4883
    ^ [ self selectedColors value size == 1 "self selectedColorIndexOrNil notNil" ]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  4884
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  4885
    "Created: / 04-07-2010 / 10:12:22 / cg"
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  4886
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  4887
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  4888
hasWritableColorSelectedHolder
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  4889
    ^ [ self hasSingleColorSelectedHolder value and:[self canChangeColorInColormap ]]
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  4890
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  4891
    "Created: / 08-10-2017 / 14:45:11 / cg"
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  4892
!
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  4893
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4894
imageHasColormap
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4895
    "true if a colormap is shown (might be a drwing map, not the real map)"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4896
    
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4897
    |img|
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4898
    
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4899
    ^ (img := self image) notNil 
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4900
        and:[img colorMap notNil ]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4901
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4902
    "Created: / 31-08-2017 / 18:36:25 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4903
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4904
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4905
imageHasColormapHolder
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4906
    ^ [self imageHasColormap]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4907
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4908
    "Created: / 31-08-2017 / 18:36:42 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4909
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4910
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4911
imageHasImageSequence
3080
918f79c8b30d class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3066
diff changeset
  4912
    |img|
918f79c8b30d class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3066
diff changeset
  4913
918f79c8b30d class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3066
diff changeset
  4914
    ^ (img := self image) notNil and:[img imageSequence notNil]
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4915
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4916
    "Created: / 21-10-2010 / 14:35:45 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4917
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4918
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4919
imageHasImageSequenceHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4920
    |holder|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4921
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4922
    (holder := builder bindingAt:#imageHasImageSequenceHolder) isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4923
        builder aspectAt:#imageHasImageSequenceHolder put:(holder := false asValue).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4924
        holder value:(self imageHasImageSequence).    
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4925
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4926
    ^ holder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4927
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4928
    "Modified: / 21-10-2010 / 14:36:57 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4929
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4930
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4931
imageHasMaskAndIsNotReadOnlyHolder
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4932
    "returns whether an image is loaded and editable as value holder"
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4933
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4934
    ^ BlockValue
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4935
        with:[:loaded | loaded and:[ self image mask notNil and:[self readOnly not] ]]
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4936
        argument:(self imageIsLoadedHolder)
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4937
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4938
    "Created: / 16-02-2017 / 12:17:25 / cg"
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4939
!
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4940
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4941
imageHasNextImage
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4942
    ^ self imageHasImageSequence and:[ (imageSeqNr ? 1) < self image imageSequence size ]
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4943
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4944
    "Created: / 21-10-2010 / 14:37:10 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4945
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4946
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4947
imageHasNextImageHolder
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4948
    |holder|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4949
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4950
    (holder := builder bindingAt:#imageHasNextImageHolder) isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4951
        builder aspectAt:#imageHasNextImageHolder put:(holder := false asValue).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4952
        holder value:(self imageHasNextImage).    
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4953
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4954
    ^ holder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4955
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4956
    "Modified: / 21-10-2010 / 14:37:40 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4957
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4958
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4959
imageHasPreviousImage
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4960
    ^ self imageHasImageSequence and:[ (imageSeqNr ? 1) > 1 ]
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4961
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4962
    "Created: / 21-10-2010 / 14:37:21 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4963
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4964
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4965
imageHasPreviousImageHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4966
    |holder|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4967
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4968
    (holder := builder bindingAt:#imageHasPreviousImageHolder) isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4969
        builder aspectAt:#imageHasPreviousImageHolder put:(holder := false asValue).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4970
        holder value:(self imageHasPreviousImage).    
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4971
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4972
    ^ holder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4973
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  4974
    "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
  4975
!
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  4976
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  4977
imageInfoHolder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  4978
    |holder|
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4979
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  4980
    (holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  4981
        builder aspectAt:#imageInfoHolder put:(holder :=  '' asValue).
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  4982
    ].
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  4983
    ^ holder
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  4984
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4985
    "Modified: / 04-07-2010 / 10:15:14 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4986
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4987
228524287573 intitial checkin
tz
parents:
diff changeset
  4988
listOfColors
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4989
    "returns the list of colors"
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4990
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4991
    |list|
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4992
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4993
    (list := builder bindingAt:#listOfColors) isNil ifTrue:[
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4994
        builder aspectAt:#listOfColors put:(list :=  List new).
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4995
        list addDependent:self.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4996
    ].
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  4997
    ^ list
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4998
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4999
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5000
magnificationHolder
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5001
    "returns current magnification of the image as an AspectAdaptor"
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5002
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5003
    |holder|
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5004
    (holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5005
        builder aspectAt:#valueOfMagnification put:(
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5006
        holder := AspectAdaptor new subject:self; forAspect:#magnification)
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5007
    ].
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5008
    ^ holder
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5009
!
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5010
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5011
penWidthHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5012
    |holder|
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5013
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5014
    (holder := builder bindingAt:#penWidthHolder) isNil ifTrue:[
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5015
        builder aspectAt:#penWidthHolder put:(holder := imageEditView penWidth asValue).
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5016
        holder onChangeSend:#penWidthHolderChanged to:self.
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5017
    ].
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5018
    ^ holder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5019
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5020
    "Created: / 15-02-2012 / 22:30:58 / cg"
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5021
!
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5022
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5023
previewBackgroundColorHolder
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5024
    |holder|
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5025
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5026
    (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
  5027
        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
  5028
        holder addDependent:self.
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5029
    ].
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5030
    ^ holder
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5031
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5032
    "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
  5033
!
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5034
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5035
previewMagnificationHolder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5036
    |holder|
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5037
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5038
    (holder := builder bindingAt:#previewMagnificationHolder) isNil ifTrue:[
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5039
        builder aspectAt:#previewMagnificationHolder put:(holder := 1 asValue).
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5040
        holder addDependent:self.
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5041
    ].
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5042
    ^ holder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5043
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5044
    "Created: / 10-09-2017 / 14:10:07 / cg"
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5045
!
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5046
3377
6177e2e703fb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  5047
readOnly
6177e2e703fb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  5048
    ^ false
6177e2e703fb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  5049
!
6177e2e703fb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  5050
3425
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  5051
saveButtonInToolbarVisibleHolder
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  5052
    ^ false
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  5053
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  5054
    "Created: / 26-02-2017 / 22:58:41 / cg"
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  5055
!
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  5056
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5057
selectedColors
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5058
    "returns a valueHolder for the current set of selected colors."
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5059
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5060
    |holder|
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5061
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5062
    (holder := builder bindingAt:#selectedColors) isNil ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5063
        builder aspectAt:#selectedColors put:(holder := nil asValue).
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5064
        holder onChangeSend:#selectedColorsChanged to:self.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5065
    ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5066
    ^ holder
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5067
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5068
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5069
selectionOfColor
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5070
    "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
  5071
     Here, an AspectAdaptor which accesses selectedColorIndex is returned."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5072
228524287573 intitial checkin
tz
parents:
diff changeset
  5073
    |holder|
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5074
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5075
    (holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  5076
        builder aspectAt:#selectionOfColor put:(
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5077
        holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex ).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5078
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  5079
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  5080
!
228524287573 intitial checkin
tz
parents:
diff changeset
  5081
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5082
spraySpotHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5083
    |holder|
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5084
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5085
    (holder := builder bindingAt:#spraySpotHolder) isNil ifTrue:[
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5086
        builder aspectAt:#spraySpotHolder put:(holder := imageEditView spraySpot asValue).
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5087
        holder onChangeSend:#spraySpotHolderChanged to:self.
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5088
    ].
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5089
    ^ holder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5090
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5091
    "Created: / 15-02-2012 / 22:36:38 / cg"
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5092
!
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5093
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5094
tileModeHolder
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5095
    |holder|
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5096
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5097
    (holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5098
        builder aspectAt:#tileModeHolder put:(holder := false asValue).
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5099
        holder addDependent:self.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5100
    ].
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5101
    ^ holder
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5102
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5103
    "Modified: / 21-10-2010 / 14:35:24 / cg"
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5104
!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5105
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5106
valueOfMagnification
2308
60722577a10a Mark obsolete methods
Stefan Vogel <sv@exept.de>
parents: 2272
diff changeset
  5107
    <resource: #obsolete>
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5108
    "returns current magnification of the image as an AspectAdaptor"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5109
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5110
    self obsoleteMethodWarning:'stupid method name - use #magnificationHolder'.
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5111
    ^ self magnificationHolder
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5112
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  5113
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5114
!ImageEditor methodsFor:'change & update'!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5115
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5116
changePreviewImageMagnification
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5117
    |mag|
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5118
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5119
    mag := Dialog request:'Magnification?' initialAnswer:self imagePreView magnificationFactor.
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5120
    mag isEmptyOrNil ifTrue:[^ self].
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5121
    mag := Number readFrom:mag onError:nil.
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5122
    mag isNil ifTrue:[^ self].
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5123
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5124
    self previewMagnificationHolder value:mag
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5125
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5126
    "Created: / 10-09-2017 / 14:52:52 / cg"
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5127
!
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5128
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5129
colorCropTabSelectionIndexChanged
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5130
    |selIndex sym|
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5131
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5132
    selIndex := self colorCropTabSelectionIndexHolder value.
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5133
    sym := self colorCropTabSymbolList at:selIndex.
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5134
    
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5135
    self colorBoxVisibleHolder value:(sym == #colors).
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5136
    self cropBoxVisibleHolder value:(sym == #crop).
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5137
    self floodFillBoxVisibleHolder value:(sym == #fill).
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5138
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5139
    "Created: / 19-02-2017 / 15:01:05 / cg"
3443
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
  5140
    "Modified: / 21-04-2017 / 16:05:51 / cg"
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5141
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5142
3433
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5143
colorMapModeFromImage:anImage
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5144
    "retrieves the colorMapMode for an image"
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5145
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5146
    |image colorMapModeKey|
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5147
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5148
    image := self image.
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5149
    image isNil ifTrue:[^ nil ].
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5150
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5151
    image mask notNil ifTrue: [             
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5152
        colorMapModeKey := 'masked'.
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5153
    ] ifFalse:[
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5154
        colorMapModeKey := 'depth'.
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5155
    ].
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5156
    colorMapModeKey := (colorMapModeKey , image depth printString) asSymbol.
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5157
    ^ colorMapModeKey
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5158
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5159
    "Created: / 06-04-2017 / 13:19:19 / cg"
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5160
!
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5161
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5162
findColorMapMode
899
43b744c647ba comment grammar
tz
parents: 898
diff changeset
  5163
    "finds the colorMapMode for a new image"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5164
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5165
    |image newListOfColors colorMapModeKey drawColor1 drawColor2 someOrAllUsedColors|
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  5166
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  5167
    image := self image.
3433
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5168
    (colorMapModeKey := self colorMapModeFromImage:image) isNil ifTrue:[^ self].
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5169
1967
c95484b7da49 some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1966
diff changeset
  5170
    self colorMapMode setValue:colorMapModeKey.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5171
3359
258a64461215 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3357
diff changeset
  5172
    image photometric == #palette ifTrue:[
258a64461215 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3357
diff changeset
  5173
        image colorMap isNil ifTrue:[
258a64461215 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3357
diff changeset
  5174
            image depth > 16 ifTrue:[
258a64461215 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3357
diff changeset
  5175
                image photometric:#rgb
258a64461215 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3357
diff changeset
  5176
            ].
258a64461215 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3357
diff changeset
  5177
        ].
258a64461215 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3357
diff changeset
  5178
    ].
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5179
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5180
    image depth > 12 ifTrue:[
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5181
        newListOfColors := OrderedCollection new.
2870
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  5182
        (image depth > 16 or:[image colorMap isEmptyOrNil]) ifTrue:[
1927
c5068006116d colors of deep images
Claus Gittinger <cg@exept.de>
parents: 1926
diff changeset
  5183
            someOrAllUsedColors := image usedColorsMax:10000.
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5184
            someOrAllUsedColors notNil ifTrue:[
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5185
                someOrAllUsedColors := someOrAllUsedColors asArray.
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5186
                someOrAllUsedColors sort:self sortBlockForColors.
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5187
                newListOfColors addAll:someOrAllUsedColors.
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5188
                "/ listOfColors add:Color black; add:Color white.
3317
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  5189
            ].
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  5190
            image mask notNil ifTrue:[
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  5191
                newListOfColors := (Array with:(Color noColor)),newListOfColors.
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  5192
            ].
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  5193
        ] ifFalse:[
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5194
            newListOfColors addAll:(image colorMap).
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5195
        ].
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5196
    ] ifFalse:[
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5197
        newListOfColors := OrderedCollection withAll:(self listOfColors).
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5198
        newListOfColors isEmpty ifTrue:[   
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5199
            self colorMapMode: colorMapMode value.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5200
            image := self image.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5201
        ].                               
3317
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  5202
        "/ image mask notNil ifTrue:[
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  5203
        "/     newListOfColors := (Array with:(Color noColor)),newListOfColors.
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  5204
        "/ ].
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5205
    ].  
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5206
    newListOfColors notEmptyOrNil ifTrue:[
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5207
        drawColor1 := newListOfColors at:1.
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5208
        drawColor2 := newListOfColors at:2 ifAbsent:drawColor1.
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5209
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5210
        self hasTransparentColorInColorList ifTrue: [             
3367
033c21371bea #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 3359
diff changeset
  5211
            (newListOfColors includes:(Color colorId:0)) ifFalse:[
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5212
                newListOfColors addFirst:(Color colorId:0).
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5213
                drawColor1 := newListOfColors at:2. 
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5214
                drawColor2 := newListOfColors at:3 ifAbsent:drawColor1.
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5215
            ]
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5216
        ].
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5217
"/        imageEditView drawingColors:(Array with: drawColor1 with: drawColor2).
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5218
"/        self selectionOfColor 
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5219
"/            setValue: 0;
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5220
"/            value: (listOfColors indexOf: imageEditView selectedColor).
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5221
    ].
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5222
    self listOfColors asOrderedCollection ~= newListOfColors ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5223
        self listOfColors contents:newListOfColors.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5224
    ].
2870
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  5225
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5226
    "Modified: / 05-09-2017 / 09:03:31 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5227
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5228
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5229
selectedColorsChanged
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5230
    |colorIndices selectedIndex|
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5231
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5232
    (colorIndices := self selectedColors value) size == 1 ifTrue:[        
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5233
        "/ a single color selected
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5234
        selectedIndex := colorIndices first
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5235
    ].    
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5236
    self selectionOfColor value:selectedIndex
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5237
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5238
    "Modified: / 17-02-2017 / 14:40:33 / cg"
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5239
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5240
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5241
update:something with:aParameter from:changedObject
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5242
    |clrIndex image imagePreView clr changedColor cMap|
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5243
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5244
    image := self image.
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  5245
    imagePreView := self imagePreView.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5246
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5247
    changedObject == self tileModeHolder ifTrue:[
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  5248
        imagePreView 
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5249
            tileMode:(changedObject value) tileOffset:(image extent);
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5250
            clear; 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5251
            invalidate.
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5252
        ^ self
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5253
    ].
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5254
    
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5255
    changedObject == self previewBackgroundColorHolder ifTrue:[
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5256
        clr := changedObject value isNil 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5257
                    ifTrue:[imageEditView viewBackground]
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5258
                    ifFalse:[Color perform:changedObject value].
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  5259
        imagePreView 
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5260
            viewBackground:clr;
3493
4396fb652bd7 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3492
diff changeset
  5261
            clear;
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5262
            invalidate.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5263
        ^ self
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5264
    ].
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5265
    changedObject == self previewMagnificationHolder ifTrue:[
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5266
        imagePreView 
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5267
            magnificationFactor:(self previewMagnificationHolder value);
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5268
            clear; 
3493
4396fb652bd7 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3492
diff changeset
  5269
            invalidate.
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5270
        ^ self.    
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5271
    ].
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5272
    
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5273
    changedObject == self listOfColors ifTrue:[
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5274
        something == #at: ifTrue:[
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5275
            "/ colormap entry changed at aParameter
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5276
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5277
            clrIndex := aParameter.
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5278
            (self hasTransparentColorInColorList) ifTrue:[
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5279
                clrIndex := clrIndex - 1.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5280
            ].
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5281
            changedColor := changedObject at:aParameter.
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5282
            cMap := image colorMap.
3407
2e0024e012e9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3405
diff changeset
  5283
            (cMap notNil and:[cMap isFixedPalette not]) ifTrue:[
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5284
                image colorMap at:clrIndex put:changedColor.
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5285
                self colorMapChanged.
3430
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5286
            ] ifFalse:[
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5287
                drawingColormap notNil ifTrue:[
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5288
                    drawingColormap size < clrIndex ifTrue:[
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5289
                        |newDrawingColormap|
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5290
                        
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5291
                        newDrawingColormap := drawingColormap species new:clrIndex.
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5292
                        newDrawingColormap replaceFrom:1 with:drawingColormap.
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5293
                        drawingColormap := newDrawingColormap.
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5294
                    ].    
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5295
                    drawingColormap at:clrIndex put:changedColor.
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5296
                ].
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5297
            ].    
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5298
            ^ self
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5299
        ].
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  5300
        ^ self
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5301
    ].
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5302
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5303
    changedObject == imageEditView undoImages ifTrue:[
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5304
        self canUndoHolder value:(changedObject notEmpty).
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5305
        ^ self.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5306
    ].
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5307
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5308
    changedObject == imageEditView ifTrue:[
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5309
        something == #imageColors ifTrue:[
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5310
            self updateListOfColorsAndColormapMode.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5311
            ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5312
        ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5313
        something == #image ifTrue:[
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5314
            self updateAfterImageChange.
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5315
            imagePreView image:image scroll:false.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5316
            self updateListOfColorsAndColormapMode.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5317
            self tileModeHolder value ifTrue:[
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5318
                imagePreView tileMode:true tileOffset:(image extent).
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5319
            ].
3460
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  5320
            self updateInfoLabel.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5321
            ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5322
        ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5323
        something == #subImageIn ifTrue:[
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5324
            imagePreView image ~~ image ifTrue:[
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  5325
                self error:'internal error' mayProceed:true.
1406
6de5c78f5bcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  5326
            ].
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5327
            self tileModeHolder value ifTrue:[
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  5328
                imagePreView invalidate.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5329
            ] ifFalse:[
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  5330
                imagePreView invalidate:aParameter.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5331
            ].
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5332
            ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5333
        ].
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  5334
        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
  5335
            (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
  5336
                "/ no color/mask */
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  5337
                "/ self halt.
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5338
                clrIndex := self hasTransparentColorInColorList ifTrue:[1] ifFalse:[0].
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  5339
            ] ifFalse:[
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  5340
                clrIndex := self listOfColors indexOf:aParameter.
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  5341
            ].
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5342
            self selectedColors value:{clrIndex}. "/ selectionOfColor value:clrIndex.
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  5343
            ^ self.
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  5344
        ].
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5345
        ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5346
    ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5347
1880
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  5348
    changedObject == imageEditView modifiedHolder ifTrue:[
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  5349
        "/ self halt:'to be implemented'.
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  5350
        ^ self
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  5351
    ].
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  5352
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5353
    changedObject == imageEditView image ifTrue:[
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  5354
        "/ self halt:'to be implemented'.
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5355
        self updateAfterImageChange.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5356
        ^ self.
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5357
    ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5358
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5359
    super update:something with:aParameter from:changedObject
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5360
3493
4396fb652bd7 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3492
diff changeset
  5361
    "Modified: / 13-09-2017 / 18:01:26 / cg"
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5362
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5363
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5364
updateAfterImageChange
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5365
    |img|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5366
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5367
    (img := self image) notNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5368
        img := img onDevice:device.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5369
        self updateColorsFromImage:img.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5370
        self findColorMapMode.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5371
        self updateLabelsAndHistory.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5372
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5373
        imageSeqNr isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5374
            imageSeqNr := 1
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5375
        ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5376
        self imageHasImageSequenceHolder value:(self imageHasImageSequence).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5377
        self imageHasNextImageHolder value:(self imageHasNextImage).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5378
        self imageHasPreviousImageHolder value:(self imageHasPreviousImage).
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5379
        self alphaVisibleHolder value:(img hasAlphaChannel)
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5380
    ] ifFalse:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5381
        self updateForNoImage
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5382
    ]
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5383
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5384
    "Modified: / 05-09-2017 / 00:44:10 / cg"
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5385
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5386
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  5387
updateColorsFromImage:image
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5388
    |colors depth|
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5389
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5390
    depth := image depth.
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5391
    
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5392
    depth > 16 ifTrue:[
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5393
        colors := #()  "/ too many - will only show the one's which are explicitly added.
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5394
    ] ifFalse:[
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5395
        ((image photometric == #blackIs0)
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5396
        or:[ image photometric == #whiteIs0 ]) ifTrue:[
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5397
            depth <= 8 ifTrue:[
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5398
                colors := 1 to:(1 << depth) collect:[:i | image colorFromValue:i-1]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5399
            ].
2870
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  5400
        ].
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5401
        colors isNil ifTrue:[
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5402
            colors := image colorMap.
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5403
            colors isNil ifTrue:[
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5404
                Error handle:[:ex |
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5405
                    colors := OrderedCollection new.
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5406
                ] do:[
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5407
                    colors := image usedColors asSet.
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5408
                ].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5409
            ].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5410
        ].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5411
    ].    
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  5412
    self listOfColors contents:(colors asOrderedCollection).
2870
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  5413
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5414
    "Modified: / 31-08-2017 / 18:54:53 / cg"
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  5415
!
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  5416
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  5417
updateForNoImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5418
    "updates channels and view, if image is loaded"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5419
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5420
    self imageIsLoadedHolder value: false.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5421
    self listOfColors removeAll.
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5422
    self imagePreView image: nil.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5423
    self imageHasImageSequenceHolder value:false.
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5424
    self alphaVisibleHolder value:false.
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5425
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5426
    "Modified: / 05-09-2017 / 00:44:20 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5427
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5428
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5429
updateLabelsAndHistory
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5430
    "updates labels and history, if something has changed"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5431
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5432
    |image rsrcClass rsrcSelector imgFile|
1910
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  5433
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  5434
    image := self image.
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  5435
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5436
    self imageIsLoadedHolder value: image notNil.
1910
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  5437
    image isNil ifTrue: [^nil].
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5438
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5439
    self updateInfoLabel.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5440
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5441
    ((rsrcClass := imageEditView resourceClass) notNil 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5442
    and:[ (rsrcSelector := imageEditView resourceSelector) notNil ]) ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5443
        self addHistoryEntryForClass:rsrcClass selector:rsrcSelector.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5444
    ] ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5445
        (imgFile := image fileName) notNil ifTrue: [
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5446
            self addHistoryEntryForFile:imgFile.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5447
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5448
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5449
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5450
    "Modified: / 01-09-2017 / 10:10:12 / cg"
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5451
!
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5452
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5453
updateListOfColorsAndColormapMode
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5454
    |listOfColors selectedColor colorMap image|
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5455
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5456
    selectedColor := self selectedColorOrNil.
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5457
    listOfColors := self listOfColors.
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5458
    
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5459
    image := self image.
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5460
    image isNil ifTrue:[
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5461
        listOfColors removeAll.
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5462
    ] ifFalse:[
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5463
        colorMap := image colorMap.
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5464
        colorMap notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5465
            (colorMap size <= 4096) ifTrue:[
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5466
                (image mask notNil or:[image hasAlphaChannel]) ifTrue:[
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5467
                    colorMap := (Array with:(Color noColor)),colorMap.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5468
                ].
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5469
                listOfColors contents:colorMap.
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5470
            ] ifFalse:[
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5471
                listOfColors removeAll.
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5472
                colorMap isFixedPalette ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5473
                    image colorMap:nil.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5474
                    image photometric:#rgb.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5475
                    image samplesPerPixel:3.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5476
                    
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5477
                    image bitsPerSample:(Array 
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5478
                                            with:(colorMap bitsRed)
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5479
                                            with:(colorMap bitsGreen)
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5480
                                            with:(colorMap bitsBlue)).
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5481
                ].
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5482
            ]
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5483
        ].
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5484
    ].
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5485
    self findColorMapMode.
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5486
    selectedColor notNil ifTrue:[
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5487
        self selectColor:selectedColor.
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5488
    ].
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5489
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5490
    "Modified: / 05-09-2017 / 08:25:14 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5491
! !
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5492
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5493
!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
  5494
1951
9ad40a628278 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  5495
atColor:anOldColor put:newColor
1952
73a141744891 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1951
diff changeset
  5496
    "a color changed to a new color"
73a141744891 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1951
diff changeset
  5497
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5498
    |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
  5499
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5500
    list  := self listOfColors.
1951
9ad40a628278 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  5501
    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
  5502
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5503
    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
  5504
    index ~~ 0 ifTrue:[
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5505
        oldColor := list at:index.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5506
        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
  5507
    ] ifFalse:[
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  5508
        self error:'internal error' mayProceed:true.
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5509
        list add:newColor
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5510
    ].
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5511
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5512
    image := self image.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5513
    (image colorMap isNil 
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5514
    and:[drawingColormap isNil]) ifTrue:[
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5515
        oldColor notNil ifTrue:[
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5516
            imageEditView makeUndo.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5517
            newImage := image copy.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5518
            newImage
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5519
                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
  5520
                do:[:x :y :clr |
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5521
                    |newClr|
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5522
1951
9ad40a628278 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  5523
                    newClr := (clr = oldColor) ifTrue:[newColor] ifFalse:[clr].
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5524
                    newImage colorAtX:x y:y put:newClr
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5525
                ].
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5526
            imageEditView image:newImage.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5527
            imageEditView setModified.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5528
            self updateImage.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5529
            self updateImagePreView.
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5530
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5531
            self selectedColors value:{oldSel}.
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5532
            imageEditView selectedColorIndex:oldSel.
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5533
            imageEditView selectedColor:(self listOfColors at:oldSel).
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5534
        ]
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5535
    ].
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5536
!
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5537
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5538
blueAtColor:aColor put:newBlue
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5539
    "helper used to return a new row element, when blue is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5540
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5541
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5542
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5543
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5544
    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
  5545
    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
  5546
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5547
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5548
             put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5549
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5550
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5551
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
  5552
    "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
  5553
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  5554
    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
  5555
    ^ 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
  5556
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5557
    "Created: / 26.7.1998 / 12:30:35 / cg"
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  5558
    "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
  5559
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5560
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5561
canSelectBlueInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5562
    ^ aColor blueByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5563
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5564
    "Created: / 7.8.1998 / 22:50:34 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5565
    "Modified: / 7.8.1998 / 22:52:57 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5566
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5567
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5568
canSelectGreenInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5569
    ^ aColor greenByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5570
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5571
    "Created: / 7.8.1998 / 22:50:22 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5572
    "Modified: / 7.8.1998 / 22:52:46 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5573
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5574
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5575
canSelectRedInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5576
    ^ aColor redByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5577
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5578
    "Created: / 7.8.1998 / 22:50:00 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5579
    "Modified: / 7.8.1998 / 22:51:03 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5580
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5581
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5582
greenAtColor:aColor put:newGreen
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5583
    "helper used to return a new row element, when green is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5584
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5585
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5586
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5587
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5588
    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
  5589
    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
  5590
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5591
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5592
             put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5593
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5594
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5595
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
  5596
    "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
  5597
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  5598
    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
  5599
    ^ 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
  5600
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5601
    "Created: / 26.7.1998 / 12:30:29 / cg"
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  5602
    "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
  5603
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5604
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5605
redAtColor:aColor put:newRed
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5606
    "helper used to return a new row element, when red is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5607
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5608
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5609
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5610
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5611
    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
  5612
    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
  5613
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5614
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5615
             put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5616
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5617
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5618
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
  5619
    "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
  5620
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  5621
    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
  5622
    ^ 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
  5623
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  5624
    "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
  5625
!
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  5626
2712
cddda688a9f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
  5627
theColorItself:aColor
cddda688a9f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
  5628
    "an accessor for the table-column"
cddda688a9f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
  5629
1449
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  5630
    ^ 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
  5631
! !
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5632
2663
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  5633
!ImageEditor methodsFor:'defaults'!
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  5634
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  5635
aboutIcon
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  5636
    ^ self class defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  5637
! !
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  5638
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5639
!ImageEditor methodsFor:'drag & drop'!
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5640
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5641
canDropObjects:aCollectionOfDropObjects in:aWidget
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5642
    ^ (aCollectionOfDropObjects size == 1) 
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5643
      and:[ aCollectionOfDropObjects 
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5644
                contains:[:dropObject | dropObject isFileObject]]
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5645
!
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5646
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5647
dropObjects:aCollectionOfDropObjects in:aWidget at:position
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5648
    |dropObject|
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5649
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5650
    dropObject := aCollectionOfDropObjects first.
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5651
    dropObject isFileObject ifTrue:[
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5652
        self loadFromFile:dropObject asFilename.
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5653
    ]
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5654
! !
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5655
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5656
!ImageEditor methodsFor:'event handling'!
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5657
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5658
processEvent:anEvent
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5659
    "Return true, if I have eaten the event"
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5660
2945
facf3c7b0e31 changed: #processEvent:
Claus Gittinger <cg@exept.de>
parents: 2932
diff changeset
  5661
    <resource: #keyboard (#Paste #Copy )>
facf3c7b0e31 changed: #processEvent:
Claus Gittinger <cg@exept.de>
parents: 2932
diff changeset
  5662
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5663
    |view focusView p transformation|
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5664
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5665
    view := anEvent view.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5666
    view notNil ifTrue:[
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5667
        
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5668
        view == self imagePreView ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5669
            ((anEvent isButtonPressEvent and:[ anEvent button == 1 ])
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5670
            or:[ anEvent isButtonMotionEvent and:[ anEvent hasButton1 ]])  ifTrue:[
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5671
                p := anEvent x @ anEvent y.                
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5672
                (transformation := view transformation) notNil ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5673
                    p := transformation applyInverseTo:p.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5674
                ].
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5675
                p := p / self previewMagnificationHolder value.
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5676
                self imageEditView scrollToMakeVisible:p.    
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5677
                ^ true.
2546
b69247f503b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2539
diff changeset
  5678
            ].
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5679
        ].
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5680
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5681
        anEvent isKeyPressEvent ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5682
            focusView := view windowGroup focusView ? view.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5683
            (focusView isComponentOf:(builder componentAt:#colorDataSetView)) ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5684
                anEvent key == #Paste ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5685
                    self pasteColorIntoColormap.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5686
                    ^ true.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5687
                ].
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5688
                anEvent key == #Copy ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5689
                    self copyColorFromColormap.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5690
                    ^ true.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5691
                ].
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5692
            ].
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5693
        ].
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5694
    ].
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5695
    ^ false.
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5696
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5697
    "Modified: / 10-09-2017 / 16:40:13 / cg"
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5698
! !
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5699
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  5700
!ImageEditor methodsFor:'help'!
738210a2fa06 revised version
tz
parents: 651
diff changeset
  5701
738210a2fa06 revised version
tz
parents: 651
diff changeset
  5702
defaultInfoLabel
1969
f1763f6f4500 stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents: 1967
diff changeset
  5703
    "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
  5704
     some widget with a help text."
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  5705
3465
510f01b982de #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3464
diff changeset
  5706
    |resourceClass resourceSelector img|
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5707
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5708
    resourceClass := imageEditView resourceClass.
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  5709
    resourceClass notNil ifTrue:[
1969
f1763f6f4500 stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents: 1967
diff changeset
  5710
        resourceSelector := imageEditView resourceSelector.
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5711
        resourceSelector notNil ifTrue:[
3469
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5712
            ^ resources 
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5713
                    string:(self modified 
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5714
                            ifTrue:['Image (modified) from: %1 » %2']
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5715
                            ifFalse:['Image from: %1 » %2'])
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5716
                    with:resourceClass name
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5717
                    with:resourceSelector
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5718
        ].
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  5719
    ].
3465
510f01b982de #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3464
diff changeset
  5720
    
510f01b982de #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3464
diff changeset
  5721
    (img := imageEditView image) notNil ifTrue:[
510f01b982de #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3464
diff changeset
  5722
        img fileName notNil ifTrue:[
3469
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5723
            ^ resources 
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5724
                    string:(self modified 
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5725
                            ifTrue:['Image (modified) from: %1']
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5726
                            ifFalse:['Image from: %1'])
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5727
                     with:(img fileName asFilename baseName).
3465
510f01b982de #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3464
diff changeset
  5728
        ].    
510f01b982de #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3464
diff changeset
  5729
    ].    
3380
0eb344c2fe3a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3379
diff changeset
  5730
    ^ resources string:'No class and selector defined.'
3465
510f01b982de #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3464
diff changeset
  5731
3469
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5732
    "Modified: / 29-08-2017 / 19:47:25 / cg"
674
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  5733
!
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  5734
702
c9de7a9bc416 docu call changed
tz
parents: 694
diff changeset
  5735
openDocumentation
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5736
    "opens the documentation file of the Image Editor"
674
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  5737
763
19b3e479e0b8 docu call
tz
parents: 756
diff changeset
  5738
    self openHTMLDocument: 'tools/uipainter/ImageEditor.html'
19b3e479e0b8 docu call
tz
parents: 756
diff changeset
  5739
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  5740
! !
738210a2fa06 revised version
tz
parents: 651
diff changeset
  5741
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5742
!ImageEditor methodsFor:'loading'!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5743
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5744
loadFromClass:aClass andSelector:aSelector
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5745
    "loads an image from the method specified by class and selector"
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5746
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5747
    self assert:(aClass isNil or:[aClass isClass]).
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5748
2932
7f305ee14e98 changed: #loadFromClass:andSelector:
Claus Gittinger <cg@exept.de>
parents: 2893
diff changeset
  5749
    (aClass isNil or:[aSelector isNil]) ifTrue:[
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5750
        imageEditView resourceClass:aClass.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5751
        imageEditView resourceSelector:aSelector.
1969
f1763f6f4500 stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents: 1967
diff changeset
  5752
        imageEditView image:nil.
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  5753
        self clearModified.
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5754
        ^ self.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5755
    ].
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5756
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5757
    (imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue:[
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5758
        self updateAfterImageChange.
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  5759
        self clearModified.
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5760
    ]
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5761
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5762
    "Modified: / 16-03-1999 / 21:44:41 / cg"
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5763
    "Modified (comment): / 16-02-2017 / 10:22:51 / cg"
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5764
!
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5765
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5766
loadFromFile:aFileName
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5767
    "loads an image from aFileName and sets up color map list and other info labels"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5768
980
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  5769
    self withCursor:Cursor wait do:[
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  5770
        (imageEditView loadFromFile: aFileName) notNil ifTrue:[
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5771
            self updateAfterImageChange
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5772
        ]
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5773
    ]
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5774
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5775
    "Modified: / 16.3.1999 / 21:44:26 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5776
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5777
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5778
loadFromImage:anImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5779
    "loads an image from anImage and sets up color map list and other info labels"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5780
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5781
    |img|
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5782
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5783
    anImage notNil ifTrue:[    
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5784
        img := anImage onDevice:device.
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5785
    ].
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5786
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5787
    imageEditView image:img.
1799
e605f0af928a clear modified flag when an image is loaded
Claus Gittinger <cg@exept.de>
parents: 1796
diff changeset
  5788
    imageEditView clearModified.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5789
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5790
    self updateAfterImageChange.
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5791
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5792
    "Modified: / 16-03-1999 / 21:43:56 / cg"
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5793
    "Modified (comment): / 16-02-2017 / 10:21:47 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5794
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5795
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5796
loadFromOrPrepareForClass: aClass andSelector: aSelector
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5797
    "loads an image by evaluating aMessage;
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5798
     if no image could extract from aMessage; do set the class and the selector from 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5799
     the aMessage for a saving at the end of editing"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5800
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5801
    (imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue: [
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  5802
        self updateColorsFromImage:self image.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5803
        self findColorMapMode.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5804
    ] ifFalse: [
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5805
        imageEditView resourceClass: aClass.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5806
        imageEditView resourceSelector:aSelector.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5807
    ].
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5808
    self updateLabelsAndHistory.
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5809
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5810
    "Modified: / 16.3.1999 / 21:45:07 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5811
! !
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5812
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5813
!ImageEditor methodsFor:'menu aspects'!
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5814
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5815
canDrawCirclesHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5816
    ^ self imageIsLoadedAndNotReadonlyHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5817
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5818
    "Created: / 16-02-2017 / 01:41:31 / cg"
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5819
!
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5820
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5821
canDrawPointsHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5822
    ^ self imageIsLoadedAndNotReadonlyHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5823
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5824
    "Created: / 16-02-2017 / 01:39:37 / cg"
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5825
!
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5826
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5827
canDrawRectsHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5828
    ^ self imageIsLoadedAndNotReadonlyHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5829
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5830
    "Created: / 16-02-2017 / 01:40:17 / cg"
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5831
!
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5832
3435
e3e1eea25472 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  5833
canFillCircleHolder
e3e1eea25472 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  5834
    ^ self imageIsLoadedAndNotReadonlyHolder
e3e1eea25472 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  5835
e3e1eea25472 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  5836
    "Created: / 10-04-2017 / 08:46:00 / cg"
e3e1eea25472 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  5837
!
e3e1eea25472 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  5838
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5839
canFillRectsHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5840
    ^ self imageIsLoadedAndNotReadonlyHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5841
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5842
    "Created: / 16-02-2017 / 01:40:21 / cg"
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5843
!
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5844
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5845
canFloodFillHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5846
    ^ self imageIsLoadedAndNotReadonlyHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5847
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5848
    "Created: / 16-02-2017 / 01:41:33 / cg"
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5849
!
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5850
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5851
canSprayHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5852
    ^ self imageIsLoadedAndNotReadonlyHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5853
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5854
    "Created: / 16-02-2017 / 01:44:47 / cg"
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5855
!
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5856
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5857
colorMapMenuHolder
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5858
    ^ [ self class colorMapMenu ]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5859
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5860
    "Created: / 31-08-2017 / 18:47:17 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5861
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5862
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5863
imageIsLoadedAndAllowedToChangeImageDimension
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5864
    "returns whether an image is loaded as value holder"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5865
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5866
    ^ [ 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5867
        self imageIsLoadedHolder value
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5868
        and:[ self allowedToChangeImageDimension ] 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5869
      ]
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5870
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5871
    "Created: / 16-02-2017 / 01:58:41 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5872
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5873
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5874
imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5875
    "returns whether an image is loaded as value holder"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5876
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5877
    ^ [ 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5878
        self imageIsLoadedHolder value
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5879
        and:[ self allowedToChangeImageDimensionAndDepth ] 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5880
      ]
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5881
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5882
    "Modified: / 04-07-2010 / 10:15:43 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5883
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5884
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5885
imageIsLoadedAndAllowedToFlipHolder
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5886
    ^ self imageIsLoadedAndNotReadonlyHolder
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5887
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5888
    "Created: / 16-02-2017 / 01:57:02 / cg"
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5889
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5890
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5891
imageIsLoadedAndClassDefined
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5892
    "returns whether an image is loaded as value holder"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5893
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5894
    ^ [self hasClassAndSelectorDefinedHolder value
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5895
       and:[self imageIsLoadedHolder value]]
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5896
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5897
    "Created: / 31-07-1998 / 02:04:18 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5898
    "Modified: / 04-07-2010 / 10:15:48 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5899
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5900
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5901
imageIsLoadedAndNotReadonlyHolder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5902
    "returns whether an image is loaded and editable as value holder"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5903
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5904
    ^ BlockValue
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5905
        with:[:loaded | loaded and:[ self readOnly not ]]
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5906
        argument:(self imageIsLoadedHolder)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5907
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5908
    "Modified: / 16-02-2017 / 12:11:31 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5909
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5910
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5911
imageIsLoadedHolder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5912
    "returns whether an image is loaded as value holder"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5913
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5914
    |holder|
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5915
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5916
    (holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5917
        builder aspectAt:#imageIsLoaded put:(holder :=  false asValue).
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5918
    ].
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5919
    ^ holder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5920
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5921
    "Created: / 04-07-2010 / 10:15:38 / cg"
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5922
! !
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5923
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5924
!ImageEditor methodsFor:'menu item visibility'!
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5925
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5926
isNotStandAloneAndMethodSaveAndLoadMenuItemsVisible
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5927
    ^ self isNotStandAlone and:[ self methodSaveAndLoadMenuItemsVisible ]
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5928
!
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5929
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5930
isStandAloneAndMethodSaveAndLoadMenuItemsVisible
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5931
    ^ self isStandAlone and:[ self methodSaveAndLoadMenuItemsVisible ]
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5932
!
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5933
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5934
methodSaveAndLoadMenuItemsVisible
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5935
    ^ true
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5936
!
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5937
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5938
modeMenuVisible
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5939
    ^ true
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5940
! !
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  5941
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5942
!ImageEditor methodsFor:'menu modes'!
228524287573 intitial checkin
tz
parents:
diff changeset
  5943
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  5944
colorMapMode
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5945
    "returns the colorMapMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5946
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  5947
    colorMapMode isNil ifTrue: [colorMapMode := '' asValue].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5948
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  5949
    ^colorMapMode
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5950
!
228524287573 intitial checkin
tz
parents:
diff changeset
  5951
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  5952
editMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  5953
    "returns editMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5954
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  5955
    editMode isNil ifTrue: [
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  5956
        editMode := #point asValue.
1329
a38c2e29d1fb use onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
  5957
        editMode onChangeEvaluate:[imageEditView editMode:(editMode value)]
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  5958
    ].
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  5959
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  5960
    ^editMode
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5961
!
228524287573 intitial checkin
tz
parents:
diff changeset
  5962
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  5963
mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  5964
    "returns mouseKeyColorMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5965
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5966
    mouseKeyColorMode isNil ifTrue:[
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  5967
        mouseKeyColorMode := 1 asValue.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5968
        mouseKeyColorMode onChangeEvaluate: [
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5969
            imageEditView mouseKeyColorMode:mouseKeyColorMode value. 
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5970
            self selectedColors value:{ self listOfColors indexOf:imageEditView selectedColor }.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5971
        ]
956
dc4df8952e82 check whether imageEditView is nil
ca
parents: 951
diff changeset
  5972
    ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5973
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  5974
    ^mouseKeyColorMode
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5975
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5976
    "Modified: / 10.2.2000 / 23:16:42 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5977
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  5978
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5979
!ImageEditor methodsFor:'private'!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5980
3460
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  5981
askForDepthThenDo:aBlock
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  5982
    |oldDepth suggestion depth|
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  5983
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  5984
    oldDepth := self image depth.
3471
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  5985
    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  5986
    suggestion := LastDepth notNil ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  5987
                    LastDepth
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  5988
                  ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  5989
                    oldDepth > 8 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  5990
                        ifTrue:[8] 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  5991
                        ifFalse:[(oldDepth // 2 - 1) nextPowerOf2]
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  5992
                  ].
3460
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  5993
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  5994
    depth := Dialog request:'New depth ?' initialAnswer:suggestion asString.
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  5995
    depth isEmptyOrNil ifTrue:[^ self].
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  5996
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  5997
    depth := Number readFrom:depth onError:nil.
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  5998
    depth isNil ifTrue:[^ self].
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  5999
3471
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  6000
    LastDepth := depth.    
3460
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6001
    aBlock value:depth
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6002
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6003
    "Created: / 24-08-2017 / 17:05:39 / cg"
3471
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  6004
    "Modified: / 30-08-2017 / 01:22:36 / cg"
3460
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6005
!
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6006
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6007
checkModified
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6008
    imageEditView modified value ifTrue:[
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6009
        (Dialog
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6010
            confirm:(resources string:'Image was not saved. Proceed anyway ?')
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6011
            yesLabel:(resources string:'Proceed')
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6012
            noLabel:(resources string:'Cancel')
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6013
            initialAnswer:false
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6014
        ) ifFalse: [^false].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6015
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6016
        imageEditView clearModified.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6017
    ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6018
    ^ true
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6019
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6020
    "Modified: / 29.7.1998 / 18:55:24 / cg"
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6021
!
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6022
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6023
clearModifiedAndRememberImageSaved
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6024
    "called after a save-to-xxx operation"
3375
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  6025
    
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  6026
    self clearModified.
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  6027
    savedImage := self image.
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  6028
!
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  6029
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6030
clearModifiedAndRememberImageSavedAsFile:file
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6031
    "called after a save-to-file operation"
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6032
    
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6033
    self clearModifiedAndRememberImageSaved.
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6034
    savedFile := file.
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6035
!
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6036
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6037
pointFromString:aString
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6038
    |p s x y|
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6039
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6040
    p := Object readFromString:aString onError:nil.
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  6041
    p isPoint ifTrue:[^ p].
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6042
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6043
    s := aString readStream.
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6044
    x := Number readFrom:s onError:nil.
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6045
    x notNil ifTrue:[
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6046
        s skipSeparators.
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  6047
        [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
  6048
        y := Number readFrom:s onError:nil.
1961
d9082e597adb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1960
diff changeset
  6049
        ^ x @ (y ? x)
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6050
    ].
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  6051
    ^ nil
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6052
!
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6053
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6054
sortBlockForColors
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6055
    ^ self sortBlockForColorsByHLS.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6056
"/    ^ self sortBlockForColorsByRGB
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6057
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6058
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6059
sortBlockForColorsByHLS
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6060
    ^ [:a :b |
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6061
        |h1 h2 s1 s2 l1 l2|
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6062
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6063
        h1 := a hue ? 0.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6064
        h2 := b hue ? 0.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6065
        (h1 between: h2-30 and:h2+30) ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6066
            l1 := a light.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6067
            l2 := b light.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6068
            l1 = l2 ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6069
                a saturation < b saturation
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6070
            ] ifFalse:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6071
                l1 < l2
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6072
            ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6073
"/            s1 := a saturation.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6074
"/            s2 := b saturation.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6075
"/            s1 = s2 ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6076
"/                a light < b light
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6077
"/            ] ifFalse:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6078
"/                s1 < s2 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6079
"/            ]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6080
        ] ifFalse:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6081
            h1 < h2 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6082
        ]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6083
      ]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6084
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6085
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6086
sortBlockForColorsByRGB
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6087
    ^ [:a :b |
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6088
            a redByte == b redByte ifTrue:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6089
                a greenByte == b greenByte ifTrue:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6090
                    a blueByte < b blueByte
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6091
                ] ifFalse:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6092
                    a greenByte < b greenByte 
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6093
                ]
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6094
            ] ifFalse:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6095
                a redByte < b redByte 
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6096
            ]
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6097
      ]
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6098
!
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6099
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6100
updateImage
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6101
    |img|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6102
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6103
    img := imageEditView image.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6104
    imageEditView image:img.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6105
    self fetchImageData.
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6106
    self imageIsLoadedHolder changed.
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6107
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6108
    "Modified: / 16-02-2017 / 12:18:08 / cg"
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6109
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6110
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  6111
updateImagePreView
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  6112
    self tileModeHolder value ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  6113
        self imagePreView tileMode:true tileOffset:(self image extent).
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6114
    ].
3253
32b2ae3350b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3242
diff changeset
  6115
    self imagePreView 
32b2ae3350b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3242
diff changeset
  6116
        setImage:(self image) scroll:false invalidate:false; "/ true.
32b2ae3350b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3242
diff changeset
  6117
        invalidate.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  6118
! !
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  6119
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  6120
!ImageEditor methodsFor:'queries'!
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  6121
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6122
hasAlphaChannel
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6123
    |img|
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6124
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6125
    img := self image.
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6126
    img isNil ifTrue:[^ false].
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6127
    ^ img hasAlphaChannel
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6128
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6129
    "Created: / 05-09-2017 / 08:29:23 / cg"
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6130
!
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6131
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6132
hasLastGrabScreenArea
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6133
    ^ [ lastGrabbedScreenArea notNil ]
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6134
!
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6135
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  6136
hasMask
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6137
    |img|
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6138
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6139
    img := self image.
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6140
    img isNil ifTrue:[^ false].
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6141
    img mask isNil ifTrue:[^ false].
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6142
    ^ colorMapMode value notNil and:[colorMapMode value startsWith:'mask']
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  6143
3411
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  6144
    "Created: / 18-08-1998 / 17:17:38 / cg"
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6145
    "Modified: / 05-09-2017 / 08:28:44 / cg"
3411
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  6146
!
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  6147
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  6148
hasMaskHolder
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  6149
    ^ [ self hasMask ]
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  6150
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  6151
    "Created: / 18-02-2017 / 00:41:19 / cg"
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  6152
!
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  6153
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6154
hasTransparentColorInColorList
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6155
    ^ self hasMask or:[self hasAlphaChannel]
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6156
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6157
    "Created: / 05-09-2017 / 09:03:24 / cg"
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6158
!
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6159
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6160
modified
3416
9d51a45479e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3415
diff changeset
  6161
    "true if the image was modified"
9d51a45479e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3415
diff changeset
  6162
    
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6163
    ^ imageEditView modified
3416
9d51a45479e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3415
diff changeset
  6164
9d51a45479e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3415
diff changeset
  6165
    "Modified (comment): / 20-02-2017 / 16:23:32 / cg"
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6166
!
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6167
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6168
modified:aBoolean
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6169
    super modified:aBoolean.
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6170
    imageEditView modified:aBoolean
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6171
!
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6172
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  6173
preferredExtent
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6174
    "returns the preferred extent"
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  6175
3443
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
  6176
    ^ super preferredExtent max: ((Screen current width//3)@(Screen current height//3.5))
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
  6177
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
  6178
    "Modified (format): / 13-04-2017 / 09:52:25 / cg"
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  6179
! !
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  6180
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6181
!ImageEditor methodsFor:'selection'!
228524287573 intitial checkin
tz
parents:
diff changeset
  6182
228524287573 intitial checkin
tz
parents:
diff changeset
  6183
magnification
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6184
    "returns the magnification of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6185
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  6186
    self imageEditView isNil ifTrue: [^1].
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  6187
    ^imageEditView magnification x
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6188
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6189
228524287573 intitial checkin
tz
parents:
diff changeset
  6190
magnification: aValue
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6191
    "sets the magnification of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6192
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
  6193
    |magnification|        
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
  6194
    magnification := (aValue ? 1) asPoint.
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  6195
    (magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil].
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  6196
    imageEditView magnification: magnification
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6197
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6198
228524287573 intitial checkin
tz
parents:
diff changeset
  6199
selectedColorIndex
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6200
    "returns the index of the selected color"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6201
228524287573 intitial checkin
tz
parents:
diff changeset
  6202
    ^selectedColorIndex
228524287573 intitial checkin
tz
parents:
diff changeset
  6203
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6204
228524287573 intitial checkin
tz
parents:
diff changeset
  6205
selectedColorIndex: anIndex
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6206
    "sets the index of the selected color"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6207
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6208
    |clr pixel|
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6209
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6210
    selectedColorIndex := anIndex.
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  6211
    anIndex isNil ifTrue:[^ self].
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  6212
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6213
    clr := self listOfColors at:anIndex ifAbsent:nil.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6214
    clr isNil ifTrue:[^ self].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6215
1075
74795d3e647d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1057
diff changeset
  6216
    pixel := anIndex - 1.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6217
    (self listOfColors at:1) = Color noColor ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6218
        anIndex == 1 ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6219
            pixel := nil.       "/ mask
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6220
        ] ifFalse:[
1075
74795d3e647d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1057
diff changeset
  6221
            pixel := pixel - 1
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6222
        ]
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6223
    ].
3409
d821859c163e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3408
diff changeset
  6224
    imageEditView selectedColor:clr.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6225
    imageEditView selectedColorIndex:pixel.
3409
d821859c163e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3408
diff changeset
  6226
d821859c163e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3408
diff changeset
  6227
    "Modified: / 17-02-2017 / 16:29:09 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6228
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  6229
1716
5ae373f6fef0 method category rename
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
  6230
!ImageEditor methodsFor:'startup & release'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6231
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6232
closeDownViews
1644
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6233
    builder notNil ifTrue:[
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6234
        DefaultRelativeSizes :=
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6235
            Array 
1998
efd9be2585e3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1996
diff changeset
  6236
                with:(builder componentAt:#mainPanel) relativeCorners    
1644
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6237
                with:(builder componentAt:#verticalPanel) relativeCorners.
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6238
    ].
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6239
    super closeDownViews
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6240
!
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6241
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6242
closeRequest
2016
62843f7d07b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2006
diff changeset
  6243
    "asks for permission before closing"
62843f7d07b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2006
diff changeset
  6244
62843f7d07b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2006
diff changeset
  6245
    imageEditView checkModified ifTrue:[
62843f7d07b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2006
diff changeset
  6246
        super closeRequest
62843f7d07b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2006
diff changeset
  6247
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6248
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6249
1980
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6250
commonPostBuild
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6251
    imageEditView undoImages addDependent:self.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6252
    imageEditView imageInfoHolder:(self imageInfoHolder).
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6253
    imageEditView activityInfoHolder:(self activityInfoHolder).
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6254
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6255
    imageEditView clickInfoCallBack:[:button :point | 
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6256
                        |mouseButtonColorToolBar|
3170
a49100905be3 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
  6257
                        button <= 2 ifTrue:[
a49100905be3 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
  6258
                            mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar.
a49100905be3 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
  6259
                            (mouseButtonColorToolBar itemAt:button) toggleIndication.
a49100905be3 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
  6260
                            mouseButtonColorToolBar do: [:i| i updateIndicators].
a49100905be3 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
  6261
                        ].
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6262
                  ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6263
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6264
    imageEditView addDependent:self.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6265
    imageEditView modifiedHolder addDependent:self.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6266
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6267
    DefaultRelativeSizes notNil ifTrue:[
1998
efd9be2585e3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1996
diff changeset
  6268
        (builder componentAt:#mainPanel) relativeCorners:DefaultRelativeSizes first.
1980
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6269
        (builder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second.
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6270
    ].
1995
ad11533a39e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1993
diff changeset
  6271
1996
d18588052ade infoHolder handling
Claus Gittinger <cg@exept.de>
parents: 1995
diff changeset
  6272
    "/ using masters infoHolder ?
d18588052ade infoHolder handling
Claus Gittinger <cg@exept.de>
parents: 1995
diff changeset
  6273
    (builder aspectAt:#useAlienInfoLabelHolder) == true ifTrue:[
1998
efd9be2585e3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1996
diff changeset
  6274
        (builder componentAt:#mainPanel) layout bottomOffset:0.
1995
ad11533a39e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1993
diff changeset
  6275
        (builder componentAt:#infoBarSubSpec) beInvisible
ad11533a39e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1993
diff changeset
  6276
    ]
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6277
!
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6278
1980
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6279
open
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6280
    "after opening, gets the imageEditView"
1980
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6281
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6282
    super open.
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6283
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6284
    imageEditView := (self componentAt: #imageEditView) subViews first.
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6285
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6286
    "Modified (comment): / 05-09-2017 / 10:39:45 / cg"
1980
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6287
!
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6288
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6289
postOpenWith:aBuilder
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6290
    "after opening, sets the masterApplication of the imageEditView to self;
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6291
     evaluate the postOpenAction"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6292
1921
699dca2ebb51 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1916
diff changeset
  6293
    postOpenAction value.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6294
1250
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  6295
    super postOpenWith:aBuilder.
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  6296
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  6297
    aBuilder keyboardProcessor menuBar:nil.
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  6298
    self windowGroup addPreEventHook:self.
3415
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  6299
    self colorCropTabSelectionIndexChanged.
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  6300
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  6301
    self drawingColor1Holder valueHolder:(imageEditView drawingColorHolders at:1).
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  6302
    self drawingColor2Holder valueHolder:(imageEditView drawingColorHolders at:2).
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6303
    imageEditView drawingAlpha:(self alphaHolder value).
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6304
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6305
    "Modified (format): / 05-09-2017 / 10:40:10 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6306
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  6307
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  6308
!ImageEditor methodsFor:'user actions-colormap'!
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6309
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6310
addColorToColormap
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6311
    "undoable: add black (a new color) to the map"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6312
    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6313
    self addColorToColormap:(Color black) undoable:true
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6314
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6315
    "Modified: / 31-08-2017 / 14:30:32 / cg"
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6316
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6317
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6318
addColorToColormap:newColor
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6319
    "undoable
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6320
     when editing a palette image, the new color is added to the image's colorMap
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6321
     (unless it is full).
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6322
     When editing a true-color image, it is added to my own list-of-colors,
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6323
     which only holds drawing colors, but is not the colormap's image"
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6324
     
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  6325
    |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
  6326
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6327
    img := self image.
1499
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  6328
    img isNil ifTrue:[
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  6329
        self warn:'No Image.'.
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  6330
        ^ self
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  6331
    ].
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  6332
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6333
    depth := img depth.
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6334
    cMap := img colorMap.
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  6335
    (cMap isNil or:[cMap isMappedPalette or:[cMap isFixedPalette]]) ifTrue:[
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  6336
        drawingColormap isNil ifTrue:[
1916
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  6337
            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
  6338
            drawingColormap := OrderedCollection new.
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  6339
        ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6340
        drawingColormap add:newColor.
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  6341
        self listOfColors contents:drawingColormap.
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6342
        self selectedColors value:{drawingColormap size}.
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  6343
        "/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6344
        ^ self
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6345
    ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6346
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6347
    (cMap size == (1 bitShift:depth)) ifTrue:[
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6348
        depth >= 8 ifTrue:[
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6349
            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
  6350
            ^ self
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6351
        ].
1916
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  6352
        (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
  6353
        ifFalse:[
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6354
            ^ self
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6355
        ].
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6356
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6357
        imageEditView makeUndo.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6358
        img mask notNil ifTrue:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6359
            newMode := 'masked' , (depth*2) printString.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6360
        ] ifFalse:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6361
            newMode := 'depth' , (depth*2) printString.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6362
        ].
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6363
        self colorMapMode:newMode.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6364
    ] ifFalse:[
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6365
        imageEditView makeUndo.
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6366
    ].
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6367
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6368
    cMap := cMap asArray.
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  6369
    listOfColors := self listOfColors.
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  6370
    oldCListSize := listOfColors size.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6371
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6372
    newColorMap := cMap copyWith:newColor.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6373
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6374
    newImage := img species new
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6375
                    width:(img width) height:(img height) depth:depth
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6376
                    fromArray:img bits.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6377
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6378
    newImage colorMap:newColorMap.  
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6379
    newImage fileName:img fileName.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6380
    newImage mask:(img mask copy).
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6381
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6382
    (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
  6383
        listOfColors contents: newImage colorMap.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6384
        self findColorMapMode.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6385
        "/ 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
  6386
        listOfColors size > (oldCListSize + 1) ifTrue:[
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  6387
            listOfColors removeLast
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6388
        ].
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6389
        self selectedColors value:{listOfColors size}.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6390
        self updateLabelsAndHistory.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6391
    ]
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6392
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  6393
    "Created: / 12-03-1999 / 00:20:28 / cg"
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6394
    "Modified: / 16-02-2017 / 10:17:25 / cg"
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6395
    "Modified (comment): / 31-08-2017 / 14:28:11 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6396
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6397
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6398
addColorToColormap:newColor undoable:undoable
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6399
    "when editing a palette image, the new color is added to the image's colorMap
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6400
     (unless it is full).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6401
     When editing a true-color image, it is added to my own list-of-colors,
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6402
     which only holds drawing colors, but is not the colormap's image"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6403
     
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6404
    |depth img cMap newColorMap newImage oldCListSize newMode listOfColors|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6405
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6406
    img := self image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6407
    img isNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6408
        self warn:'No Image.'.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6409
        ^ self
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6410
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6411
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6412
    depth := img depth.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6413
    cMap := img colorMap.
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6414
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6415
    (cMap notNil and:[cMap isMappedPalette or:[cMap isArray]]) ifTrue:[
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6416
    ] ifFalse:[
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6417
        (cMap isNil or:[cMap isFixedPalette]) ifTrue:[
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6418
            drawingColormap isNil ifTrue:[
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6419
                self information:(resources stringWithCRs:'Image has no colormap.\The shown colorMap is for drawing only.').
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6420
                drawingColormap := OrderedCollection new.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6421
            ].
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6422
            drawingColormap add:newColor.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6423
            self listOfColors contents:drawingColormap.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6424
            self selectedColors value:{drawingColormap size}.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6425
            "/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6426
            ^ self
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6427
        ].
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6428
    ].
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6429
    
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6430
    (cMap size == (1 bitShift:depth)) ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6431
        depth >= 8 ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6432
            self warn:'No space for more colors in colormap.'.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6433
            ^ self
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6434
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6435
        (self confirm:(resources stringWithCRs:'No space for more colors in colormap.\Change depth ?'))
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6436
        ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6437
            ^ self
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6438
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6439
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6440
        undoable ifTrue:[ imageEditView makeUndo ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6441
        img mask notNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6442
            newMode := 'masked' , (depth*2) printString.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6443
        ] ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6444
            newMode := 'depth' , (depth*2) printString.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6445
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6446
        self colorMapMode:newMode.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6447
    ] ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6448
        undoable ifTrue:[ imageEditView makeUndo ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6449
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6450
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6451
    cMap := cMap asArray.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6452
    listOfColors := self listOfColors.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6453
    oldCListSize := listOfColors size.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6454
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6455
    newColorMap := cMap copyWith:newColor.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6456
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6457
    newImage := img species new
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6458
                    width:(img width) height:(img height) depth:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6459
                    fromArray:img bits.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6460
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6461
    newImage colorMap:newColorMap.  
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6462
    newImage fileName:img fileName.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6463
    newImage mask:(img mask copy).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6464
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6465
    (imageEditView image:newImage) notNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6466
        listOfColors contents: newImage colorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6467
        self findColorMapMode.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6468
        "/ mhmh - somehow, we get two colors added ... (sigh findColorMapMode adds another one ...)
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6469
        listOfColors size > (oldCListSize + 1) ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6470
            listOfColors removeLast
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6471
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6472
        self selectedColors value:{listOfColors size}.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6473
        self updateLabelsAndHistory.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6474
    ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6475
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6476
    "Created: / 31-08-2017 / 14:30:01 / cg"
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6477
    "Modified: / 08-10-2017 / 09:15:10 / cg"
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6478
!
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6479
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6480
addPastedColorToColormap
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6481
    "undoable: add the color in the clipboard to the map"
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6482
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6483
    |clipBoardColor|
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6484
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6485
    (clipBoardColor := self clipBoardColor) isNil ifTrue:[                
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6486
        ^ self
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6487
    ].
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6488
    self addColorToColormap:clipBoardColor undoable:true
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6489
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6490
    "Created: / 08-10-2017 / 09:04:23 / cg"
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6491
!
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6492
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6493
changeHLS
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6494
    "interactive Hue/Light/Saturation editing with thumbWheels"
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6495
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6496
    |bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel 
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6497
     shiftAction originalAvgColor avgColorHolder avgColor shiftedColor shiftProcess readySema
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6498
     originalPixels p previewImage previewImageHolder originalPreviewColormap originalPreviewPixels
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6499
     anyChange |
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6500
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6501
    avgColorHolder := nil asValue.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6502
    previewImageHolder := nil asValue.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6503
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6504
    "/
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6505
    "/ compute the averageColor in the background (while building dialog and asking user)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6506
    "/
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6507
    readySema := Semaphore new.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6508
    [
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6509
        |image|
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6510
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6511
        image := imageEditView image.
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6512
        originalColormap := image colorMap copy.
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6513
        originalPixels := image bits.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6514
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6515
        previewImage := self image magnifiedPreservingRatioTo:100@100.
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6516
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6517
        avgColor := originalAvgColor := previewImage "image" averageColor.
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6518
        avgColorHolder value:avgColor.
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6519
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6520
        previewImageHolder value: previewImage.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6521
        originalPreviewColormap := previewImage colorMap copy.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6522
        originalPreviewPixels := previewImage bits.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6523
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6524
        readySema signal.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6525
    ] forkAt:7.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6526
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6527
    acceptChannel := TriggerValue new.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6528
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6529
    firstChange := true.
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6530
    anyChange := false.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6531
1651
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  6532
    shiftedColor := [:clr :hShift :lFactor :sFactor |
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  6533
                        Color 
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  6534
                                hue:((clr hue) ? 0 + hShift) 
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6535
                                light:((clr light * (lFactor/100)) min:100)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6536
                                saturation:((clr saturation * (sFactor/100)) min:100)].
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6537
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6538
    shiftAction := 
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6539
        [
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6540
            |hShift lFactor sFactor|
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6541
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6542
            acceptChannel value:true.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6543
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6544
            firstChange ifTrue:[
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6545
                imageEditView makeUndo.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6546
                firstChange := false.
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6547
                anyChange := true.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6548
            ].
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6549
            readySema notNil ifTrue:[readySema wait. readySema := nil].
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6550
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6551
            hShift := hueShift value.
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6552
            lFactor := lightValue value.
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6553
            sFactor := saturationValue value.
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6554
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6555
            avgColorHolder value:(shiftedColor value:originalAvgColor value:hShift value:lFactor value:sFactor).
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6556
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6557
            previewImage
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6558
                colorMap:originalPreviewColormap copy;
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6559
                bits:originalPreviewPixels copy;
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6560
                release;
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6561
                colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor].
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6562
            previewImageHolder value:nil; value:previewImage.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6563
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6564
            shiftProcess notNil ifTrue:[
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6565
                shiftProcess terminate.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6566
                shiftProcess waitUntilTerminated.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6567
                shiftProcess := nil.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6568
            ].
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6569
            shiftProcess := 
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6570
                [
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6571
                    [
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  6572
                        imageEditView image 
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  6573
                            colorMap:originalColormap copy;
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6574
                            bits:originalPixels copy;
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6575
                            release;
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  6576
                            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
  6577
                        self updateImage.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6578
                        self updateInfoLabel.
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6579
                        self updateImagePreView.
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6580
                    ] ensure:[ shiftProcess := nil ].    
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6581
                ] forkAt:7.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6582
        ].
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6583
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6584
    bindings := IdentityDictionary new.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6585
    bindings at:#hueShiftAmount put:(hueShift := 0 asValue).
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  6586
    hueShift onChangeEvaluate:shiftAction.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6587
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6588
    bindings at:#lightAmount put:(lightValue := 100 asValue).
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  6589
    lightValue onChangeEvaluate:shiftAction.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6590
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6591
    bindings at:#saturationAmount put:(saturationValue := 100 asValue).
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  6592
    saturationValue onChangeEvaluate:shiftAction.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6593
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6594
    bindings at:#acceptChannel put:acceptChannel.
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6595
    bindings at:#hlsColor put:avgColorHolder.
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6596
    bindings at:#previewImageHolder put:previewImageHolder.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6597
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6598
    (self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) 
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6599
    ifFalse:[ 
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6600
        anyChange ifTrue:[
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6601
            imageEditView undo
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6602
        ]
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6603
    ].
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6604
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6605
    (p := shiftProcess) notNil ifTrue:[
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6606
        p waitUntilTerminated.
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6607
    ].
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6608
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6609
    anyChange ifTrue:[
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6610
        self updateImage.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6611
        self updateImagePreView.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6612
    ].
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6613
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6614
    "Modified: / 28-08-2017 / 13:05:35 / cg"
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6615
!
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6616
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6617
changeHLSOfColors:colorsToShift
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6618
    "interactive Hue/Light/Saturation editing"
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6619
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6620
    |bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6621
     shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6622
     originalPixels p previewImage previewImageHolder originalPreviewColormap originalPreviewPixels
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6623
     anyChange |
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6624
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6625
    avgColorHolder := nil asValue.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6626
    previewImageHolder := nil asValue.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6627
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6628
    "/
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6629
    "/ compute the averageColor in the background (while building dialog and asking user)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6630
    "/
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6631
    readySema := Semaphore new.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6632
    [
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6633
        |image red green blue|
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6634
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6635
        image := imageEditView image.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6636
        originalColormap := image colorMap copy.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6637
        originalPixels := image bits.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6638
        red := (colorsToShift collect:[:clr | clr red]) average.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6639
        green := (colorsToShift collect:[:clr | clr green]) average.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6640
        blue := (colorsToShift collect:[:clr | clr blue]) average.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6641
        avgColor := Color red:red green:green blue:blue.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6642
        avgColorHolder value:avgColor.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6643
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6644
        previewImage := self image magnifiedPreservingRatioTo:100@100.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6645
        previewImageHolder value: previewImage.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6646
        originalPreviewColormap := previewImage colorMap copy.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6647
        originalPreviewPixels := previewImage bits.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6648
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6649
        readySema signal.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6650
    ] forkAt:7.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6651
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6652
    acceptChannel := TriggerValue new.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6653
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6654
    firstChange := true.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6655
    anyChange := false.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6656
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6657
    shiftedColor := [:clr :hShift :lFactor :sFactor |
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6658
                        Color 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6659
                                hue:((clr hue) ? 0 + hShift) 
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6660
                                light:((clr light * lFactor) min:100)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6661
                                saturation:((clr saturation * sFactor) min:100)].
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6662
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6663
    shiftAction := 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6664
        [
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6665
            |hShift lFactor sFactor|
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6666
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6667
            acceptChannel value:true.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6668
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6669
            firstChange ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6670
                imageEditView makeUndo.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6671
                firstChange := false.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6672
                anyChange := true.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6673
            ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6674
            readySema notNil ifTrue:[readySema wait. readySema := nil].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6675
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6676
            hShift := hueShift value.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6677
            lFactor := lightValue value.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6678
            sFactor := saturationValue value.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6679
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6680
            avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor).
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6681
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6682
            previewImage
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6683
                colorMap:originalPreviewColormap copy;
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6684
                bits:originalPreviewPixels copy;
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6685
                release;
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6686
                colorMapProcessing:[:clr | 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6687
                    (colorsToShift includes:clr) ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6688
                        shiftedColor value:clr value:hShift value:lFactor value:sFactor.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6689
                    ] ifFalse:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6690
                        clr
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6691
                    ]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6692
                ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6693
            previewImageHolder value:nil; value:previewImage.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6694
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6695
            shiftProcess notNil ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6696
                shiftProcess terminate.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6697
                shiftProcess waitUntilTerminated.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6698
                shiftProcess := nil.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6699
            ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6700
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6701
            shiftProcess := 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6702
                [
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6703
                    [
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6704
                        imageEditView image 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6705
                            colorMap:originalColormap copy;
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6706
                            bits:originalPixels copy;
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6707
                            release;
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6708
                            colorMapProcessing:[:clr | 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6709
                                (colorsToShift includes:clr) ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6710
                                    shiftedColor value:clr value:hShift value:lFactor value:sFactor.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6711
                                ] ifFalse:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6712
                                    clr
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6713
                                ]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6714
                            ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6715
                        self updateImage.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6716
                        self updateInfoLabel.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6717
                        self updateImagePreView.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6718
                    ] ensure:[ shiftProcess := nil ].    
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6719
                ] forkAt:7.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6720
        ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6721
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6722
    bindings := IdentityDictionary new.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6723
    bindings at:#hueShiftAmount put:(hueShift := 0 asValue).
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6724
    hueShift onChangeEvaluate:shiftAction.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6725
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6726
    bindings at:#lightAmount put:(lightValue := 100 asValue).
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6727
    lightValue onChangeEvaluate:shiftAction.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6728
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6729
    bindings at:#saturationAmount put:(saturationValue := 100 asValue).
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6730
    saturationValue onChangeEvaluate:shiftAction.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6731
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6732
    bindings at:#acceptChannel put:acceptChannel.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6733
    bindings at:#hlsColor put:avgColorHolder.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6734
    bindings at:#previewImageHolder put:previewImageHolder.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6735
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6736
    (self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6737
    ifFalse:[ 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6738
        anyChange ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6739
            imageEditView undo
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6740
        ]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6741
    ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6742
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6743
    (p := shiftProcess) notNil ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6744
        p waitUntilTerminated.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6745
    ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6746
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6747
    anyChange ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6748
        self updateImage.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6749
        self updateImagePreView.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6750
    ].
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6751
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6752
    "Modified (comment): / 28-08-2017 / 13:04:44 / cg"
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6753
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6754
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6755
clearColormapEntry0AndMaskedPixels
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6756
    "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
  6757
     0 and then clear all masked pixels (to pixelValue 0).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6758
     This is required for windows icons to be really transparent"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6759
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6760
    |index colorMap| 
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6761
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6762
    self nonUndoableCompressColorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6763
    
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6764
    colorMap := self image colorMap.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6765
    (colorMap includes:(Color black)) ifFalse:[
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6766
        self addColorToColormap:(Color black) undoable:false.
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6767
        colorMap := self image colorMap.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6768
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6769
    index := colorMap indexOf:(Color black).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6770
    index == 1 ifFalse:[
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6771
        self nonUndoableSortColorMapWith:self sortBlockForColorsByRGB.
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6772
        colorMap := self image colorMap.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6773
    ].
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6774
    self nonUndoableClearMaskedPixels
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6775
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6776
    "Modified: / 31-08-2017 / 14:30:28 / cg"
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6777
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6778
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  6779
clearMaskedPixels
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  6780
    "clear all masked pixels (to pixelValue 0)"
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  6781
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6782
    |newImage| 
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6783
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6784
    newImage := self image clearMaskedPixels.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6785
    0 to:newImage height - 1 do:[:y |
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6786
        0 to:newImage width - 1 do:[:x |
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6787
            (newImage maskAtX:x y:y) == 0 ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6788
                newImage pixelAtX:x y:y put:0
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  6789
            ]
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  6790
        ]
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6791
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6792
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6793
    (imageEditView image:newImage) notNil ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6794
        self fetchImageData.
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  6795
    ]
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  6796
!
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  6797
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6798
clipBoardColor
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6799
    "return the color in the clipboard, or nil, if there is none.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6800
     If there is none, beep (if user's settings allow it)"
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6801
     
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6802
    |clr|
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6803
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6804
    clr := imageEditView getClipboardObject.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6805
    clr isColor ifFalse:[
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6806
        UserPreferences current beepInEditor ifTrue:[                
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6807
            self window beep.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6808
        ].
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6809
        ^ nil
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6810
    ].
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6811
    ^ clr
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6812
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6813
    "Created: / 08-10-2017 / 09:02:14 / cg"
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6814
!
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6815
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  6816
colorMapChanged
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  6817
    |img|
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  6818
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  6819
    img := self image.
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  6820
    img release.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  6821
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  6822
    self imageEditView invalidate.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  6823
    self imagePreView invalidate.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  6824
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  6825
"/    (imageEditView image:img) notNil ifTrue:[
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  6826
"/        self updateLabelsAndHistory.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  6827
"/        self imagePreView image:img
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  6828
"/    ]
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  6829
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  6830
    "Created: / 7.8.1998 / 22:26:10 / cg"
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  6831
    "Modified: / 18.8.1998 / 17:08:55 / cg"
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  6832
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  6833
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  6834
colorMapMode:aMode
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6835
    "calculates a new color map for the image from aMode.
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6836
     This might involve the computation of a colormap 
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6837
     (if depth is smaller)"
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6838
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6839
    |depth numColors newColorMap newImage 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6840
     oldImage image newColors realColorMap oldFileName
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  6841
     usedColors useNearest usageCounts tmpBits tmpMap quest
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  6842
     prevMode maskThreshold maskImage| 
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6843
3433
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  6844
    oldImage := self image.
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  6845
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  6846
    "/ rubbish; the mode is already changed
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  6847
    "/ prevMode := colorMapMode value.
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  6848
    prevMode := self colorMapModeFromImage:oldImage. 
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  6849
    prevMode == aMode ifTrue:[^ self].
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  6850
    
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6851
    self withExecuteCursorDo:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6852
        newColorMap := self class listOfColorMaps at:aMode.
3230
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  6853
        (aMode == #depth32 or:[aMode == #masked32]) ifTrue:[
2572
1c09be361688 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2571
diff changeset
  6854
            depth := 32. 
1c09be361688 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2571
diff changeset
  6855
        ] ifFalse:[
3230
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  6856
            (aMode == #depth24 or:[aMode == #masked24]) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  6857
                depth := 24. 
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  6858
            ] ifFalse:[
3370
c88532134a2b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3367
diff changeset
  6859
                (aMode == #depth16 or:[aMode == #masked16]) ifTrue:[
c88532134a2b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3367
diff changeset
  6860
                    depth := 16. 
c88532134a2b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3367
diff changeset
  6861
                ] ifFalse:[
c88532134a2b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3367
diff changeset
  6862
                    depth := (newColorMap size log:2) asInteger. 
c88532134a2b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3367
diff changeset
  6863
                ].
3230
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  6864
            ].
2572
1c09be361688 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2571
diff changeset
  6865
        ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6866
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6867
        useNearest := false.
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6868
        depth == 1 ifTrue:[
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6869
            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
  6870
        ] ifFalse:[
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  6871
            prevMode isNil ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  6872
                quest := 'Compute colormap (or use standard)'
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  6873
            ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  6874
                quest := 'Keep colormap (or use standard)'
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  6875
            ]
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6876
        ].
3433
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  6877
        
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  6878
        "/ currently always true!!
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  6879
        ((prevMode = aMode)
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6880
          or:[depth > oldImage depth
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6881
          or:[true "self confirm:(resources string:quest)"]]
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6882
        ) ifTrue:[
1937
73fb270a4da9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1936
diff changeset
  6883
            (newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6884
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6885
                "/ keep the colormap
3355
47dfcea38127 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3349
diff changeset
  6886
                "/ newColorMap atAllPut:Color black.
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6887
                depth > oldImage depth ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6888
                    "/ easy - simply copy the part
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6889
                    numColors := 1 bitShift:oldImage depth.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6890
                    0 to:numColors-1 do:[:pixel |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6891
                        newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel)
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  6892
                    ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6893
                ] ifFalse:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6894
                    "/ see if all used color fit the new colormap
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6895
                    usedColors := oldImage usedColorsMax:(1 bitShift:depth).
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6896
                    (usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6897
                        usedColors := oldImage realUsedColors
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6898
                    ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6899
                    (usedColors notNil and:[usedColors size <= (1 bitShift:depth)]) ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6900
                        "/ yea - just install them
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6901
                        usedColors asArray keysAndValuesDo:[:idx :clr |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6902
                            newColorMap at:idx put:clr
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6903
                        ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6904
                    ] ifFalse:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6905
                        "/ copy over those that are most often used.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6906
                        oldImage depth < 8 ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6907
                            tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height).
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6908
                            oldImage bits
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6909
                                expandPixels:(oldImage depth)
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6910
                                width:oldImage width
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6911
                                height:oldImage height 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6912
                                into:tmpBits
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6913
                                mapping:nil.
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  6914
                        ] ifFalse:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6915
                            oldImage depth == 8 ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6916
                                tmpBits := oldImage bits
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6917
                            ] ifFalse:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6918
                                colorMapMode value:prevMode.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6919
                                self findColorMapMode.    
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6920
                                self warn:(resources 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6921
                                            stringWithCRs:'Too many used colors (%1) in image.\\You should choose one of:\\- convert the image to grey\- reduce the number of colors\- dither to depth\- choose another depth'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6922
                                            with: oldImage realUsedColors size ).
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6923
                                ^ self
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6924
    "/                            (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
  6925
    "/                            ifFalse:[.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6926
    "/                                ^ self
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6927
    "/                            ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6928
    "/                            self image: (Image newForDepth:depth) fromImage:oldImage.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6929
    "/                            ^ self.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6930
                            ]
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6931
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6932
                        usageCounts := tmpBits usageCounts.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6933
                        tmpMap := Array new:usageCounts size.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6934
                        oldImage colorMap asArray keysAndValuesDo:[:i :clr |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6935
                            tmpMap at:i put:clr
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6936
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6937
                        usageCounts sort:[:a :b | a > b] with:tmpMap.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6938
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6939
                        1 to:(1 bitShift:depth) do:[:idx |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6940
                            newColorMap at:idx put:(tmpMap at:idx)
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6941
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6942
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6943
                        useNearest := Dialog 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6944
                                            confirmWithCancel:(resources 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6945
                                                                  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
  6946
                                                                  with:usedColors size
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6947
                                                                  with:(1 bitShift:depth))
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6948
                                            labels:(resources array:#('Cancel' 'First' 'Nearest')).
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6949
                        useNearest isNil ifTrue:[
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  6950
                            colorMapMode value:prevMode.
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6951
                            ^ self   "/ cancel
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6952
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6953
                    ]
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6954
                ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6955
            ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6956
        ] ifFalse:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6957
            "/ standard colormap
921
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  6958
            usedColors := oldImage usedColors.
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  6959
            (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
  6960
                useNearest := Dialog 
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6961
                                    confirmWithCancel:(resources 
1916
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  6962
                                                           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
  6963
                                                       ) 
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  6964
                                    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
  6965
                useNearest isNil ifTrue:[
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  6966
                    colorMapMode value:prevMode.
921
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  6967
                    ^ self   "/ cancel
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  6968
                ].
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  6969
            ].
3356
10e247f059f1 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3355
diff changeset
  6970
            newColorMap := oldImage colorMap.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6971
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6972
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6973
        imageEditView makeUndo.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6974
2260
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6975
        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
  6976
        newImage depth:depth.
3230
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  6977
        depth >= 16 ifTrue:[
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6978
            newImage colorMap:nil. 
3230
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  6979
            depth == 32 ifTrue:[
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6980
                newImage samplesPerPixel:4; photometric:#rgba.
3230
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  6981
            ] ifFalse:[    
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6982
                newImage samplesPerPixel:3; photometric:#rgb.
3230
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  6983
            ].    
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6984
        ].   
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6985
        "/ newImage photometric:oldImage photometric.
2260
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  6986
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6987
        oldFileName := oldImage fileName.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6988
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  6989
        Image imageErrorSignal handle:[:ex|
3227
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  6990
            "/ arrive here only if not all colors can be represented;
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  6991
            "/ then do a more expensive nearest color search
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  6992
            Color colorErrorSignal handle:[:ex|
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  6993
                colorMapMode value:prevMode.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6994
                imageEditView undo.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  6995
                ^ self warn:(resources string:'Conversion failed !!')
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  6996
            ] do:[
1393
c4a11a7d407f use Image>>newForDepth:
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  6997
                newImage := Image newForDepth:depth.
3103
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  6998
                newImage 
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  6999
                    width:oldImage width height:oldImage height depth:depth;
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  7000
                    colorMap:newColorMap;
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  7001
                    photometric:#palette;
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  7002
                    bits:(ByteArray new:(newImage bytesPerRow * newImage height));
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  7003
                    mask:oldImage mask.
2260
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  7004
3227
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7005
                oldImage 
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7006
                    colorsFromX:0 y:0 
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7007
                    toX:(oldImage width-1) y:(oldImage height-1) 
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7008
                    do:[:x :y :clr |
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7009
                        |newColor|
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7010
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7011
                        (newColorMap includes:clr)
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7012
                            ifTrue: [newColor := clr]
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7013
                            ifFalse: [
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7014
                                newColor := clr nearestIn:newColorMap.
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7015
                                useNearest ifFalse:[
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7016
                                    (newColor deltaFrom:clr) > 0.5 ifTrue:[
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7017
                                        newColor := oldImage colorFromValue:0
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7018
                                    ]
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7019
                                ]
3227
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7020
                            ].
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7021
                        newImage colorAtX:x y:y put:newColor.
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7022
                    ].
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7023
                
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7024
                image := newImage
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7025
            ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7026
        ] do:[ 
3461
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7027
            |newPhotometric|
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7028
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7029
            depth == 32 ifTrue:[
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7030
                newPhotometric := #rgba.
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7031
            ] ifFalse:[
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7032
                (newColorMap notNil and:[newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]]) ifTrue:[
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7033
                    newPhotometric := #palette
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7034
                ]
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7035
            ]. 
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7036
            image := newImage fromImage:oldImage photometric:newPhotometric.
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7037
            "/ -- nope; keep the newly determined photometric. image photometric:oldImage photometric.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7038
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7039
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7040
        (aMode asString startsWith:'mask') ifTrue:[
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7041
            image mask isNil ifTrue:[
3436
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7042
                (oldImage depth == 32 and:[ oldImage photometric == #rgba ]) ifTrue:[
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7043
                    maskImage := ImageMask fromAlphaInImage:oldImage
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7044
                ] ifFalse:[    
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7045
                    false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7046
                        maskThreshold := 0.1.
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7047
                        maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). 
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7048
                    ] ifFalse:[
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7049
                        maskImage := ImageMask extent:image extent.
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7050
                        maskImage bits:(ByteArray 
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7051
                                            new:(maskImage bytesPerRow * maskImage height)
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7052
                                            withAll:16rFF).
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7053
                    ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7054
                ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7055
                image mask:maskImage.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7056
            ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7057
        ] ifFalse:[ 
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7058
            image mask: nil.
3317
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  7059
            oldImage mask notNil ifTrue:[
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  7060
                newImage depth == 32 ifTrue:[
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  7061
                    newImage computeAlphaValuesFromMask:oldImage mask
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  7062
                ].
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  7063
            ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7064
        ]. 
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7065
1937
73fb270a4da9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1936
diff changeset
  7066
        (newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7067
            realColorMap := OrderedCollection new.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7068
            image realColorMap do:[:clr|
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7069
                (realColorMap includes: clr) ifFalse: [realColorMap add: clr]
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7070
            ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7071
            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
  7072
            newColorMap do:[:clr|
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7073
                ((newColors size < newColorMap size) and: [(newColors includes: clr) not]) 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7074
                ifTrue:[      
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7075
                    newColors add: clr
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7076
                ]
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7077
            ].                  
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7078
            image colorMap: newColors.   
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7079
        ].
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7080
        image fileName: oldFileName.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7081
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  7082
        (imageEditView image: image) notNil ifTrue:[
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7083
            self fetchImageData.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7084
        ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7085
    ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7086
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7087
    "Modified: / 31-08-2017 / 14:41:06 / cg"
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7088
!
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7089
2192
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7090
colorize
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7091
    "interactive Hue editing"
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7092
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7093
    |bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7094
     shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7095
     originalPixels p|
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7096
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7097
    "/ compute the averageColor in the background (while asking user)
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7098
    readySema := Semaphore new.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7099
    [
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7100
        |image|
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7101
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7102
        image := imageEditView image.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7103
        originalColormap := image colorMap copy.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7104
        avgColor := image averageColor.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7105
        originalPixels := image bits.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7106
        readySema signal.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7107
    ] forkAt:7.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7108
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7109
    acceptChannel := TriggerValue new.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7110
    avgColorHolder := avgColor asValue.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7111
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7112
    firstChange := true.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7113
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7114
    shiftedColor := [:clr :hShift :lFactor :sFactor |
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7115
                        Color 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7116
                                hue:((clr hue) ? 0 + hShift) 
3173
801e6bfe2581 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3172
diff changeset
  7117
                                light:((clr light * lFactor / 100) min:100)
801e6bfe2581 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3172
diff changeset
  7118
                                saturation:(((clr saturation max:20) * sFactor / 100) min:100)].
2192
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7119
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7120
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7121
    shiftAction := 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7122
        [
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7123
            |hShift lFactor sFactor|
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7124
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7125
            acceptChannel value:true.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7126
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7127
            firstChange ifTrue:[
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7128
                imageEditView makeUndo.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7129
                firstChange := false.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7130
            ].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7131
            readySema notNil ifTrue:[readySema wait. readySema := nil].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7132
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7133
            hShift := hueShift value.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7134
            lFactor := lightValue value.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7135
            sFactor := saturationValue value.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7136
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7137
            avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor).
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7138
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7139
            shiftProcess notNil ifTrue:[
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7140
                shiftProcess terminate.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7141
                shiftProcess waitUntilTerminated.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7142
                shiftProcess := nil.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7143
            ].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7144
            shiftProcess := 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7145
                [
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7146
                    [
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7147
                        imageEditView image 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7148
                            colorMap:originalColormap copy;
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7149
                            bits:originalPixels copy;
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7150
                            release;
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7151
                            colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7152
                        self updateImage.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7153
                        self updateInfoLabel.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7154
                        self updateImagePreView.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7155
                    ] ensure:[ shiftProcess := nil ].    
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7156
                ] forkAt:7.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7157
        ].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7158
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7159
    bindings := IdentityDictionary new.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7160
    bindings at:#hueShiftAmount put:(hueShift := 0 asValue).
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7161
    hueShift onChangeEvaluate:shiftAction.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7162
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7163
    bindings at:#lightAmount put:(lightValue := 100 asValue).
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7164
    lightValue onChangeEvaluate:shiftAction.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7165
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7166
    bindings at:#saturationAmount put:(saturationValue := 100 asValue).
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7167
    saturationValue onChangeEvaluate:shiftAction.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7168
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7169
    bindings at:#acceptChannel put:acceptChannel.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7170
    bindings at:#hlsColor put:avgColorHolder.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7171
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7172
    (self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7173
    ifFalse:[ 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7174
        firstChange ~~ true ifTrue:[
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7175
            imageEditView undo
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7176
        ]
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7177
    ].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7178
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7179
    (p := shiftProcess) notNil ifTrue:[
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7180
        p waitUntilTerminated.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7181
    ].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7182
    self updateImage.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7183
    self updateImagePreView.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7184
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7185
    "Created: / 01-11-2007 / 23:27:37 / cg"
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7186
!
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7187
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7188
compressColorMap
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7189
    "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
  7190
2893
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  7191
    |newImage| 
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  7192
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  7193
    newImage := self image.
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  7194
    newImage compressColorMap.
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7195
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7196
    (imageEditView image:newImage) notNil ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7197
        self fetchImageData.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7198
    ]
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7199
!
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7200
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7201
copyColorFromColormap
1871
42729969c032 set selection interface changed
ca
parents: 1859
diff changeset
  7202
    imageEditView setClipboardObject:(self selectedColorOrNil)
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7203
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7204
2174
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  7205
doubleClickOnColor:aColorIndex
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  7206
    self editSelectedColor.
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  7207
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  7208
    "Created: / 22-07-2007 / 13:14:37 / cg"
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  7209
!
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  7210
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7211
editSelectedColor
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7212
    self processSelectedColorWith:[:clr | 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7213
        |editor|
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7214
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7215
        editor := ColorEditDialog new.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7216
        editor color:clr.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7217
        editor open.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7218
        editor accepted ifFalse:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7219
            AbortOperationRequest raise.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7220
        ].
3180
9ee8f0e74b96 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3173
diff changeset
  7221
        editor color
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7222
    ]
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7223
!
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7224
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7225
fetchImageData
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  7226
    |image|
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  7227
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  7228
    (image := imageEditView image) notNil ifTrue:[
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  7229
        self findColorMapMode.
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  7230
        self updateLabelsAndHistory.
3463
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7231
        self updateInfoLabel.
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  7232
    ]
3463
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7233
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7234
    "Modified: / 24-08-2017 / 18:20:37 / cg"
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7235
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7236
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  7237
inspectColor
2573
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7238
    |clrIndex clr|
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7239
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7240
    self hasColormap ifFalse:[
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7241
        clr := self selectedColorOrNil
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7242
    ] ifTrue:[
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7243
        clrIndex := self selectedColorIndexOrNil.
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7244
        clrIndex isNil ifTrue:[
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7245
            ^ self
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7246
        ].
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7247
        clr := self image colorFromValue:clrIndex-1
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  7248
    ].
2573
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7249
    clr inspect
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  7250
!
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  7251
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7252
inspectColormap
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7253
    self hasColormap ifTrue:[
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7254
        self image colorMap inspect
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7255
    ].
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7256
!
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7257
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  7258
makeBrighter
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7259
    self updateImageAfterDoing:#makeBrighter.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7260
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7261
    "Modified: / 31-08-2017 / 12:16:30 / cg"
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  7262
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  7263
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  7264
makeDarker
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7265
    self updateImageAfterDoing:#makeDarker.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7266
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7267
    "Modified: / 31-08-2017 / 12:16:24 / cg"
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  7268
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  7269
1926
b3d2dab90f9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1925
diff changeset
  7270
makeGrayScaleImage
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7271
    self updateImageAfterDoing:#makeGrayScaleImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7272
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7273
    "Modified: / 31-08-2017 / 12:16:15 / cg"
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  7274
!
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  7275
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7276
makeSelectedColorBrighter
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7277
    self processSelectedColorsWith:[:clr | clr lightened]
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7278
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7279
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7280
makeSelectedColorDarker
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7281
    self processSelectedColorsWith:[:clr | clr darkened]
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7282
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7283
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  7284
makeSelectedColorGray
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7285
    self processSelectedColorsWith:[:clr | Color brightness:(clr brightness)]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7286
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7287
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7288
makeSelectedColorShifted
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7289
    "shift the selected color (in the colormap)
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7290
     using the hls/rgb shifting slider dialog"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7291
     
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7292
    |cMap colors cmapOffset|
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7293
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7294
    cMap := self image colorMap.
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7295
    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7296
    "/ if there is a mask, it is at position 1 in the table
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  7297
    cmapOffset := self hasTransparentColorInColorList ifTrue:[1] ifFalse:[0].
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7298
    colors := self selectedColors value collect:[:idx | cMap at:idx-cmapOffset].
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7299
    self changeHLSOfColors:colors.
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7300
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  7301
    "Modified: / 05-09-2017 / 09:03:47 / cg"
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  7302
!
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  7303
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7304
makeSlightlyBrighter
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7305
    self updateImageAfterDoing:#makeSlightlyBrighter.
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7306
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7307
    "Created: / 24-11-2010 / 11:06:11 / cg"
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7308
    "Modified: / 31-08-2017 / 12:16:01 / cg"
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7309
!
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7310
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7311
makeSlightlyDarker
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7312
    self updateImageAfterDoing:#makeSlightlyDarker.
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7313
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7314
    "Created: / 24-11-2010 / 11:06:23 / cg"
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7315
    "Modified: / 31-08-2017 / 12:15:55 / cg"
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7316
!
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7317
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7318
menu_clearColormapEntry0AndMaskedPixels
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7319
    "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
  7320
     0 and then clear all masked pixels (to pixelValue 0)"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7321
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7322
    imageEditView makeUndo.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7323
    self withExecuteCursorDo:[
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7324
        self nonUndoableClearColormapEntry0AndMaskedPixels
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7325
    ]
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7326
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7327
    "Modified: / 31-08-2017 / 14:31:21 / cg"
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7328
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7329
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7330
menu_clearMaskedPixels
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7331
    "clear all masked pixels (to pixelValue 0)"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7332
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7333
    imageEditView makeUndo.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7334
    self withExecuteCursorDo:[
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7335
        self nonUndoableClearMaskedPixels
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7336
    ]
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7337
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7338
    "Modified: / 31-08-2017 / 14:23:20 / cg"
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7339
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7340
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7341
menu_compressColorMap
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7342
    "calculates a new color map for the image, using only used colors"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7343
2893
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  7344
    |depth oldImage usedColors colorMap| 
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7345
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7346
    oldImage := self image.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7347
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7348
    oldImage photometric ~~ #palette ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7349
        self information:'Compress colorMap: Only palette images have colormaps.'.
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7350
        ^ self
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7351
    ].
2893
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  7352
    depth := oldImage depth.
3103
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  7353
    colorMap := oldImage colorMap asArray.
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7354
    usedColors := oldImage realUsedColors.
2893
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  7355
    usedColors size == colorMap size ifTrue:[
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7356
        self information:'Compress colorMap: Colormap already compressed - no compression.'.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7357
        ^ self
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7358
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7359
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7360
    imageEditView makeUndo.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7361
    self withExecuteCursorDo:[
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7362
        self nonUndoableCompressColorMap
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7363
    ]
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7364
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7365
    "Modified: / 31-08-2017 / 14:22:19 / cg"
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7366
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7367
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7368
menu_copyMask
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7369
    |mask|
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7370
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7371
    mask := self image mask.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7372
    MaskClipboard := mask subImageIn: (0@0 extent:mask extent).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7373
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7374
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7375
menu_pasteMask
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7376
    |img mask|
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7377
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7378
    imageEditView makeUndo.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7379
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7380
    img := self image.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7381
    mask := img mask.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7382
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7383
    mask 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7384
         copyFrom:MaskClipboard
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7385
         x:0 y:0
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7386
         toX:0 y:0 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7387
         width:(mask width min:MaskClipboard width)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7388
         height:(mask height min:MaskClipboard height).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7389
    img mask:mask.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7390
    (imageEditView image:img copy) notNil ifTrue:[
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7391
        self fetchImageData.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7392
    ]
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7393
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7394
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7395
menu_sortColorMap
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7396
    "calculates a new color map for the image, sorting colors"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7397
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7398
    self menu_sortColorMapWith:self sortBlockForColors
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7399
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7400
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7401
menu_sortColorMapWith:sortBlock
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7402
    "calculates a new color map for the image, sorting colors"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7403
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7404
    self image photometric ~~ #palette ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7405
        self information:'Compress colorMap: Only palette images have colormaps.'.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7406
        ^ self
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7407
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7408
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7409
    imageEditView makeUndo.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7410
    self withExecuteCursorDo:[
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7411
        self nonUndoableSortColorMapWith:sortBlock
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7412
    ]
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7413
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7414
    "Created: / 30-09-1998 / 23:51:23 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7415
    "Modified: / 31-08-2017 / 14:20:14 / cg"
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7416
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7417
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7418
pasteColorIntoColormap
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7419
    |clipBoardColor cmap|
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7420
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7421
    (clipBoardColor := self clipBoardColor) isNil ifTrue:[                
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7422
        ^ self
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7423
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7424
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7425
    cmap := self image colorMap.
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7426
    (cmap isNil or:[cmap isMappedPalette or:[cmap isFixedPalette]]) ifTrue:[
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7427
        drawingColormap isNil ifTrue:[
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7428
            drawingColormap := #()
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7429
        ].
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7430
        drawingColormap := drawingColormap copyWith:clipBoardColor.
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7431
        self selectedColors value:drawingColormap size.
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7432
        ^ self.
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7433
    ].
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7434
    
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7435
    self processSelectedColorWith:[:clr | clipBoardColor]
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7436
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7437
    "Modified (format): / 08-10-2017 / 09:03:59 / cg"
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7438
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7439
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7440
pickAndAddColorToColormap
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7441
    self addColorToColormap:(Color fromUser) undoable:true
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7442
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7443
    "Modified: / 31-08-2017 / 14:30:22 / cg"
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7444
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7445
1933
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  7446
pickAndPasteColor
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  7447
    self pickColor.
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  7448
    self pasteColorIntoColormap.
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  7449
!
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  7450
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7451
pickColor
1871
42729969c032 set selection interface changed
ca
parents: 1859
diff changeset
  7452
    imageEditView setClipboardObject:(Color fromUser)
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7453
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7454
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7455
processSelectedColorWith:aBlock
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7456
    "undoable color processing: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7457
     the selected color will be replaced by the value of aBlock"
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7458
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7459
    self processSelectedColorsWith:aBlock.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7460
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7461
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7462
processSelectedColorsWith:aBlock
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7463
    "undoable color processing: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7464
     the selected colors will be replaced by the value of aBlock 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7465
     (which gets a color vector and must return a color vector)"
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7466
3281
15b8e734190a #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 3253
diff changeset
  7467
    |img cMap modifiedColormap oldColors newImage selectedColorIndices newColors maskOffset|
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7468
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7469
    selectedColorIndices := self selectedColors value.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7470
    selectedColorIndices isEmptyOrNil ifTrue:[^ self].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7471
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7472
    img := self image.
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  7473
    self hasTransparentColorInColorList ifTrue:[
3281
15b8e734190a #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 3253
diff changeset
  7474
        maskOffset := 1.
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7475
    ] ifFalse:[
3281
15b8e734190a #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 3253
diff changeset
  7476
        maskOffset := 0.
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7477
    ].
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7478
    cMap := img colorMap.
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  7479
    (cMap isNil) ifTrue:[
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7480
        oldColors := drawingColormap
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7481
    ] ifFalse:[    
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  7482
        (cMap isMappedPalette or:[cMap isFixedPalette]) ifTrue:[
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  7483
            oldColors := cMap asArray
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  7484
        ] ifFalse:[    
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  7485
            oldColors := selectedColorIndices collect:[:idx | cMap at:idx-maskOffset].
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  7486
        ].
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7487
    ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7488
    imageEditView makeUndo.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7489
2992
a970017936e7 Refactor:
Stefan Vogel <sv@exept.de>
parents: 2945
diff changeset
  7490
    modifiedColormap := cMap asNewArray.
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7491
    selectedColorIndices max > modifiedColormap size ifTrue:[
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7492
        |t|
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7493
        t := Array new:selectedColorIndices max.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7494
        t replaceFrom:1 with:modifiedColormap.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7495
        modifiedColormap := t.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7496
    ].
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7497
    
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7498
    newColors := oldColors collect:aBlock.
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  7499
    selectedColorIndices do:[:idx |
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7500
        modifiedColormap at:idx-maskOffset put:(newColors at:idx-maskOffset ifAbsent:[Color black])
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7501
    ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7502
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7503
    newImage := img species new
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7504
                    width:img width
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7505
                    height:img height
1843
771731481a20 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1842
diff changeset
  7506
                    depth:img depth
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7507
                    fromArray:img bits.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7508
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  7509
    (cMap isNil) ifTrue:[
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7510
        "/ only a dummy...
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7511
    ] ifFalse:[    
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7512
        newImage colorMap:modifiedColormap.  
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  7513
        newImage photometric:#palette.  
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7514
    ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7515
    newImage fileName:img fileName.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7516
    newImage mask:(img mask copy).
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7517
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7518
    (imageEditView image:newImage) notNil ifTrue:[
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7519
        self fetchImageData.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7520
    ].
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7521
    self selectedColors value:selectedColorIndices.
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7522
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7523
    "Modified: / 08-10-2017 / 09:20:13 / cg"
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7524
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7525
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7526
reduceNumberOfColors
3464
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  7527
    "reduce by masking off r/g/b bits"
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  7528
1727
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  7529
    |s n anyChange img usedColors|
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7530
2817
Claus Gittinger <cg@exept.de>
parents: 2814
diff changeset
  7531
    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
  7532
    s size == 0 ifTrue:[^ self].
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7533
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7534
    n := Integer readFrom:s onError:0.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7535
    (n between:1 and:7) ifFalse:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7536
        Dialog warn:'Image unchanged'.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7537
        ^ self
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7538
    ].
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7539
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7540
    self withExecuteCursorDo:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7541
        anyChange := imageEditView reduceColorResolutionBy:n.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7542
        anyChange ifFalse:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7543
            Dialog warn:'Image unchanged'.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7544
        ] ifTrue:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7545
            img := imageEditView image.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7546
            imageEditView image:img.
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7547
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7548
            self fetchImageData.
1727
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  7549
            usedColors := img usedColorsMax:10000.
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  7550
            usedColors size == 10000 ifTrue:[
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  7551
                Dialog information:('>= ' , usedColors size printString , ' colors used.')
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  7552
            ] ifFalse:[
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  7553
                Dialog information:(usedColors size printString , ' colors used.')
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  7554
            ]
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7555
        ]
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7556
    ].
2817
Claus Gittinger <cg@exept.de>
parents: 2814
diff changeset
  7557
Claus Gittinger <cg@exept.de>
parents: 2814
diff changeset
  7558
    "Modified: / 29-10-2010 / 18:08:01 / cg"
3464
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  7559
    "Modified (comment): / 24-08-2017 / 20:50:28 / cg"
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7560
!
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7561
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7562
reduceNumberOfColors2
3464
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  7563
    "reduce by rounding r/g/b channel values"
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  7564
    
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7565
    |s rndR rndG rndB usedColors image newImage|
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7566
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7567
    s := Dialog request:'Rounding Interval red (2..) ?' initialAnswer:4.
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7568
    s size == 0 ifTrue:[^ self].
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7569
    rndR := Integer readFrom:s onError:0.
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  7570
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7571
    s := Dialog request:'Rounding Interval green (2..) ?' initialAnswer:2.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7572
    s size == 0 ifTrue:[^ self].
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7573
    rndG := Integer readFrom:s onError:0.
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  7574
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7575
    s := Dialog request:'Rounding Interval blue (2..) ?' initialAnswer:10.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7576
    s size == 0 ifTrue:[^ self].
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7577
    rndB := Integer readFrom:s onError:0.
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  7578
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  7579
    ((rndR > 1) or:[(rndG > 1) or:[(rndB > 1)]]) ifFalse:[
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7580
        Dialog warn:'Image unchanged'.
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7581
        ^ self
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7582
    ].
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7583
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7584
    self withExecuteCursorDo:[
3463
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7585
        |reduceColor nUsed|
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7586
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7587
        reduceColor :=
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7588
            [:clr |
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7589
                |r g b nr ng nb|
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7590
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7591
                r := clr redByte.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7592
                g := clr greenByte.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7593
                b := clr blueByte. 
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7594
                nr := (r roundTo:rndR) min:255.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7595
                ng := (g roundTo:rndG) min:255.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7596
                nb := (b roundTo:rndB) min:255. 
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7597
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7598
                Color redByte:nr greenByte:ng blueByte:nb.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7599
            ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7600
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7601
        image := self image.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7602
        "/ usedColors := image usedColorsMax:4096.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7603
        imageEditView makeUndo.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7604
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7605
        newImage := image copy.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7606
        newImage photometric == #palette ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7607
            newImage colorMap:(image colorMap collect:reduceColor).
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7608
        ] ifFalse:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7609
            image
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7610
                colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7611
                do:[:x :y :clr |
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7612
                    newImage colorAtX:x y:y put:(reduceColor value:clr)
2260
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  7613
                ].
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7614
        ].
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7615
        imageEditView image:newImage.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7616
        imageEditView setModified.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7617
        self updateImage.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7618
        self updateImagePreView.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7619
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7620
        self fetchImageData.
3463
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7621
        
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7622
        usedColors := newImage usedColorsMax:10000.
3463
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7623
        nUsed := usedColors size.
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7624
        nUsed == 10000 ifTrue:[
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7625
            Dialog information:('>= ' , nUsed printString , ' colors used.')
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7626
        ] ifFalse:[
3463
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7627
            Dialog information:(nUsed printString , ' colors used.')
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7628
        ]
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7629
    ].
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  7630
3463
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7631
    "Modified: / 24-08-2017 / 18:25:04 / cg"
3464
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  7632
    "Modified (comment): / 24-08-2017 / 20:50:14 / cg"
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7633
!
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7634
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7635
selectColor:aColor
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7636
    |idx img cMap|
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7637
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7638
    aColor isNil ifTrue:[
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7639
        idx := nil.
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7640
    ] ifFalse:[
2791
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7641
        img := self image.
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7642
        img notNil ifTrue: [
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7643
            aColor == Color noColor ifTrue:[
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7644
                (img mask notNil) ifTrue:[
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7645
                    idx := 1.
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7646
                ]
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7647
            ] ifFalse:[
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7648
                (cMap := self listOfColors) notNil ifTrue:[
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7649
                    idx := cMap indexOf:aColor ifAbsent:nil.
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7650
                ].
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7651
                idx isNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7652
                    "/ should not happen...
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7653
                    (cMap := img colorMap) notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7654
                        idx := cMap indexOf:aColor ifAbsent:nil.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7655
                        idx notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7656
                            img mask notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7657
                                idx := idx + 1.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7658
                            ].
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7659
                        ]
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7660
                    ].
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7661
                ].
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7662
            ].
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7663
        ].
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7664
    ].
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7665
    self selectedColors value:{idx}.
2790
2c90a15a0011 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2771
diff changeset
  7666
2791
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7667
    "Modified: / 02-07-2010 / 12:06:07 / cg"
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7668
!
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7669
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7670
selectedColorIndexOrNil
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7671
    |img clrIndex|
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7672
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7673
    img := self image.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7674
    img isNil ifTrue:[
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
  7675
        "/ self warn:'No Image.'.
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7676
        ^ nil
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7677
    ].
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7678
    clrIndex := self selectionOfColor value.
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  7679
    self hasTransparentColorInColorList ifTrue: [ 
2449
5ef668d71314 changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents: 2447
diff changeset
  7680
        (clrIndex isInteger and:[clrIndex > 1]) ifTrue:[
5ef668d71314 changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents: 2447
diff changeset
  7681
            ^ clrIndex - 1 
5ef668d71314 changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents: 2447
diff changeset
  7682
        ].
5ef668d71314 changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents: 2447
diff changeset
  7683
        ^ nil
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7684
    ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7685
    ^ clrIndex
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  7686
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  7687
    "Modified: / 05-09-2017 / 09:04:05 / cg"
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7688
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7689
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7690
selectedColorOrNil
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7691
    |cmapIndex img cMap colorList|
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  7692
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  7693
    cmapIndex := self selectedColorIndexOrNil.
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  7694
    cmapIndex isNil ifTrue:[^ nil].
2556
736533777318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2546
diff changeset
  7695
    cmapIndex == 0 ifTrue:[^ nil].
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7696
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7697
    img := self image.
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7698
    cMap := img colorMap.
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7699
    cMap isNil ifTrue:[
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7700
        "/ 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
  7701
        colorList := self listOfColors.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7702
        colorList notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7703
            ^ colorList at:cmapIndex ifAbsent:nil
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7704
        ].
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  7705
        ^ nil
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7706
    ].
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  7707
    ^ cMap at:cmapIndex.
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7708
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7709
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7710
sortColorMap
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7711
    "calculates a new color map for the image, sorting colors"
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7712
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7713
    self nonUndoableSortColorMapWith:self sortBlockForColorsByRGB
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7714
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7715
    "Modified: / 31-08-2017 / 14:20:07 / cg"
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  7716
!
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  7717
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  7718
sortColorMapWith:sortBlock
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7719
    "warning: not undoable
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7720
     calculates a new color map for the image, sorting colors"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7721
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7722
    |depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7723
     expectedSize w h| 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7724
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7725
    oldImage := self image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7726
    depth := oldImage depth.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7727
    w := oldImage width.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7728
    h := oldImage height.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7729
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7730
    usedColors := oldImage realColorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7731
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7732
    "/ translation table
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7733
    oldToNew := ByteArray new:(1 bitShift:depth).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7734
    newColorMap := usedColors asArray.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7735
    newColorMap sort:sortBlock.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7736
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7737
    oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7738
        |newPixel|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7739
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7740
        (usedColors includes:clr) ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7741
            newPixel := newColorMap indexOf:clr.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7742
            oldToNew at:oldIdx put:newPixel-1.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7743
        ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7744
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7745
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7746
    oldBits := oldImage bits.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7747
    "/ sanity check...
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7748
    expectedSize := ((w * h * depth + 7) // 8).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7749
    (oldBits size < expectedSize) ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7750
        self halt:'incorrect pixeldata size'.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7751
        oldBits := (ByteArray new:expectedSize) replaceFrom:1 with:oldBits; yourself.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7752
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7753
    newBits := ByteArray new:(oldBits size).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7754
    depth ~~ 8 ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7755
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7756
        "/ expand/compress can only handle 8bits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7757
        tmpBits := ByteArray uninitializedNew:(w*h).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7758
        oldBits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7759
            expandPixels:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7760
            width:w height:h 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7761
            into:tmpBits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7762
            mapping:oldToNew.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7763
        tmpBits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7764
            compressPixels:depth 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7765
            width:w height:h 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7766
            into:newBits 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7767
            mapping:nil
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7768
    ] ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7769
        oldBits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7770
            expandPixels:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7771
            width:w height:h 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7772
            into:newBits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7773
            mapping:oldToNew.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7774
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7775
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7776
    newImage := oldImage species new
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7777
                    width:w height:h depth:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7778
                    fromArray:newBits.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7779
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7780
    newImage colorMap:newColorMap.  
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7781
    newImage fileName:oldImage fileName.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7782
    newImage mask:(oldImage mask copy).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7783
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7784
    (imageEditView image:newImage) notNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7785
        self fetchImageData.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7786
    ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7787
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7788
    "Modified: / 15-09-1998 / 17:53:32 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7789
    "Created: / 30-09-1998 / 23:51:23 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7790
    "Modified (comment): / 31-08-2017 / 14:19:21 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7791
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7792
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7793
updateImageAfterDoing:aBlockOrSelector
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7794
    self withExecuteCursorDo:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7795
        aBlockOrSelector value:imageEditView.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7796
        self updateImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7797
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7798
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7799
    "Created: / 31-08-2017 / 12:14:39 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7800
! !
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7801
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7802
!ImageEditor methodsFor:'user actions-colormap-basic'!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7803
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7804
nonUndoableClearColormapEntry0AndMaskedPixels
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7805
    "ensure that there is a colorMap entry with 0/0/0 at position
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7806
     0 and then clear all masked pixels (to pixelValue 0).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7807
     This is required for windows icons to be really transparent"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7808
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7809
    |index colorMap| 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7810
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7811
    self nonUndoableCompressColorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7812
    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7813
    colorMap := self image colorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7814
    (colorMap includes:(Color black)) ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7815
        self addColorToColormap:(Color black) undoable:false.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7816
        colorMap := self image colorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7817
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7818
    index := colorMap indexOf:(Color black).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7819
    index == 1 ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7820
        self nonUndoableSortColorMapWith:self sortBlockForColorsByRGB.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7821
        colorMap := self image colorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7822
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7823
    self nonUndoableClearMaskedPixels
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7824
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7825
    "Created: / 31-08-2017 / 14:31:09 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7826
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7827
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7828
nonUndoableClearMaskedPixels
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7829
    "clear all masked pixels (to pixelValue 0)"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7830
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7831
    |newImage| 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7832
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7833
    newImage := self image clearMaskedPixels.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7834
    0 to:newImage height - 1 do:[:y |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7835
        0 to:newImage width - 1 do:[:x |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7836
            (newImage maskAtX:x y:y) == 0 ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7837
                newImage pixelAtX:x y:y put:0
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7838
            ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7839
        ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7840
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7841
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7842
    (imageEditView image:newImage) notNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7843
        self fetchImageData.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7844
    ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7845
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7846
    "Created: / 31-08-2017 / 14:22:58 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7847
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7848
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7849
nonUndoableCompressColorMap
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7850
    "not undoable
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7851
     calculates a new color map for the image, using only used colors"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7852
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7853
    |newImage| 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7854
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7855
    newImage := self image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7856
    newImage compressColorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7857
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7858
    (imageEditView image:newImage) notNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7859
        self fetchImageData.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7860
    ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7861
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7862
    "Created: / 31-08-2017 / 14:21:51 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7863
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7864
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7865
nonUndoableSortColorMapWith:sortBlock
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7866
    "not undoable
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7867
     calculates a new color map for the image, sorting colors"
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  7868
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7869
    |depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7870
     expectedSize w h| 
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7871
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7872
    oldImage := self image.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7873
    depth := oldImage depth.
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7874
    w := oldImage width.
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7875
    h := oldImage height.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7876
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7877
    usedColors := oldImage realColorMap.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7878
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7879
    "/ translation table
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7880
    oldToNew := ByteArray new:(1 bitShift:depth).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7881
    newColorMap := usedColors asArray.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7882
    newColorMap sort:sortBlock.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7883
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7884
    oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr |
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7885
        |newPixel|
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7886
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7887
        (usedColors includes:clr) ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7888
            newPixel := newColorMap indexOf:clr.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7889
            oldToNew at:oldIdx put:newPixel-1.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7890
        ]
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7891
    ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7892
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7893
    oldBits := oldImage bits.
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7894
    "/ sanity check...
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7895
    expectedSize := ((w * h * depth + 7) // 8).
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7896
    (oldBits size < expectedSize) ifTrue:[
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7897
        self halt:'incorrect pixeldata size'.
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7898
        oldBits := (ByteArray new:expectedSize) replaceFrom:1 with:oldBits; yourself.
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7899
    ].
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7900
    newBits := ByteArray new:(oldBits size).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7901
    depth ~~ 8 ifTrue:[
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7902
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7903
        "/ expand/compress can only handle 8bits
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7904
        tmpBits := ByteArray uninitializedNew:(w*h).
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7905
        oldBits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7906
            expandPixels:depth
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7907
            width:w height:h 
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7908
            into:tmpBits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7909
            mapping:oldToNew.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7910
        tmpBits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7911
            compressPixels:depth 
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7912
            width:w height:h 
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7913
            into:newBits 
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7914
            mapping:nil
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7915
    ] ifFalse:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7916
        oldBits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7917
            expandPixels:depth
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7918
            width:w height:h 
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7919
            into:newBits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7920
            mapping:oldToNew.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7921
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7922
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7923
    newImage := oldImage species new
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  7924
                    width:w height:h depth:depth
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7925
                    fromArray:newBits.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7926
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7927
    newImage colorMap:newColorMap.  
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7928
    newImage fileName:oldImage fileName.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7929
    newImage mask:(oldImage mask copy).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7930
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7931
    (imageEditView image:newImage) notNil ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7932
        self fetchImageData.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7933
    ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7934
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7935
    "Created: / 31-08-2017 / 14:19:42 / cg"
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7936
! !
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7937
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  7938
!ImageEditor methodsFor:'user actions-editing'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  7939
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7940
autoCropAll
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7941
    "find all borders and cut them off"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7942
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7943
    imageEditView autoCropLeft:true right:true top:true bottom:true.   
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7944
    self updateInfoLabel
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7945
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7946
    "Created: / 20-02-2017 / 18:05:38 / cg"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7947
!
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7948
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7949
autoCropBottom
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7950
    "find a bottom border and cut it off"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7951
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7952
    imageEditView autoCropLeft:false right:false top:false bottom:true.   
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7953
    self updateInfoLabel
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7954
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7955
    "Created: / 20-02-2017 / 18:05:45 / cg"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7956
!
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7957
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7958
autoCropLeft
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7959
    "find a left border and cut it off"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7960
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7961
    imageEditView autoCropLeft:true right:false top:false bottom:false.   
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7962
    self updateInfoLabel
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7963
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7964
    "Created: / 20-02-2017 / 18:05:52 / cg"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7965
!
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7966
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7967
autoCropRight
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7968
    "find a right border and cut it off"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7969
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7970
    imageEditView autoCropLeft:false right:true top:false bottom:false.   
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7971
    self updateInfoLabel
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7972
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7973
    "Created: / 20-02-2017 / 18:04:20 / cg"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7974
!
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7975
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7976
autoCropTop
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7977
    "find a top border and cut it off"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7978
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7979
    imageEditView autoCropLeft:false right:false top:true bottom:false.   
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7980
    self updateInfoLabel
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7981
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7982
    "Created: / 20-02-2017 / 18:06:03 / cg"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7983
!
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  7984
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7985
ditherGrayToDepth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7986
    self askForDepthThenDo:[:depth |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7987
        self ditherGrayToDepth:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7988
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7989
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7990
    "Created: / 24-08-2017 / 17:49:42 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7991
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7992
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7993
ditherGrayToDepth:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7994
    self withExecuteCursorDo:[
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  7995
        |image newImage|
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  7996
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  7997
        image := self image.
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7998
        depth == 1 ifTrue:[
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  7999
            newImage := image asErrorDitheredMonochromeImage
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8000
        ] ifFalse:[
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8001
            newImage := image asGrayImageDepth:depth dither:#floydSteinberg.
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8002
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8003
        imageEditView newImageWithUndo:newImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8004
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8005
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8006
    "Created: / 24-08-2017 / 17:51:07 / cg"
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8007
    "Modified: / 23-10-2017 / 10:58:18 / cg"
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8008
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8009
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8010
ditherToDepth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8011
    self askForDepthThenDo:[:depth |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8012
        self convertToDepth:depth dither:true
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8013
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8014
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8015
    "Created: / 07-07-2006 / 13:22:10 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8016
    "Modified: / 30-08-2017 / 00:34:42 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8017
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8018
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8019
ditherToNumberOfGrayColors
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8020
    |oldDepth numGrayColors suggestion grayImage userInput grayColors|
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8021
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8022
    oldDepth := self image depth.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8023
    grayImage := self image asGrayImageDepth:8.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8024
    
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8025
    suggestion := LastNumThresholdGrayColors notNil ifTrue:[
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8026
                    LastNumThresholdGrayColors
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8027
                  ] ifFalse:[
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8028
                    oldDepth > 8 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8029
                        ifTrue:[256] 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8030
                        ifFalse:[2 raisedTo:((oldDepth // 2 - 1) nextPowerOf2)]
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8031
                  ].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8032
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8033
    Dialog modifyingBoxWith:[:box |
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8034
        |preview slider update thresholdValue|
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8035
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8036
        thresholdValue := suggestion asValue.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8037
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8038
        box enterField 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8039
            converter:(PrintConverter new initForNumber);
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8040
            model:thresholdValue.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8041
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8042
        box verticalPanel extent:1.0 @ 300.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8043
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8044
        box verticalPanel add:(slider := HorizontalSlider new start:2 stop:256 step:1).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8045
        slider model:thresholdValue.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8046
        slider width:1.0; leftInset:4; rightInset:4.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8047
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8048
        box verticalPanel add:(preview := ImageView new).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8049
        preview extent:300 @300.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8050
        preview level:-1.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8051
        box verticalPanel horizontalLayout:#fitSpace.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8052
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8053
        update := 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8054
            [
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8055
                |numGrayColors depth s t tImage|
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8056
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8057
                numGrayColors := thresholdValue value clampBetween:2 and:256.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8058
                grayColors := Color grayColorVector:numGrayColors.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8059
                tImage := grayImage asDitheredImageUsing:grayColors depth:(grayImage depth).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8060
                
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8061
                preview image:(tImage magnifiedPreservingRatioTo:preview extent).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8062
            ].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8063
        update value.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8064
        box enterField acceptOnLostFocus:true.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8065
        box enterField acceptOnLeave:true.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8066
        thresholdValue onChangeEvaluate:update.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8067
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8068
    ] do:[
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8069
        userInput := Dialog request:'Number of Gray Colors ?' initialAnswer:suggestion asString.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8070
    ].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8071
    userInput isEmptyOrNil ifTrue:[^ self].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8072
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8073
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8074
    numGrayColors := Number readFrom:userInput onError:nil.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8075
    numGrayColors isNil ifTrue:[^ self].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8076
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8077
    grayColors := Color grayColorVector:numGrayColors.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8078
    imageEditView newImageWithUndo:(grayImage asDitheredImageUsing:grayColors depth:(grayImage depth)).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8079
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8080
    "Created: / 23-10-2017 / 11:17:44 / cg"
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8081
!
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8082
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8083
do3DProjection
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8084
    "make a naive 3D projection;
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8085
     can be used to create those typical marketing images as seen in web pages"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8086
     
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8087
    |box dx1 dx2 image|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8088
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8089
    image := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8090
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8091
    box := EnterBox new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8092
    box title:(resources string:'dX1 (0 < dx < 0.5):').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8093
    box okText:(resources string:'OK').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8094
    box abortText:(resources string:'Cancel').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8095
    box initialText:'0.1'.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8096
    box showAtPointer.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8097
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8098
    (box accepted 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8099
    and: [(dx1 := Number readFrom:(box contents) onError:nil) notNil])
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8100
    ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8101
        box title:(resources string:'dX2 (0 < dx < 0.5):').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8102
        box initialText:(dx1 printString).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8103
        box showAtPointer.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8104
        (box accepted 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8105
        and: [(dx2 := Number readFrom:(box contents) onError:nil) notNil])
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8106
        ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8107
            imageEditView threeDProjection:dx1 and:dx2.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8108
        ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8109
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8110
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8111
    self updateInfoLabel
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8112
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8113
    "Modified (comment): / 31-08-2017 / 13:58:03 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8114
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8115
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8116
doBrightenImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8117
    imageEditView brightenImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8118
    self listOfColors removeAll.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8119
    self findColorMapMode.     
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8120
    "/ imageEditView removelastUndo
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8121
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8122
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8123
doBrowseClass
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8124
    "opens a System Browser on the resourceClass and the resourceSelector"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8125
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8126
    |cls|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8127
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8128
    cls := imageEditView resourceClass.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8129
    cls isNil ifTrue:[^ self warn:'No Class specified'].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8130
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8131
    cls browserClass
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8132
        openInClass:cls class 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8133
        selector:(imageEditView resourceSelector)
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8134
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8135
    "Modified: / 31.7.1998 / 02:01:15 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8136
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8137
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8138
doCopyImageToClipboard
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8139
    imageEditView copyImageToClipboard.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8140
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8141
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8142
doCropManual
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8143
    "let user specify borders and cut them off"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8144
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8145
    |bindings left top right bottom img firstChange cropAction acceptChannel|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8146
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8147
    acceptChannel := TriggerValue new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8148
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8149
    firstChange := true.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8150
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8151
    cropAction := 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8152
        [:lV :rV :tV :bV | |l r t b|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8153
            acceptChannel value:true.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8154
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8155
            l := lV value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8156
            r := rV value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8157
            t := tV value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8158
            b := bV value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8159
            (l + r + t + b) == 0 ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8160
                UserPreferences current beepInEditor ifTrue:[                
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8161
                    self window beep
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8162
                ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8163
            ] ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8164
                img := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8165
                firstChange ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8166
                    imageEditView makeUndo.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8167
                    firstChange := false.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8168
                ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8169
                imageEditView
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8170
                    makeSubImageX:l y:t 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8171
                    width:(img width - l - r)
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8172
                    height:(img height - t - b).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8173
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8174
                self updateImagePreView.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8175
                self updateInfoLabel
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8176
            ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8177
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8178
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8179
    bindings := IdentityDictionary new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8180
    bindings at:#cropLeftAmount put:(left := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8181
    bindings at:#cropRightAmount put:(right := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8182
    bindings at:#cropTopAmount put:(top := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8183
    bindings at:#cropBottomAmount put:(bottom := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8184
    bindings at:#acceptChannel put:acceptChannel.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8185
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8186
    bindings at:#cropLeftNow   put:[ cropAction value:left value:0 value:0 value:0 ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8187
    bindings at:#cropRightNow  put:[ cropAction value:0 value:right value:0 value:0 ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8188
    bindings at:#cropTopNow    put:[ cropAction value:0 value:0 value:top value:0 ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8189
    bindings at:#cropBottomNow put:[ cropAction value:0 value:0 value:0 value:bottom ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8190
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8191
    bindings at:#applyCropAction   put:[ cropAction value:left value:right value:top value:bottom ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8192
    bindings at:#cropBoxIsDialog   put:true.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8193
    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8194
    (self openDialogInterface:#cropSpec withBindings:bindings) 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8195
    ifFalse:[ 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8196
        firstChange ~~ true ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8197
            imageEditView undo.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8198
            self updateImagePreView.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8199
        ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8200
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8201
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8202
    "Created: / 07-09-1998 / 18:16:07 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8203
    "Modified: / 19-02-2017 / 15:43:50 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8204
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8205
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8206
doDarkenImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8207
    imageEditView darkenImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8208
    self listOfColors removeAll.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8209
    self findColorMapMode.     
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8210
    "/ imageEditView removelastUndo
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8211
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8212
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8213
doEditMask
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8214
    |mask|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8215
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8216
    (mask := self image mask) notNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8217
        mask edit
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8218
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8219
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8220
    "Modified: / 18-02-2017 / 00:38:51 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8221
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8222
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8223
doFlipHorizontal
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8224
    "flips horizontally current image"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8225
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8226
    imageEditView flipHorizontal
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8227
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8228
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8229
doFlipVertical
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8230
    "flips vertically current image"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8231
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8232
    imageEditView flipVertical
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8233
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8234
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8235
doInsertTextFromUser
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8236
    |text tempForm tempImage maskImage font w h paintColor|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8237
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8238
    text := Dialog request:'Text to be inserted (placed as bitmap into clipboard for paste):'.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8239
    text isEmptyOrNil ifTrue:[^ self ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8240
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8241
    font := Font family:'arial' size:20.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8242
    font := font onDevice:Screen current.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8243
    w := font widthOf:text.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8244
    h := font heightOf:text.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8245
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8246
    tempForm := Form extent:(w@h) depth:1 onDevice:(Screen current).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8247
    tempForm clear.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8248
    tempForm font:font.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8249
    tempForm paint:(Color colorId:1).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8250
    tempForm displayString:text at:(0@font ascent).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8251
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8252
    tempImage := tempForm asImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8253
    maskImage := tempForm asImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8254
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8255
    paintColor := imageEditView selectedColor.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8256
    paintColor  colorId == 0 ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8257
        paintColor := Color black
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8258
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8259
    tempImage   
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8260
        photometric:#palette;
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8261
        colorMap:(Array 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8262
                    with:Color white 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8263
                    with:paintColor);
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8264
        mask:maskImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8265
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8266
    ImageEditView copyImageToClipboard:tempImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8267
    self editMode value:#paste.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8268
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8269
    "Modified: / 11-11-2007 / 12:32:55 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8270
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8271
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8272
doInspectImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8273
    "opens a System Browser on the resourceClass and the resourceSelector"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8274
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8275
    self image inspect
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8276
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8277
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8278
doInvertedBitsImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8279
    "inverts the pixels"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8280
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8281
    self withExecuteCursorDo:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8282
        imageEditView makeInvertedBits.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8283
        self updateImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8284
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8285
"/
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8286
"/    imageEditView negativeImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8287
"/    self listOfColors removeAll.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8288
"/    self findColorMapMode.     
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8289
"/    "/ imageEditView removelastUndo
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8290
"/
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8291
"/
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8292
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8293
    "Created: / 31-08-2017 / 12:49:13 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8294
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8295
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8296
doMagnifyDown
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8297
    "magnifies the current image one step down"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8298
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8299
    |magHolder mag|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8300
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8301
    magHolder := self magnificationHolder.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8302
    (mag := magHolder value) > 1 ifTrue: [
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8303
        magHolder value: mag - 1
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8304
    ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8305
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8306
    "Modified: / 26.7.1998 / 20:24:08 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8307
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8308
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8309
doMagnifyImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8310
    "magnifies the current image to a new size"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8311
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8312
    |box newSize image antiAliased|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8313
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8314
    antiAliased := false asValue.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8315
    image := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8316
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8317
    box := EnterBox new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8318
    box title:(resources string:'Images new size:').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8319
    box okText:(resources string:'OK').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8320
    box abortText:(resources string:'Cancel').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8321
    box initialText:image extent printString.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8322
    box verticalPanel add:(CheckBox label:(resources string:'Antialias/Smooth') model:antiAliased).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8323
    box showAtPointer.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8324
    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8325
    (box accepted 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8326
    and: [(newSize := self pointFromString:(box contents)) notNil])
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8327
    ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8328
        newSize isPoint ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8329
            self warn:'Please enter the new size as ''x @ y''.'.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8330
            ^ self.    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8331
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8332
        antiAliased value ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8333
            ((newSize x < image width) or:[(newSize y < image height)]) ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8334
                imageEditView magnifySmoothingTo:newSize.    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8335
            ] ifFalse:[    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8336
                imageEditView magnifyAntiAliasedImageTo:newSize.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8337
            ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8338
        ] ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8339
            imageEditView magnifyImageTo:newSize.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8340
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8341
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8342
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8343
    self updateInfoLabel
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8344
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8345
    "Modified: / 30-08-2017 / 15:46:02 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8346
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8347
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8348
doMagnifyImageBy
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8349
    "magnifies the current image (by a scale)"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8350
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8351
    |oldSize newSize scaleString scale image antiAliased smoothing|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8352
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8353
    image := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8354
    oldSize := image extent.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8355
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8356
    antiAliased := false asValue.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8357
    smoothing := false asValue.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8358
    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8359
    Dialog modifyingBoxWith:[:box |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8360
        box verticalPanel add:(CheckBox label:(resources string:'Antialias/Smooth') model:antiAliased).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8361
        "/ box verticalPanel add:(CheckBox label:(resources string:'Smoothing') model:smoothing).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8362
    ] do:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8363
        scaleString := Dialog 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8364
                   request:(resources string:'Scale factor (<1 to shrink; >1 to magnify):') 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8365
                   initialAnswer:'1'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8366
                   list:#('0.1' '0.25' '0.3' '0.5' '1.5' '2' '3' '4').     
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8367
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8368
    scaleString isNil ifTrue:[^ self].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8369
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8370
    scale := Object readFromString:scaleString onError:nil.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8371
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8372
    scale notNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8373
        scale isNumber ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8374
            self warn:'please enter a scale factor (<1 to shrink; >1 to magnify).'.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8375
            ^ self.    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8376
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8377
        newSize := oldSize * scale.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8378
        antiAliased value ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8379
            scale < 1 ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8380
                imageEditView magnifySmoothingBy:scale.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8381
            ] ifFalse:[    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8382
                imageEditView magnifyAntiAliasedImageTo:newSize.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8383
            ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8384
        ] ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8385
            imageEditView magnifyImageTo:newSize.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8386
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8387
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8388
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8389
    self updateInfoLabel
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8390
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8391
    "Modified: / 30-08-2017 / 15:34:56 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8392
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8393
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8394
doMagnifyUp
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8395
    "magnifies the current image one step up"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8396
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8397
    |magHolder mag|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8398
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8399
    magHolder := self magnificationHolder.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8400
    (mag := magHolder value) < 63 ifTrue: [
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8401
        magHolder value: mag + 1
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8402
    ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8403
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8404
    "Modified: / 26.7.1998 / 20:23:52 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8405
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8406
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8407
doResizeImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8408
    "resizes the current image"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8409
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8410
    |box newSize image|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8411
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8412
    image := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8413
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8414
    box := EnterBox new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8415
    box title:(resources string:'Images new size:').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8416
    box okText:(resources string:'OK').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8417
    box abortText:(resources string:'Cancel').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8418
    box initialText:image extent printString.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8419
    box showAtPointer.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8420
    (box accepted 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8421
    and: [(newSize := self pointFromString:(box contents)) notNil])
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8422
    ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8423
        imageEditView resizeImageTo:newSize.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8424
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8425
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8426
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8427
doRotateImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8428
    "rotates current image"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8429
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8430
    |rotationString box rotation|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8431
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8432
    rotationString := Dialog 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8433
                        request:(resources string:'Rotate by (degrees, clockwise):')
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8434
                        list:#( '-90' '90' '180' '45' '-45'  '135' '-135' ) 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8435
                        initialAnswer:90.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8436
    rotationString isEmptyOrNil ifTrue:[^ self].    "/ canceled
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8437
    rotation := Number readFrom:rotationString onError:[nil].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8438
    rotation isNil ifTrue:[^ self].   
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8439
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8440
"/    box := EnterBox new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8441
"/    box title:(resources string:'Rotate by (degrees, clockwise):').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8442
"/    box okText:(resources string:'OK').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8443
"/    box abortText:(resources string:'Cancel').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8444
"/    box initialText: '0'.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8445
"/    box showAtPointer.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8446
"/    (box accepted and: [(rotation := Number readFromString: box contents onError:nil) notNil])
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8447
"/    ifFalse:[ ^ self ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8448
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8449
    imageEditView rotateImageBy:rotation.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8450
    self updateInfoLabel.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8451
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8452
    "Modified: / 18-03-2012 / 14:41:14 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8453
    "Modified (comment): / 24-08-2017 / 15:02:57 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8454
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8455
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8456
doShiftManual
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8457
    "let user specify amount and shift"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8458
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8459
    |bindings amount img firstChange shiftAction acceptChannel wrapHolder|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8460
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8461
    acceptChannel := TriggerValue new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8462
    wrapHolder := (lastShiftUsedWrap ? true) asValue.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8463
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8464
    firstChange := true.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8465
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8466
    shiftAction := 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8467
        [:shiftH :shiftV | 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8468
            acceptChannel value:true.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8469
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8470
            img := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8471
            firstChange ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8472
                imageEditView makeUndo.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8473
                firstChange := false.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8474
            ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8475
            imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8476
            self updateInfoLabel
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8477
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8478
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8479
    bindings := IdentityDictionary new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8480
    bindings at:#shiftAmount put:(amount := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8481
    bindings at:#wrap put:wrapHolder.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8482
    bindings at:#acceptChannel put:acceptChannel.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8483
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8484
    bindings at:#shiftLeftNow   put:[ shiftAction value:(-1*amount value) value:0 ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8485
    bindings at:#shiftRightNow  put:[ shiftAction value:amount value value:0 ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8486
    bindings at:#shiftUpNow     put:[ shiftAction value:0 value:(-1*amount value) ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8487
    bindings at:#shiftDownNow   put:[ shiftAction value:0 value:amount value ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8488
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8489
    (self openDialogInterface:#shiftDialogSpec withBindings:bindings) 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8490
    ifFalse:[ 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8491
        firstChange ~~ true ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8492
          imageEditView undo
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8493
        ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8494
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8495
    lastShiftUsedWrap := wrapHolder value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8496
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8497
    "Created: / 7.9.1998 / 18:16:07 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8498
    "Modified: / 7.9.1998 / 18:20:42 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8499
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8500
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8501
doUnCropManual
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8502
    "let user specify borders and add them"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8503
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8504
    |bindings leftAmount topAmount rightAmount bottomAmount img|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8505
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8506
    bindings := IdentityDictionary new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8507
    bindings at:#cropLeftAmount put:(leftAmount := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8508
    bindings at:#cropRightAmount put:(rightAmount := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8509
    bindings at:#cropTopAmount put:(topAmount := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8510
    bindings at:#cropBottomAmount  put:(bottomAmount := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8511
    bindings at:#cropBoxIsDialog   put:true.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8512
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8513
    (self openDialogInterface:#uncropSpec withBindings:bindings)
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8514
    ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8515
        leftAmount := leftAmount value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8516
        rightAmount := rightAmount value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8517
        topAmount := topAmount value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8518
        bottomAmount := bottomAmount value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8519
        img := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8520
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8521
        imageEditView
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8522
            makeBorderedImageX:leftAmount y:topAmount 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8523
            width:(img width + leftAmount + rightAmount)
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8524
            height:(img height + topAmount + bottomAmount).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8525
        self updateInfoLabel
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8526
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8527
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8528
    "Created: / 07-09-1998 / 18:16:07 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8529
    "Modified: / 19-02-2017 / 15:31:00 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8530
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8531
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8532
doUndo
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8533
    "reverses last edit action"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8534
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8535
    imageEditView undo.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8536
    self updateImagePreView
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8537
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8538
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8539
makeInverse
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8540
    "inverts the pixels - for palettes, this leads to funny results"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8541
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8542
    self updateImageAfterDoing:#makeInverse.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8543
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8544
    "Modified: / 31-08-2017 / 12:16:07 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8545
    "Modified (comment): / 31-08-2017 / 13:51:28 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8546
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8547
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8548
makeMonochromeImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8549
    "let user choose a threshold, then convert to monochrome"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8550
    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8551
    |image userInput thresholdBrighness|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8552
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8553
    image := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8554
    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8555
    Dialog modifyingBoxWith:[:box |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8556
        |preview slider update thresholdValue|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8557
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8558
        thresholdValue := 0.5 asValue.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8559
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8560
        box enterField 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8561
            converter:(PrintConverter new initForNumber);
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8562
            model:thresholdValue.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8563
            
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8564
        box verticalPanel extent:1.0 @ 300.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8565
        
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8566
        box verticalPanel add:(slider := HorizontalSlider new start:0 stop:1 step:0.05).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8567
        slider model:thresholdValue.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8568
        slider width:1.0; leftInset:4; rightInset:4.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8569
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8570
        box verticalPanel add:(preview := ImageView new).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8571
        preview extent:300 @300.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8572
        preview level:-1.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8573
        box verticalPanel horizontalLayout:#fitSpace.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8574
        
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8575
        update := 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8576
            [
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8577
                |s t|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8578
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8579
                t := thresholdValue value clampBetween:0 and:1.   
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8580
                preview image:((image asThresholdMonochromeImage:t)
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8581
                            magnifiedPreservingRatioTo:preview extent).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8582
            ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8583
        update value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8584
        box enterField acceptOnLostFocus:true.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8585
        box enterField acceptOnLeave:true.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8586
        thresholdValue onChangeEvaluate:update.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8587
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8588
    ] do:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8589
        userInput := Dialog request:'Threshold (0=black; 1=white) ?' initialAnswer:0.5.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8590
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8591
    userInput isEmptyOrNil ifTrue:[^ self].
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8592
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8593
    thresholdBrighness := Number readFrom:userInput onError:nil.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8594
    thresholdBrighness isNil ifTrue:[^ self].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8595
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8596
    thresholdBrighness := thresholdBrighness clampBetween:0 and:1.
3478
1b4386fd1953 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3477
diff changeset
  8597
    
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8598
    imageEditView newImageWithUndo:(image asThresholdMonochromeImage:thresholdBrighness)
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8599
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8600
    "Created: / 24-08-2017 / 15:26:44 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8601
    "Modified: / 24-08-2017 / 17:54:21 / cg"
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8602
    "Modified (format): / 23-10-2017 / 10:42:52 / cg"
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8603
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8604
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8605
makeNegative
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8606
    "negates current image by negating the color map"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8607
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8608
    self withExecuteCursorDo:[
3477
52202af265c2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3476
diff changeset
  8609
        imageEditView makeNegative.
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8610
        self updateImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8611
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8612
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8613
    "Created: / 31-08-2017 / 13:49:47 / cg"
3477
52202af265c2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3476
diff changeset
  8614
    "Modified (comment): / 01-09-2017 / 10:27:37 / cg"
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8615
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8616
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8617
thresholdGrayToDepth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8618
    self askForDepthThenDo:[:depth |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8619
        self thresholdGrayToDepth:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8620
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8621
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8622
    "Created: / 24-08-2017 / 17:49:23 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8623
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8624
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8625
thresholdGrayToDepth:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8626
    self withExecuteCursorDo:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8627
        |newImage|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8628
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8629
        newImage := self image asThresholdGrayImageDepth:depth.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8630
        imageEditView newImageWithUndo:newImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8631
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8632
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8633
    "Created: / 24-08-2017 / 17:49:30 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8634
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8635
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8636
thresholdToDepth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8637
    self askForDepthThenDo:[:depth |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8638
        self convertToDepth:depth dither:false
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8639
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8640
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8641
    "Created: / 30-08-2017 / 00:31:33 / cg"
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8642
!
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8643
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8644
thresholdToNumberOfGrayColors
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8645
    |oldDepth numGrayColors suggestion grayImage userInput grayColors|
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8646
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8647
    oldDepth := self image depth.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8648
    grayImage := self image asGrayImageDepth:8.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8649
    
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8650
    suggestion := LastNumThresholdGrayColors notNil ifTrue:[
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8651
                    LastNumThresholdGrayColors
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8652
                  ] ifFalse:[
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8653
                    oldDepth > 8 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8654
                        ifTrue:[256] 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8655
                        ifFalse:[2 raisedTo:((oldDepth // 2 - 1) nextPowerOf2)]
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8656
                  ].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8657
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8658
    Dialog modifyingBoxWith:[:box |
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8659
        |preview slider update thresholdValue|
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8660
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8661
        thresholdValue := suggestion asValue.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8662
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8663
        box enterField 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8664
            converter:(PrintConverter new initForNumber);
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8665
            model:thresholdValue.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8666
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8667
        box verticalPanel extent:1.0 @ 300.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8668
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8669
        box verticalPanel add:(slider := HorizontalSlider new start:2 stop:256 step:1).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8670
        slider model:thresholdValue.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8671
        slider width:1.0; leftInset:4; rightInset:4.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8672
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8673
        box verticalPanel add:(preview := ImageView new).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8674
        preview extent:300 @300.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8675
        preview level:-1.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8676
        box verticalPanel horizontalLayout:#fitSpace.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8677
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8678
        update := 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8679
            [
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8680
                |numGrayColors depth s t tImage|
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8681
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8682
                numGrayColors := thresholdValue value clampBetween:2 and:256.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8683
                grayColors := Color grayColorVector:numGrayColors.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8684
                tImage := grayImage asNearestPaintImageDepth:(grayImage depth) colors:grayColors.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8685
                
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8686
                preview image:(tImage magnifiedPreservingRatioTo:preview extent).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8687
            ].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8688
        update value.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8689
        box enterField acceptOnLostFocus:true.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8690
        box enterField acceptOnLeave:true.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8691
        thresholdValue onChangeEvaluate:update.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8692
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8693
    ] do:[
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8694
        userInput := Dialog request:'Number of Gray Colors ?' initialAnswer:suggestion asString.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8695
    ].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8696
    userInput isEmptyOrNil ifTrue:[^ self].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8697
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8698
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8699
    numGrayColors := Number readFrom:userInput onError:nil.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8700
    numGrayColors isNil ifTrue:[^ self].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8701
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8702
    grayColors := Color grayColorVector:numGrayColors.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8703
    imageEditView newImageWithUndo:(grayImage asNearestPaintImageDepth:(grayImage depth) colors:grayColors).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8704
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8705
    "Created: / 23-10-2017 / 10:55:15 / cg"
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8706
! !
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8707
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8708
!ImageEditor methodsFor:'user actions-editing-colors'!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8709
3471
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8710
convertToDepth:depth dither:doDither
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8711
    |answer labels values 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8712
     ditherColors fixColors
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8713
     nGrey greyColorsAlready moreColors d|
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8714
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8715
    "/ no colormap above 12 bits!!
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8716
    depth > 12 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8717
        answer := #TrueColor.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8718
    ] ifFalse:[    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8719
        doDither ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8720
            (depth >= 8) ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8721
                labels := #('Cancel' 'Use Browser Palette' 'Use Standard' 'Compute' 'TrueColor').
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8722
                values := #(nil UseBrowserPalette UseStandard Compute TrueColor).
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8723
            ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8724
                depth == 1 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8725
                    answer := #UseStandard
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8726
                ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8727
                    labels := #('Cancel' 'Use Standard' 'Compute' 'TrueColor').
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8728
                    values := #(nil UseStandard Compute TrueColor). 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8729
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8730
            ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8731
        ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8732
            (depth >= 8) ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8733
                labels := #('Cancel' 'Use Browser Palette' 'Use Standard' 'TrueColor').
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8734
                values := #(nil UseBrowserPalette UseStandard TrueColor).
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8735
            ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8736
                answer := #UseStandard
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8737
            ].    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8738
        ].    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8739
    ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8740
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8741
    answer isNil ifTrue:[    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8742
        answer := OptionBox
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8743
                  request:'Compute a new (optimized) colormap\(Warning: this may take some time)\\or else use a standard colormap?' withCRs
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8744
                  label:(resources string:'Dither how')
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8745
                  image:(YesNoBox iconBitmap)
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8746
                  buttonLabels:(resources array:labels)
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8747
                  values:values
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8748
                  default:#UseStandard
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8749
                  onCancel:nil.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8750
        answer isNil ifTrue:[^ self].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8751
    ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8752
    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8753
    (answer == #Compute) ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8754
        ditherColors :=
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8755
            Color
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8756
                best:(1 bitShift:depth) 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8757
                ditherColorsForImage:self image
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8758
    ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8759
        (answer == #UseBrowserPalette) ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8760
            ditherColors := Color colorCubeWithRed:6 green:6 blue:6. 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8761
        ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8762
            answer == #TrueColor ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8763
                depth == 6 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8764
                    fixColors := FixedPalette 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8765
                                    redShift:4 redMask:3
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8766
                                    greenShift:2 greenMask:3
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8767
                                    blueShift:0 blueMask:3
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8768
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8769
                depth == 9 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8770
                    fixColors := FixedPalette 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8771
                                    redShift:6 redMask:7
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8772
                                    greenShift:3 greenMask:7
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8773
                                    blueShift:0 blueMask:7
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8774
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8775
                depth == 12 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8776
                    fixColors := FixedPalette 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8777
                                    redShift:8 redMask:16r0F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8778
                                    greenShift:4 greenMask:16r0F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8779
                                    blueShift:0 blueMask:16r0F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8780
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8781
                depth == 15 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8782
                    fixColors := FixedPalette 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8783
                                    redShift:10 redMask:16r1F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8784
                                    greenShift:5 greenMask:16r1F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8785
                                    blueShift:0 blueMask:16r1F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8786
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8787
                depth == 16 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8788
                    fixColors := FixedPalette 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8789
                                    redShift:11 redMask:16r1F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8790
                                    greenShift:5 greenMask:16r3F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8791
                                    blueShift:0 blueMask:16r1F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8792
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8793
                depth == 18 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8794
                    fixColors := FixedPalette 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8795
                                    redShift:12 redMask:16r3F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8796
                                    greenShift:6 greenMask:16r3F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8797
                                    blueShift:0 blueMask:16r3F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8798
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8799
            ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8800
                depth == 1 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8801
                    ditherColors := { Color black . Color white }.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8802
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8803
                depth == 2 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8804
                    ditherColors := { Color black . Color darkGray  .Color lightGray . Color white }.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8805
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8806
                depth = 3 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8807
                    ditherColors := Color colorCubeWithRed:2 green:2 blue:2. 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8808
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8809
                depth = 4 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8810
                    ditherColors := Color vgaColors. 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8811
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8812
                depth = 5 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8813
                    ditherColors := Color colorCubeWithRed:3 green:4 blue:2.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8814
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8815
                depth = 6 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8816
                    ditherColors := Color colorCubeWithRed:4 green:4 blue:3.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8817
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8818
                depth = 7 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8819
                    ditherColors := Color colorCubeWithRed:5 green:5 blue:4. 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8820
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8821
                depth == 8 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8822
                    ditherColors := Color standardDitherColorsForDepth8. 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8823
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8824
                depth == 9 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8825
                    ditherColors := Color colorCubeWithRed:8 green:8 blue:8. 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8826
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8827
                ditherColors isNil ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8828
                    self error:'unsupported depth'.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8829
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8830
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8831
                "/ add as many gray colors as possible.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8832
                nGrey := (2 raisedTo:depth) - ditherColors size.  
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8833
                nGrey > 0 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8834
                    nGrey := nGrey min:100.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8835
                    greyColorsAlready := ditherColors select:[:clr | clr isGreyColor].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8836
                    d := 1 / nGrey.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8837
                    moreColors := (1 to:nGrey-1) 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8838
                                    collect:[:i | Color brightness:(d * i)] 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8839
                                    thenReject:[:clr | greyColorsAlready includes:clr ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8840
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8841
                    ditherColors := ditherColors , moreColors.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8842
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8843
            ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8844
        ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8845
    ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8846
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8847
    self withExecuteCursorDo:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8848
        |newImage|
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8849
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8850
        doDither ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8851
            depth == 1 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8852
                newImage := self image asErrorDitheredMonochromeImage
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8853
            ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8854
                answer == #TrueColor ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8855
                    newImage := self image asDitheredImageUsing:fixColors depth:depth.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8856
                ] ifFalse:[    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8857
                    newImage := self image asDitheredImageUsing:ditherColors depth:depth.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8858
                ]
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8859
            ]
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8860
        ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8861
            answer == #TrueColor ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8862
                self halt.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8863
            ] ifFalse:[    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8864
                newImage := self image asNearestPaintImageDepth:depth colors:ditherColors
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8865
            ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8866
        ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8867
        imageEditView newImageWithUndo:newImage.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8868
    ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8869
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8870
    "Created: / 30-08-2017 / 00:33:55 / cg"
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8871
    "Modified: / 30-08-2017 / 02:13:03 / cg"
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8872
!
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8873
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8874
makeInvertedBits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8875
    "inverts the pixels - for palettes, this leads to funny results.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8876
     For others, this is the same as negating"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8877
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8878
    self updateImageAfterDoing:#makeInvertedBits.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8879
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8880
    "Created: / 31-08-2017 / 13:51:10 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  8881
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  8882
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8883
!ImageEditor methodsFor:'user actions-image sequences'!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8884
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8885
editEachImageFromSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8886
    |seq|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8887
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8888
    self checkModified ifFalse:[ ^ self ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8889
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8890
    imageEditView releaseUndos.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8891
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8892
    seq := self image imageSequence.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8893
    seq size > 10 ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8894
        (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
  8895
            ifFalse:[^ self].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8896
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8897
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8898
    seq do:[:eachFrame |
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8899
        ImageEditor openOnImage:eachFrame image
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8900
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8901
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8902
    "Modified: / 21-10-2010 / 15:01:25 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8903
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8904
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8905
gotoImageInSequence:index
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8906
    "display the next image in the image sequence"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8907
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8908
    |img seq frame listOfColors|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8909
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8910
    imageEditView releaseUndos.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8911
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8912
    seq := self image imageSequence.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8913
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8914
    imageSeqNr := index.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8915
    frame := seq at:imageSeqNr.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8916
    imageEditView image:(frame image).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8917
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8918
    (img := self image) notNil ifTrue:[          
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8919
        listOfColors := self listOfColors.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8920
        img colorMap notNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8921
            listOfColors contents:(img usedColors asSet asOrderedCollection).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8922
        ] ifFalse:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8923
            listOfColors removeAll.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8924
        ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8925
        self findColorMapMode.     
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8926
        self updateLabelsAndHistory.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8927
        img := img onDevice:device.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8928
        imageEditView image:img.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8929
    ] ifFalse:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8930
        self updateForNoImage
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8931
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8932
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8933
    "Created: / 21-10-2010 / 14:22:11 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8934
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8935
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8936
nextImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8937
    "display the next image in the image sequence"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8938
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8939
    |seq index|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8940
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8941
    seq := self image imageSequence.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8942
    (index := imageSeqNr) isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8943
        index := 1.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8944
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8945
    index := index + 1.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8946
    index > seq size ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8947
        self information:'Back to first image in sequence'.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8948
        index := 1.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8949
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8950
    self gotoImageInSequence:index.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8951
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8952
    "Modified: / 21-10-2010 / 14:24:11 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8953
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8954
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8955
previousImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8956
    "display the previous image in the image sequence"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8957
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8958
    |seq index|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8959
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8960
    seq := self image imageSequence.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8961
    (index := imageSeqNr) isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8962
        index := 1.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8963
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8964
    index := index - 1.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8965
    index < 1 ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8966
        self information:'Wrap to last image in sequence'.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8967
        index := seq size.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8968
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8969
    self gotoImageInSequence:index.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8970
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8971
    "Created: / 21-10-2010 / 14:25:03 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8972
! !
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  8973
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  8974
!ImageEditor methodsFor:'user actions-loading'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  8975
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  8976
doLoadFromClass
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  8977
    "opens a dialog for loading an image from class and a (resource-) selector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  8978
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  8979
    |img|
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  8980
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  8981
    self checkModified ifFalse:[ ^ self ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  8982
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  8983
    (imageEditView loadFromClass) notNil ifTrue:[
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  8984
        imageSeqNr := nil.
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  8985
        (img := self image) notNil ifTrue: [
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  8986
            self updateColorsFromImage:img.
574
8d82e8f101c1 undo disabling
tz
parents: 573
diff changeset
  8987
            self findColorMapMode.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  8988
            self updateLabelsAndHistory.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  8989
        ] ifFalse: [
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  8990
            self updateForNoImage
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  8991
        ].
449
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  8992
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  8993
!
228524287573 intitial checkin
tz
parents:
diff changeset
  8994
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  8995
doLoadFromFile
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  8996
    "opens a dialog for loading an image from a file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  8997
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8998
    |img file filters title|
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8999
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9000
    self checkModified ifFalse:[ ^ self ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9001
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  9002
    imageSeqNr := nil.
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9003
    img := self image.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9004
    img notNil ifTrue: [
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9005
        file := img fileName
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9006
    ].
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9007
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  9008
    title := (resources string:'Load Image from File:').
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9009
3066
a8e197ceebed Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 3050
diff changeset
  9010
    (UserPreferences current useNativeFileDialog
3100
d2310ff3cbab class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3080
diff changeset
  9011
     and:[Screen current isWindowsPlatform]) ifTrue:[
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9012
        self withWaitCursorDo:[
3066
a8e197ceebed Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 3050
diff changeset
  9013
            file := Screen current
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9014
                nativeFileDialogFor:(self window topView id)
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9015
                save:false
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9016
                title:title
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9017
                inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory])
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9018
                initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png'])
2827
c99d2c520b28 changed:
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
  9019
                "/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR)
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9020
                filter:
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9021
                  {
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9022
                          { (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp;*.jpg'  } .
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9023
                          { (resources string:'All Files') . '*.*'  } 
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9024
                  }
2821
850aa6d37ea3 changed:
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  9025
                extension:nil
2827
c99d2c520b28 changed:
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
  9026
                "blocking:false".
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9027
        ].
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9028
    ] ifFalse:[    
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9029
        filters := FileSelectionBrowser loadImageFileNameFilters.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9030
        file notNil ifTrue:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9031
            file := FileSelectionBrowser
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9032
                        request:title
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9033
                        fileName:file
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9034
                        withFileFilters:filters.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9035
        ] ifFalse:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9036
            file := FileSelectionBrowser
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9037
                        request:title
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9038
                        inDirectory:LastDirectory
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9039
                        withFileFilters:filters.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9040
        ].
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9041
    ].
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9042
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9043
    file notNil ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9044
        LastDirectory := file asFilename directoryName.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9045
        self loadFromFile:file
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9046
    ]
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9047
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  9048
    "Modified: / 16-02-2017 / 10:53:41 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9049
!
228524287573 intitial checkin
tz
parents:
diff changeset
  9050
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9051
doLoadFromURL
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9052
    "opens a dialog for loading an image from a URL"
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9053
2866
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9054
    |tempFile url response|
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9055
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9056
    self checkModified ifFalse:[ ^ self ].
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9057
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9058
    url := Dialog 
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  9059
                request:(resources string:'Load Image from URL:')
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9060
                initialAnswer:LastURL.
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9061
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9062
    url notEmptyOrNil ifTrue:[
3050
238571e2a33b class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3027
diff changeset
  9063
        HTTPInterface isNil ifTrue:[ Smalltalk loadPackage:'stx:goodies/communication'].
238571e2a33b class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3027
diff changeset
  9064
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9065
        LastURL := url.
3027
50657c666fdc class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3022
diff changeset
  9066
        tempFile := FileStream newTemporary close fileName.
2866
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9067
        self withWaitCursorDo:[
3492
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9068
            |newURL|
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9069
            
2866
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9070
            response := HTTPInterface get:url destinationFile:tempFile.
3492
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9071
            response isMovedResponse ifTrue:[
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9072
                newURL  := response location.
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9073
                newURL ~= url ifTrue:[
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9074
                    response := HTTPInterface get:newURL destinationFile:tempFile.
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9075
                ].    
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9076
            ].    
2866
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9077
        ].
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9078
        response isErrorResponse ifTrue:[
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9079
            Dialog warn:(resources string:'Could not load image ("%1")' with:response responseText).
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9080
        ] ifFalse:[
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9081
            self loadFromFile:tempFile.
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9082
        ].
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9083
        tempFile delete
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9084
    ]
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9085
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9086
    "Created: / 20-09-2010 / 11:30:59 / cg"
3492
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9087
    "Modified: / 13-09-2017 / 17:00:28 / cg"
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9088
!
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9089
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9090
doNewImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9091
    "opens a dialog with choices of size and color map for creating a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9092
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9093
    |dialogAspects width height cMapString cMapMode cMap imageClass image szString defaultSize ext depth|
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9094
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9095
    self checkModified ifFalse:[ ^ self ].
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9096
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9097
    defaultSize := (self class listOfDefaultSizes includes:'32x32') 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9098
                        ifTrue:['32x32'] 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9099
                        ifFalse:[self class listOfDefaultSizes first].
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9100
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9101
    dialogAspects  := IdentityDictionary new
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9102
        at:#listOfSizes         put: self class listOfDefaultSizes asValue;
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9103
        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
  9104
        at:#selectionOfSize     put: (LastSizeString ? defaultSize) asValue;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9105
        at:#selectionOfColorMap put: (LastColormapMode ? self class namesOfColorMaps values asSortedCollection first) asValue;
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9106
        yourself.
228524287573 intitial checkin
tz
parents:
diff changeset
  9107
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9108
    (self openDialogInterface:#dialogSpecForNewImage withBindings:dialogAspects)
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  9109
    ifTrue:[
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9110
        szString := (dialogAspects at:#selectionOfSize) value.
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  9111
        ext := self pointFromString:szString.
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  9112
        ext isNil ifTrue:[
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  9113
            width := height := 32
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  9114
        ] ifFalse:[
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  9115
            width := ext x.
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  9116
            height := ext y.
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  9117
        ].
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  9118
"/        width  := "128 min: "(Integer readFromString: (szString upTo: $x) onError:[32]).
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  9119
"/        height := "128 min: " (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[32]).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9120
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9121
        cMapString := (dialogAspects at:#selectionOfColorMap) value.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9122
        cMapMode   := self class namesOfColorMaps keyAtEqualValue:cMapString.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9123
        cMap       := self class listOfColorMaps at:cMapMode.
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9124
        depth := (cMapMode startsWith:'depth') 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9125
                    ifTrue:[ Integer readFrom:(cMapMode copyFrom:'depth' size + 1) ]
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9126
                    ifFalse:[ 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9127
                        (cMapMode startsWith:'masked') 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9128
                            ifTrue:[ Integer readFrom:(cMapMode copyFrom:'masked' size + 1) ]
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9129
                            ifFalse:[ cMap size highBit-1 ]].
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9130
        imageClass := Image implementorForDepth:depth.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9131
        image      := imageClass width: width height: height.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9132
        image bits:(ByteArray new:(image bytesPerRow*height)).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9133
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  9134
        LastSizeString := szString.
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  9135
        LastColormapMode := cMapString.
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  9136
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9137
        (cMapMode startsWith:'mask') ifTrue:[
3125
9d5624af77ab Sending of Image>>#clearMaskedPixels moved to Image >> #asFormOnDevice:
Stefan Vogel <sv@exept.de>
parents: 3122
diff changeset
  9138
            image mask: (ImageMask width: width height: height depth: 1 fromArray: (ByteArray new: width*height)).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9139
        ].
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9140
        depth == 32 ifTrue:[
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9141
            image photometric:#rgba
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9142
        ] ifFalse:[    
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9143
            image colorMap: cMap.
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9144
        ].
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9145
        (imageEditView image: image) notNil ifTrue:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9146
            self updateListOfColorsAndColormapMode.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9147
            self updateLabelsAndHistory.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9148
        ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9149
        image fillRectangleX:0 y:0 width:width height:height with:Color white.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9150
    ]
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9151
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9152
    "Modified: / 13-09-2017 / 23:57:52 / cg"
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  9153
!
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  9154
2058
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9155
doNewImageEditor
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9156
    "opens a new image editor"
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9157
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9158
    ImageEditor open
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9159
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9160
    "Created: / 17-08-2006 / 09:03:14 / cg"
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9161
!
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9162
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9163
doNewImageFromClipboard
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9164
    |image|
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9165
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9166
    self checkModified ifFalse:[ ^ self ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9167
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  9168
    image := imageEditView clipBoardImage.
3164
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  9169
    image isImageOrForm ifFalse:[
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  9170
        image := Image readFrom:(image asString) onError:nil.
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  9171
        image isNil ifTrue:[
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  9172
            Dialog warn:'Clipboard does not contain an image I can use/understand'.
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  9173
            ^ self.
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  9174
        ].
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  9175
    ].
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  9176
    
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9177
    imageEditView image:image.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9178
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9179
    image notNil ifTrue:[
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  9180
        self updateColorsFromImage:image.
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9181
        self findColorMapMode.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9182
        self updateLabelsAndHistory.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9183
    ]
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  9184
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  9185
    "Modified (format): / 08-10-2017 / 08:58:03 / cg"
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9186
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9187
3200
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9188
doNewMaskFromClipboard
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9189
    |mask image newImage|
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9190
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9191
    self checkModified ifFalse:[ ^ self ].
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9192
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  9193
    mask := imageEditView clipBoardImage.
3200
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9194
    mask isImageOrForm ifFalse:[
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9195
        mask := Image readFrom:(mask asString) onError:nil.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9196
        mask isNil ifTrue:[
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9197
            Dialog warn:'Clipboard does not contain an image I can use/understand'.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9198
            ^ self.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9199
        ].
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9200
    ].
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  9201
    
3200
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9202
    (image:= imageEditView image) isNil ifTrue:[
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9203
        image := mask.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9204
    ].
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9205
    mask extent ~= image extent ifTrue:[
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9206
        mask := imageEditView resizedImage:mask to:image extent.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9207
    ].
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9208
    newImage := image copy.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9209
    newImage mask:mask.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9210
    imageEditView newImageWithUndo:newImage.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9211
    self updateAfterImageChange.
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  9212
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  9213
    "Modified (format): / 08-10-2017 / 08:57:58 / cg"
3200
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9214
!
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9215
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9216
grabFullScreenImage
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9217
    "grab all for editing"
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9218
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9219
    self grabScreenImageUsing:[ 
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9220
        Image fromScreen
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9221
    ].
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9222
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9223
    "Created: / 25-02-2017 / 12:41:29 / cg"
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9224
!
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9225
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  9226
grabScreenImage
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9227
    "let user choose an area and grab that area for editing"
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  9228
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9229
    self grabScreenImageUsing:[ 
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9230
        |r|
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9231
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9232
        [Screen current leftButtonPressed] whileTrue:[Delay waitForSeconds:0.05].
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9233
        r := Rectangle fromUser.
2708
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9234
        (r width == 0 or:[r height == 0]) ifTrue:[
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9235
            nil
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9236
        ] ifFalse:[
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9237
            lastGrabbedScreenArea := r.
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9238
            Image fromScreen:r
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9239
        ]
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9240
    ].
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9241
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9242
    "Modified (comment): / 25-02-2017 / 12:41:00 / cg"
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9243
!
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9244
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9245
grabScreenImageFromLastArea
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9246
    "grab again from the previous area for editing"
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9247
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9248
    self grabScreenImageUsing:[ 
2708
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9249
        Image fromScreen:lastGrabbedScreenArea
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9250
    ].
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9251
!
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9252
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9253
grabScreenImageUsing:aBlock
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9254
    "let user choose an area and grab that area for editing"
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9255
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9256
    self checkModified ifFalse:[ ^ self ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9257
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  9258
    Processor 
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  9259
        addTimedBlock:[
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  9260
            |image d8image img|
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  9261
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  9262
            imageSeqNr := nil.
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9263
            image := aBlock value.
2708
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9264
            image notNil ifTrue:[
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9265
                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
  9266
false ifTrue:[
1687
f4543a556b89 Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents: 1682
diff changeset
  9267
                    Error handle:[:ex | |sig|
2996
a1090695cfbc class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 2992
diff changeset
  9268
                        (sig := ex creator) == HaltInterrupt ifTrue:[ex reject].
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  9269
                        sig == Signal noHandlerSignal ifTrue:[ex reject].
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9270
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9271
                        self warn:'Could not convert to depth8 image (too many colors)'.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9272
                        d8image := nil.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9273
                    ] do:[
2420
14678b9fea60 grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents: 2375
diff changeset
  9274
                        d8image := Depth8Image fromImage:image photometric:#palette.
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9275
                    ].
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9276
                    d8image notNil ifTrue:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9277
                        image := d8image
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9278
                    ]
2420
14678b9fea60 grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents: 2375
diff changeset
  9279
].
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  9280
                ].
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9281
                (imageEditView image:image) notNil ifTrue:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9282
                    self listOfColors contents:(image colorMap).
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9283
                    self findColorMapMode.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9284
                    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
  9285
                ]
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9286
             ] 
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9287
        ] 
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  9288
        afterSeconds:1
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  9289
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9290
    "Created: / 29-07-1998 / 21:24:42 / cg"
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9291
    "Modified: / 16-11-2001 / 16:21:19 / cg"
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9292
    "Modified (comment): / 25-02-2017 / 12:41:06 / cg"
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  9293
!
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  9294
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9295
grabWindowImage
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9296
    "let user choose a window and grab its area for editing"
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9297
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9298
    self grabScreenImageUsing:[
3188
351c645c0921 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3180
diff changeset
  9299
        |v topView|
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9300
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9301
        (v := Screen current viewFromUser) notNil ifTrue:[
3188
351c645c0921 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3180
diff changeset
  9302
            topView := v topView.
351c645c0921 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3180
diff changeset
  9303
            topView raise; makeFullyVisible.
2704
0791984eef02 changed: #grabWindowImage
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
  9304
            Delay waitForSeconds:0.5.   "/ give view a chance to redraw itself.
3188
351c645c0921 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3180
diff changeset
  9305
            Image fromView:topView
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9306
        ].
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9307
    ].
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9308
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9309
    "Modified (comment): / 25-02-2017 / 12:41:20 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9310
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  9311
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  9312
!ImageEditor methodsFor:'user actions-saving'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9313
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9314
doPrint
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9315
    "prints current image on the current printer"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9316
1734
98ebea4111f9 waitCursor while printing
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  9317
    self withWaitCursorDo:[
98ebea4111f9 waitCursor while printing
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  9318
        imageEditView print
98ebea4111f9 waitCursor while printing
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  9319
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9320
!
228524287573 intitial checkin
tz
parents:
diff changeset
  9321
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  9322
doSaveButtonImageToFileAs
3375
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  9323
    "opens a dialog for saving current image to a file.
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  9324
     Saved as a button image (i.e. with a frame around)"
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  9325
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  9326
    imageEditView saveButtonImageToFileAs.
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  9327
    self updateLabelsAndHistory.
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  9328
!
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  9329
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9330
doSaveImageFile
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9331
    "saves current image to current file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9332
1481
32f1fd9d0f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
  9333
    imageEditView save.
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  9334
    self clearModifiedAndRememberImageSaved.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9335
!
228524287573 intitial checkin
tz
parents:
diff changeset
  9336
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9337
doSaveImageFileAs
1922
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9338
    "opens a dialog for saving an image to a file"
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9339
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9340
    |img file filters|
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9341
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9342
    img := self image.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9343
    img notNil ifTrue: [
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9344
        file := img fileName
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9345
    ].
3426
6d0987492205 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3425
diff changeset
  9346
    
2595
e1eeda9d1639 changed: #doSaveImageFileAs
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  9347
    filters := FileSelectionBrowser saveImageFileNameFilters.
1922
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9348
3066
a8e197ceebed Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 3050
diff changeset
  9349
    (UserPreferences current useNativeFileDialog
3100
d2310ff3cbab class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3080
diff changeset
  9350
     and:[Screen current isWindowsPlatform]) ifTrue:[
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9351
        self withWaitCursorDo:[
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  9352
            "/ windows only
3066
a8e197ceebed Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 3050
diff changeset
  9353
            file := Screen current
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9354
                nativeFileDialogFor:(self window topView id)
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9355
                save:true
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  9356
                title:(resources string:'Save Image in File')
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9357
                inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory])
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9358
                initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png'])
2827
c99d2c520b28 changed:
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
  9359
                "/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR)
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9360
                filter:
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9361
                  {
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9362
                          { (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp'  } .
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9363
                          { (resources string:'All Files') . '*.*'  } 
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9364
                  }
2821
850aa6d37ea3 changed:
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  9365
                extension:nil
2827
c99d2c520b28 changed:
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
  9366
                "blocking:false".
2807
b89a09017a97 changed: #doSaveImageFileAs
Claus Gittinger <cg@exept.de>
parents: 2796
diff changeset
  9367
        ].
3425
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  9368
    ] ifFalse:[ 
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  9369
        img fileName isNil ifTrue:[
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  9370
            LastDirectory notNil ifTrue:[
3426
6d0987492205 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3425
diff changeset
  9371
                file isNil ifTrue:[
6d0987492205 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3425
diff changeset
  9372
                    file := 'image.png'.
6d0987492205 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3425
diff changeset
  9373
                ].
3425
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  9374
                file := LastDirectory asFilename construct:(file asFilename baseName).
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  9375
            ].    
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  9376
        ].    
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9377
        (FileSelectionBrowser isNil or:[DirectoryView isNil]) ifTrue:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9378
            file notNil ifTrue:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9379
                file := Dialog requestFileName:'Save Image To'
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9380
                            default:file
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9381
                            pattern:(filters first).
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9382
            ] ifFalse:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9383
                file := Dialog
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9384
                            requestFileName:'Save Image To'
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9385
                            default:'image.png'
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9386
                            pattern:(filters first)
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9387
                            fromDirectory:LastDirectory.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9388
            ].
2807
b89a09017a97 changed: #doSaveImageFileAs
Claus Gittinger <cg@exept.de>
parents: 2796
diff changeset
  9389
        ] ifFalse:[
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9390
            file notNil ifTrue:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9391
                file := FileSelectionBrowser
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9392
                            request:'Save Image To'
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9393
                            fileName:file
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9394
                            withFileFilters:filters.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9395
            ] ifFalse:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9396
                file := FileSelectionBrowser
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  9397
                            request:'Save Image in File:'
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9398
                            inDirectory:LastDirectory
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9399
                            withFileFilters:filters.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9400
            ].
2807
b89a09017a97 changed: #doSaveImageFileAs
Claus Gittinger <cg@exept.de>
parents: 2796
diff changeset
  9401
        ].
1922
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9402
    ].
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9403
    file notNil ifTrue:[
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9404
        imageEditView saveImageFileAs:file.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9405
        LastDirectory := file asFilename directoryName.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9406
        self updateLabelsAndHistory.
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  9407
        self clearModifiedAndRememberImageSavedAsFile:file.
1922
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9408
    ]
2807
b89a09017a97 changed: #doSaveImageFileAs
Claus Gittinger <cg@exept.de>
parents: 2796
diff changeset
  9409
3426
6d0987492205 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3425
diff changeset
  9410
    "Modified: / 27-02-2017 / 01:26:05 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9411
!
228524287573 intitial checkin
tz
parents:
diff changeset
  9412
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9413
doSaveImageMaskFileAs
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9414
    "opens a dialog for saving mask of current image to a file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9415
1481
32f1fd9d0f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
  9416
    imageEditView saveImageMaskFileAs.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9417
!
228524287573 intitial checkin
tz
parents:
diff changeset
  9418
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9419
doSaveMethod
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9420
    "saves the image in current class and selector"
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9421
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9422
    imageEditView saveMethod ifTrue:[
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  9423
        self updateLabelsAndHistory.
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  9424
        self clearModifiedAndRememberImageSaved.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9425
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  9426
!
228524287573 intitial checkin
tz
parents:
diff changeset
  9427
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9428
doSaveMethodAs
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9429
    "opens a dialog for saving current image on a class and a selector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9430
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9431
    imageEditView saveMethodAs ifTrue:[
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  9432
        self updateLabelsAndHistory.
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  9433
        self clearModifiedAndRememberImageSaved.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9434
    ]
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9435
!
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9436
3022
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9437
doShowPixelArrayLiteralString
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9438
    "opens a dialog showing a literal array-like storeString
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9439
     (sometimes useful to embed an image into source code)"
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9440
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9441
    |img|
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9442
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9443
    img := imageEditView image.
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9444
    TextBox openOn:img bits storeString
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9445
!
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9446
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9447
doShowStoreString
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9448
    "opens a dialog showing the storeString
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9449
     (sometimes useful to embed an image into source code)"
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9450
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9451
    |img|
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9452
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9453
    img := imageEditView image.
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9454
    TextBox openOn:img storeString
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9455
!
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9456
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9457
save
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9458
    "saves current image on current class and selector"
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9459
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9460
    self doSaveMethod
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9461
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  9462
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  9463
!ImageEditor methodsFor:'user actions-settings'!
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9464
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9465
doChangeGridMagnification
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9466
    "change grid magnification"
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9467
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9468
    |box oldGridLimit newGridLimit|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9469
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9470
    oldGridLimit := imageEditView class gridMagnificationLimit asPoint.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9471
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9472
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9473
    box title:(resources string:'Grid Magnification Limit:').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9474
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9475
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9476
    box initialText:(oldGridLimit x printString).
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9477
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9478
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9479
    (box accepted 
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9480
    and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil]
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9481
    ) ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9482
        newGridLimit := (99 min: (2 max:newGridLimit)) asPoint.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9483
        imageEditView class gridMagnificationLimit:newGridLimit.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9484
        imageEditView invalidate
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9485
    ]
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9486
2192
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  9487
!
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  9488
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  9489
penWidth:n
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  9490
    imageEditView penWidth:n
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  9491
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  9492
    "Created: / 01-11-2007 / 23:47:48 / cg"
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9493
!
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9494
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9495
penWidthHolderChanged
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9496
    imageEditView penWidth:(self penWidthHolder value)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9497
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9498
    "Created: / 15-02-2012 / 22:32:00 / cg"
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9499
!
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9500
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9501
spraySpot:n
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9502
    imageEditView spraySpot:n
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9503
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9504
    "Created: / 01-11-2007 / 23:47:48 / cg"
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9505
!
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9506
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9507
spraySpotHolderChanged
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9508
    imageEditView spraySpot:(self spraySpotHolder value)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9509
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9510
    "Created: / 15-02-2012 / 22:37:08 / cg"
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9511
! !
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9512
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9513
!ImageEditor class methodsFor:'documentation'!
228524287573 intitial checkin
tz
parents:
diff changeset
  9514
228524287573 intitial checkin
tz
parents:
diff changeset
  9515
version
228524287573 intitial checkin
tz
parents:
diff changeset
  9516
    ^ '$Header$'
2590
9f2cb061d07f changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
  9517
!
9f2cb061d07f changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
  9518
9f2cb061d07f changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
  9519
version_CVS
9f2cb061d07f changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
  9520
    ^ '$Header$'
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9521
! !
2945
facf3c7b0e31 changed: #processEvent:
Claus Gittinger <cg@exept.de>
parents: 2932
diff changeset
  9522