ImageEditor.st
author Claus Gittinger <cg@exept.de>
Wed, 18 Dec 2019 19:07:20 +0100
changeset 3829 7a5b398e1316
parent 3811 1c02ea1990b5
child 3830 bf667c58b12e
permissions -rw-r--r--
regenerated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3811
1c02ea1990b5 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 3765
diff changeset
     1
"{ Encoding: utf8 }"
1c02ea1990b5 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 3765
diff changeset
     2
400
228524287573 intitial checkin
tz
parents:
diff changeset
     3
"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
     4
 COPYRIGHT (c) 1997-1998 by eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
     5
              All Rights Reserved
228524287573 intitial checkin
tz
parents:
diff changeset
     6
228524287573 intitial checkin
tz
parents:
diff changeset
     7
 This software is furnished under a license and may be used
228524287573 intitial checkin
tz
parents:
diff changeset
     8
 only in accordance with the terms of that license and with the
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
     9
 inclusion of the above copyright notice. This software may not
400
228524287573 intitial checkin
tz
parents:
diff changeset
    10
 be provided or otherwise made available to, or used by, any
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
    11
 other person. No title to or ownership of the software is
400
228524287573 intitial checkin
tz
parents:
diff changeset
    12
 hereby transferred.
228524287573 intitial checkin
tz
parents:
diff changeset
    13
"
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
    14
"{ Package: 'stx:libtool2' }"
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
    15
3180
9ee8f0e74b96 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3173
diff changeset
    16
"{ NameSpace: Smalltalk }"
9ee8f0e74b96 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3173
diff changeset
    17
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    18
ResourceSpecEditor subclass:#ImageEditor
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
    19
	instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
    20
		selectedColorIndex postOpenAction imageSeqNr drawingColormap
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
    21
		lastShiftUsedWrap lastGrabbedScreenArea
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
    22
		allowedToChangeImageDimensionAndDepth savedImage savedFile'
3416
9d51a45479e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3415
diff changeset
    23
	classVariableNames:'DefaultRelativeSizes LastColormapMode LastDirectory
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
    24
		LastSizeString LastURL MaskClipboard LastDepth
3550
b31b44c04a3e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3546
diff changeset
    25
		LastNumThresholdGrayColors LastMagnifyTo LastMagnifyBy
b31b44c04a3e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3546
diff changeset
    26
		LastMagnifySmoothing'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
    27
	poolDictionaries:''
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
    28
	category:'Interface-UIPainter'
400
228524287573 intitial checkin
tz
parents:
diff changeset
    29
!
228524287573 intitial checkin
tz
parents:
diff changeset
    30
228524287573 intitial checkin
tz
parents:
diff changeset
    31
!ImageEditor class methodsFor:'documentation'!
228524287573 intitial checkin
tz
parents:
diff changeset
    32
228524287573 intitial checkin
tz
parents:
diff changeset
    33
copyright
228524287573 intitial checkin
tz
parents:
diff changeset
    34
"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    35
 COPYRIGHT (c) 1997-1998 by eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
    36
              All Rights Reserved
228524287573 intitial checkin
tz
parents:
diff changeset
    37
228524287573 intitial checkin
tz
parents:
diff changeset
    38
 This software is furnished under a license and may be used
228524287573 intitial checkin
tz
parents:
diff changeset
    39
 only in accordance with the terms of that license and with the
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
    40
 inclusion of the above copyright notice. This software may not
400
228524287573 intitial checkin
tz
parents:
diff changeset
    41
 be provided or otherwise made available to, or used by, any
405
8546da96ab11 widgets rearranged for different fonts
tz
parents: 401
diff changeset
    42
 other person. No title to or ownership of the software is
400
228524287573 intitial checkin
tz
parents:
diff changeset
    43
 hereby transferred.
228524287573 intitial checkin
tz
parents:
diff changeset
    44
"
228524287573 intitial checkin
tz
parents:
diff changeset
    45
!
228524287573 intitial checkin
tz
parents:
diff changeset
    46
228524287573 intitial checkin
tz
parents:
diff changeset
    47
documentation
228524287573 intitial checkin
tz
parents:
diff changeset
    48
"
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
    49
    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
    50
    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
    51
    bitmaps in expecco.
400
228524287573 intitial checkin
tz
parents:
diff changeset
    52
3530
e26aace861c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3526
diff changeset
    53
    The actual drawing functionality is found in ImageEditView;
e26aace861c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3526
diff changeset
    54
    the code here (an appModel) provides nice menus, previews, colormap manipulation etc.
e26aace861c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3526
diff changeset
    55
400
228524287573 intitial checkin
tz
parents:
diff changeset
    56
    [start with:]
228524287573 intitial checkin
tz
parents:
diff changeset
    57
        ImageEditor open
941
6d75430a8120 fixed start call in docu
tz
parents: 937
diff changeset
    58
        ImageEditor openOnClass:Icon andSelector:#startIcon
3466
2d5ea09863c6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3465
diff changeset
    59
        (Image fromFile:'../../goodies/bitmaps/gifImages/garfield.gif') edit
2d5ea09863c6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3465
diff changeset
    60
        (Image fromScreen:(0@0 corner:100@100)) edit
400
228524287573 intitial checkin
tz
parents:
diff changeset
    61
228524287573 intitial checkin
tz
parents:
diff changeset
    62
    [see also:]
228524287573 intitial checkin
tz
parents:
diff changeset
    63
        ImageEditView Image
228524287573 intitial checkin
tz
parents:
diff changeset
    64
228524287573 intitial checkin
tz
parents:
diff changeset
    65
    [author:]
544
8fa6ee20c3cd help menu item aligned to the right
tz
parents: 535
diff changeset
    66
        Thomas Zwick, eXept Software AG
1806
2d642633ff7b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1799
diff changeset
    67
        Claus Gittinger, eXept Software AG
400
228524287573 intitial checkin
tz
parents:
diff changeset
    68
"
228524287573 intitial checkin
tz
parents:
diff changeset
    69
! !
228524287573 intitial checkin
tz
parents:
diff changeset
    70
228524287573 intitial checkin
tz
parents:
diff changeset
    71
!ImageEditor class methodsFor:'instance creation'!
228524287573 intitial checkin
tz
parents:
diff changeset
    72
3357
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
    73
openLoadingImageWith:aBlock modal:modalBoolean
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
    74
    "opens an Image Editor on anImage.
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
    75
     Returns the editor (to access its attributes)"
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    76
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    77
    |editor|
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    78
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    79
    editor := self new.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    80
    editor allButOpen.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    81
    aBlock value:editor.
3357
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
    82
    modalBoolean ifTrue:[
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
    83
        editor openWindowModal.
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
    84
    ] ifFalse:[
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
    85
        editor openWindow.
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
    86
    ].
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
    87
    ^ editor
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
    88
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
    89
    "Modified (comment): / 07-03-2017 / 16:36:16 / cg"
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    90
!
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    91
400
228524287573 intitial checkin
tz
parents:
diff changeset
    92
openModalOnClass: aClass andSelector: aSelector
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    93
    "opens a modal Image Editor on aClass and aSelector.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    94
     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
    95
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
    96
    |imageEditor imageEditView className resourceClass resourceSelector| 
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    97
400
228524287573 intitial checkin
tz
parents:
diff changeset
    98
    imageEditor := self new.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
    99
900
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
   100
    aClass isClass  ifTrue: [className := aClass name].
5dd8303a9bb5 opens an Image Editor in any case
tz
parents: 899
diff changeset
   101
    aClass isString ifTrue: [className := aClass].      
903
63203d996e61 openModal bug fixed
tz
parents: 901
diff changeset
   102
    aClass isNil    ifTrue: [className := ''].      
400
228524287573 intitial checkin
tz
parents:
diff changeset
   103
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   104
    imageEditor postOpenAction: [
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   105
            imageEditView := imageEditor imageEditView. 
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   106
            imageEditor loadFromOrPrepareForClass: aClass andSelector: aSelector
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   107
        ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
   108
    imageEditor openModal.
228524287573 intitial checkin
tz
parents:
diff changeset
   109
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   110
    resourceClass := imageEditView resourceClass.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   111
    resourceSelector := imageEditView resourceSelector.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   112
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   113
    (resourceClass isNil or:[resourceSelector isNil]) ifTrue:[^ nil].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   114
    ^ Array with:resourceClass with:resourceSelector
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   115
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   116
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   117
     self openModalOnClass: self andSelector: #leftMouseKeyIcon
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   118
    "
400
228524287573 intitial checkin
tz
parents:
diff changeset
   119
!
228524287573 intitial checkin
tz
parents:
diff changeset
   120
3357
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
   121
openModalOnFile:aFileName
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   122
    "opens an Image Editor on aFileName.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   123
     Returns the editor (to access its attributes)"
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   124
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   125
    ^ self openOnFile:aFileName modal:true
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
    "
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
   128
     self openModalOnFile: '../../goodies/bitmaps/gifImages/back.gif'
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
   129
    "
3411
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
   130
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   131
    "Modified: / 07-03-2017 / 16:36:32 / cg"
3357
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
   132
!
97c7ed5950e5 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 3356
diff changeset
   133
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   134
openModalOnImage:anImage
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   135
    "opens a modal Image Editor on an image.
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   136
     Returns the modified image or nil if unsaved/unchanged"
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   137
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   138
    |imageEditor imageEditView newImage| 
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 := self new.
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
   141
    imageEditor allowedToChangeImageDimensionAndDepth:false.
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   142
    imageEditor postOpenAction: [
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   143
            imageEditView := imageEditor imageEditView. 
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   144
            imageEditor loadFromImage: anImage
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   145
        ].
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   146
    imageEditor openModal.
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   147
2766
88fa6c4bf6d3 changed: #openModalOnImage:
Claus Gittinger <cg@exept.de>
parents: 2765
diff changeset
   148
    newImage := imageEditor savedImage.
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   149
    ^ newImage
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   150
!
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
   151
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   152
openOnClass:aClass andSelector:aSelector
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   153
    "opens an Image Editor on aClass and aSelector.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   154
     Returns the editor (to access its attributes)"
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   155
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   156
    ^ self openOnClass:aClass andSelector:aSelector modal:false
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   157
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   158
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   159
     self openOnClass:self andSelector:#leftMouseKeyIcon
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   160
     self openOnClass:self andSelector:nil
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   161
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   162
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   163
    "Modified: / 07-03-2017 / 16:36:58 / cg"
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   164
!
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   165
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   166
openOnClass:aClass andSelector:aSelector modal:modal
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   167
    "opens an Image Editor on aClass and aSelector.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   168
     Returns the editor (to access its attributes)"
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
    ^ self 
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   171
        openLoadingImageWith:[:editor | 
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   172
            editor loadFromClass:(aClass theNonMetaclass) andSelector:aSelector
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
        modal:modal.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   175
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   176
    "
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   177
     self openOnClass:self andSelector:#leftMouseKeyIcon modal:true
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   178
     self openOnClass:self andSelector:nil
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   179
    "
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   180
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   181
    "Created: / 07-03-2017 / 16:34:36 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   182
!
228524287573 intitial checkin
tz
parents:
diff changeset
   183
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   184
openOnFile:aFileName
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   185
    "opens an Image Editor on aFileName.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   186
     Returns the editor (to access its attributes)"
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   187
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   188
    ^ self openOnFile:aFileName modal:false   
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
   189
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   190
    "
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   191
     self openOnFile: '../../goodies/bitmaps/gifImages/back.gif'
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   192
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   193
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   194
    "Modified: / 07-03-2017 / 16:37:33 / cg"
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   195
!
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   196
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   197
openOnFile:aFileName modal:modal
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   198
    "opens an Image Editor on aFileName.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   199
     Returns the editor (to access its attributes)"
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
    ^ self 
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   202
        openLoadingImageWith:[:editor | 
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   203
            editor loadFromFile:aFileName.
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
        modal:modal.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   206
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   207
    "
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   208
     self openOnFile: '../../goodies/bitmaps/gifImages/back.gif' modal:false
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   209
     self openOnFile: '../../goodies/bitmaps/gifImages/back.gif' modal:true
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   210
    "
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   211
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   212
    "Created: / 07-03-2017 / 16:33:12 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   213
!
228524287573 intitial checkin
tz
parents:
diff changeset
   214
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   215
openOnImage:anImage
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   216
    "opens an Image Editor on anImage.
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   217
     Returns the editor (to access its attributes)"
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   218
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   219
    ^ self 
3375
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
   220
        openLoadingImageWith:[:editor | editor loadFromImage: anImage ] 
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
   221
        modal:false
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
   222
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   223
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   224
     self openOnImage: Icon startIcon
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   225
    "
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
   226
3427
4c2297e8a454 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   227
    "Modified: / 07-03-2017 / 16:37:57 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   228
! !
228524287573 intitial checkin
tz
parents:
diff changeset
   229
228524287573 intitial checkin
tz
parents:
diff changeset
   230
!ImageEditor class methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
   231
228524287573 intitial checkin
tz
parents:
diff changeset
   232
listOfColorMaps
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   233
    "returns the list of default color maps for a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   234
228524287573 intitial checkin
tz
parents:
diff changeset
   235
    |colorMap|
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   236
400
228524287573 intitial checkin
tz
parents:
diff changeset
   237
    (colorMap := OrderedCollection new)
228524287573 intitial checkin
tz
parents:
diff changeset
   238
        add: Color black;
228524287573 intitial checkin
tz
parents:
diff changeset
   239
        add: Color white;
228524287573 intitial checkin
tz
parents:
diff changeset
   240
        add: Color red;
228524287573 intitial checkin
tz
parents:
diff changeset
   241
        add: Color green;
228524287573 intitial checkin
tz
parents:
diff changeset
   242
        add: Color blue;
228524287573 intitial checkin
tz
parents:
diff changeset
   243
        add: Color cyan;
228524287573 intitial checkin
tz
parents:
diff changeset
   244
        add: Color yellow;
228524287573 intitial checkin
tz
parents:
diff changeset
   245
        add: Color magenta;
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   246
        add: (Color redByte: 127 greenByte:   0 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   247
        add: (Color redByte:   0 greenByte: 127 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   248
        add: (Color redByte:   0 greenByte:   0 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   249
        add: (Color redByte:   0 greenByte: 127 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   250
        add: (Color redByte: 127 greenByte: 127 blueByte:   0);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   251
        add: (Color redByte: 127 greenByte:   0 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   252
        add: (Color redByte: 127 greenByte: 127 blueByte: 127);
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   253
        add: (Color redByte: 170 greenByte: 170 blueByte: 170).
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   254
3346
15a3fc3d13d9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   255
    0 to: 5 do: [:r|                                                    
15a3fc3d13d9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   256
        0 to: 5 do: [:g|
15a3fc3d13d9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   257
            0 to: 5 do: [:b|
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   258
                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
   259
            ]
228524287573 intitial checkin
tz
parents:
diff changeset
   260
        ]
228524287573 intitial checkin
tz
parents:
diff changeset
   261
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   262
3346
15a3fc3d13d9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   263
    1 to: 25 do: [:g|                             
898
d2ae6ce33fec bugs fixed in undo/mask and pasting
tz
parents: 895
diff changeset
   264
        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
   265
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
   266
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   267
    ^ Dictionary new
2571
8b182cc4cac7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2567
diff changeset
   268
        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
   269
        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
   270
        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
   271
        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
   272
        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
   273
        at: #depth8  put: colorMap;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   274
        at: #masked8 put: colorMap;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   275
        at: #depth4  put: (colorMap copyFrom: 1 to: 16);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   276
        at: #masked4 put: (colorMap copyFrom: 1 to: 16);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   277
        at: #depth2  put: (colorMap copyFrom: 1 to: 4);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   278
        at: #masked2 put: (colorMap copyFrom: 1 to: 4);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   279
        at: #depth1  put: (colorMap copyFrom: 1 to: 2);
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   280
        at: #masked1 put: (colorMap copyFrom: 1 to: 2);
400
228524287573 intitial checkin
tz
parents:
diff changeset
   281
        yourself
228524287573 intitial checkin
tz
parents:
diff changeset
   282
!
228524287573 intitial checkin
tz
parents:
diff changeset
   283
228524287573 intitial checkin
tz
parents:
diff changeset
   284
listOfDefaultSizes
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
   285
    "returns the list of default sizes for a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
   286
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
   287
    ^ #('8x8' '16x16' '22x22' '32x32' '48x48' '64x64')
932
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   288
7111238cda23 fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   289
    "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
   290
!
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   291
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   292
namesOfColorMaps
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   293
    ^ Dictionary new
2571
8b182cc4cac7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2567
diff changeset
   294
        at: #depth32 put: '32-plane (rgba)';
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   295
        at: #depth24 put: '24-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   296
        at: #masked24 put: '24-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   297
        at: #depth16 put: '16-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   298
        at: #masked16 put: '16-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   299
        at: #depth8  put: ' 8-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   300
        at: #masked8 put: ' 8-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   301
        at: #depth4  put: ' 4-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   302
        at: #masked4 put: ' 4-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   303
        at: #depth2  put: ' 2-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   304
        at: #masked2 put: ' 2-plane + mask';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   305
        at: #depth1  put: ' 1-plane';
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   306
        at: #masked1 put: ' 1-plane + mask' ;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
   307
        yourself
400
228524287573 intitial checkin
tz
parents:
diff changeset
   308
! !
228524287573 intitial checkin
tz
parents:
diff changeset
   309
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   310
!ImageEditor class methodsFor:'help specs'!
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   311
3644
61d49e748c1f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3635
diff changeset
   312
helpSpec
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   313
    "This resource specification was automatically generated
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   314
     by the UIHelpTool of ST/X."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   315
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   316
    "Do not manually edit this!! If it is corrupted,
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   317
     the UIHelpTool may not be able to read the specification."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   318
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   319
    "
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   320
     UIHelpTool openOnClass:ImageEditor
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   321
    "
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   322
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   323
    <resource: #help>
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   324
3644
61d49e748c1f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3635
diff changeset
   325
    ^super helpSpec addPairsFrom: #(
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   326
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   327
#autoCropAll
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   328
'Find and remove all borders'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   329
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   330
#autoCropBottom
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   331
'Find and remove bottom border'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   332
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   333
#autoCropLeft
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   334
'Find and remove left border'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   335
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   336
#autoCropRight
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   337
'Find and remove right border'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   338
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   339
#autoCropTop
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   340
'Find and remove top border'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   341
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   342
#colorMap
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   343
'ColorMap functions'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   344
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   345
#colorMap1
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   346
'Convert to depth-1 image'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   347
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   348
#colorMap1M
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   349
'Convert to depth-1 image plus mask'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   350
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   351
#colorMap2
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   352
'Convert to depth-2 image'
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   353
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   354
#colorMap24
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   355
'Convert to depth-24 image (rgb)'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   356
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   357
#colorMap2M
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   358
'Convert to depth-2 image plus mask'
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   359
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   360
#colorMap32
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   361
'Convert to depth-32 image (rgba)'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   362
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   363
#colorMap4
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   364
'Convert to depth-4 image'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   365
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   366
#colorMap4M
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   367
'Convert to depth-4 image plus mask'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   368
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   369
#colorMap8
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   370
'Convert to depth-8 image'
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   371
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   372
#colorMap8M
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   373
'Convert to depth-8 image plus mask'
2571
8b182cc4cac7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2567
diff changeset
   374
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   375
#colorMapTable
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   376
'Shows a list of used colors of the image'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   377
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
   378
#compressColormap
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   379
'Remove unneeded entries from the colorMap'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   380
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   381
#cropAll
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   382
'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
   383
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   384
#cropBottom
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   385
'Cut off the specified number of pixels at the bottom'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   386
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   387
#cropBySelectingArea
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   388
'Select new area in the right detail view.'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   389
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   390
#cropLeft
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   391
'Cut off the specified number of pixels at the left'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   392
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   393
#cropManual
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   394
'Specify border(s) to remove.'
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   395
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   396
#cropRight
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   397
'Cut off the specified number of pixels at the right'
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
   398
1045
c387bcacdf37 renamed - crob -> crop
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   399
#cropTop
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   400
'Cut off the specified number of pixels at the top'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   401
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   402
#cropubImage
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   403
'Select a subarea as the image''s new dimension'
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
   404
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   405
#drawModeBox
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   406
'Rectangle Drawing Mode'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   407
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
   408
#drawModeCircle
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   409
'Circle Drawing Mode'
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
   410
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   411
#drawModeCopy
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   412
'Area Copy Mode'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   413
3423
1b9fb486b83c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3422
diff changeset
   414
#drawModeCropSubImage
1b9fb486b83c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3422
diff changeset
   415
'Select and extract a subimage'
1b9fb486b83c #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3422
diff changeset
   416
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   417
#drawModeFill
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   418
'Flood Fill Mode'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   419
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   420
#drawModeFilledBox
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   421
'Filled Rectangle Drawing Mode'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   422
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   423
#drawModeFilledCircle
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   424
'Filled Circle Drawing Mode'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   425
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   426
#drawModeMaskOutsideCircle
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   427
'Mask everything outside a Circle'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   428
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   429
#drawModeMaskOutsideRectangle
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   430
'Mask everything outside a Rectangle'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   431
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   432
#drawModePaste
3512
36cd31bca6a4 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3506
diff changeset
   433
'Paste-Over Mode (only paste pixels; keep mask as is)'
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   434
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   435
#drawModePasteMasked
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   436
'Paste-Under Mode (only paste previously masked pixels)'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   437
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   438
#drawModePasteUnder
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
   439
'Paste-Under Mode (only paste previously masked pixels where the new pixel is also masked)'
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
   440
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   441
#drawModePasteWithMask
3512
36cd31bca6a4 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3506
diff changeset
   442
'Paste-with-Mask Mode (both pixel and mask are pasted)'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   443
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   444
#drawModePoint
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   445
'Point Drawing Mode'
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
   446
3765
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
   447
#drawModePointBlend
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
   448
'Point Drawing Mode (Blend Colors)'
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
   449
1639
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   450
#drawModeSpecial
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   451
'Special operations (select rectangle, then choose operation)'
1639
8f2059cc287c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1637
diff changeset
   452
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   453
#drawModeSpray
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   454
'Spray Drawing Mode'
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   455
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   456
#drawingAlpha
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   457
'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'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   458
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   459
#drawingColor1
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   460
'The color associated to the left mouse button.\Also the color used in fill operations'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   461
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   462
#drawingColor2
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   463
'The color associated to the right mouse button.\Also the second color used in gradient fill operations'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   464
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   465
#edit3DProjection
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   466
'Generate a 3D projection'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   467
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   468
#editFlipHorizontal
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   469
'Flip the image horizontally'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   470
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   471
#editFlipVertical
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   472
'Flip the image vertically'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   473
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   474
#editMagnifyImage
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   475
'Magnify the image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   476
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   477
#editNegate
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   478
'Invert the images colors'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   479
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   480
#editResize
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   481
'Resize the image (preserving the old image)'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   482
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   483
#editRotate
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   484
'Rotate the image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   485
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   486
#fileEditMask
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   487
'Load Mask from a File'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   488
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
   489
#fileGrabImageFromScreen
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   490
'Pick an image from the screen (specify area)'
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
   491
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
   492
#fileGrabImageFromWindow
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   493
'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
   494
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   495
#fileLoadFromClass
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   496
'Select and load an image from a resource method'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   497
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   498
#fileLoadFromFile
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   499
'Select and load an image from a file'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   500
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
   501
#fileLoadFromURL
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
   502
'Load an image from the net, given its URL'
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
   503
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   504
#fileNewImage
914
b4f32d092c8b added paste-under;
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   505
'Create a new image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   506
3200
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   507
#fileNewImageFromClipboard
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   508
'Create a new image and initialize it from the clipboard'
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   509
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   510
#fileNewMaskFromClipboard
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   511
'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
   512
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   513
#filePrint
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   514
'Print the image on a postscript printer'
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   515
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   516
#filePrint
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   517
'Print'
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   518
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   519
#fileSave
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   520
'Save the image'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   521
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   522
#fileSaveAs
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   523
'Save the image to a file'
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   524
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   525
#fileSaveButtonImageAs
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   526
'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
   527
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   528
#fileSaveMaskAs
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   529
'Save the mask of the image to a file'
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
   530
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   531
#fileSaveMethod
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   532
'Save the image as resource method in the current class and selector'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   533
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   534
#fileSaveMethodAs
2765
c74bcf69878b changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2764
diff changeset
   535
'Save the image as resource method in a class'
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   536
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   537
#floodFillMaxError
3433
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
   538
'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
   539
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   540
#hueShift
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   541
''
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   542
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   543
#lightFactor
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   544
''
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   545
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   546
#magnificationNumber
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   547
'Shows the current magnification'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   548
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   549
#magnifyImageDown
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   550
'Decrease magnification'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   551
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   552
#magnifyImageUp
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   553
'Increase magnification'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   554
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   555
#mouseKeyColorMode
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   556
'Toggle between left and right mouse button color'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   557
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   558
#nextImageInSequence
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   559
'Go to the next image in the animated gif image sequence.'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   560
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   561
#previewView
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   562
'Shows a preview of the image'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   563
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   564
#previousImageInSequence
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   565
'Go to the previous image in the animated gif image sequence.'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   566
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   567
#resetHueShift
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   568
'Reset the hue shift to zero (for unchanged hue)'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   569
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   570
#resetLightFactor
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   571
'Reset the light factor to 1 (for unchanged brightness)'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   572
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   573
#resetSaturationFactor
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   574
'Reset the saturation factor to 1 (for unchanged saturation)'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   575
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   576
#saturationFactor
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   577
''
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
   578
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   579
#settingsGridMagnification
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   580
'Change the grid magnification of the edit view'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   581
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   582
#xdrawModeBox
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   583
'Rectangle'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   584
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   585
#xdrawModeCopy
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   586
'Copy'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   587
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   588
#xdrawModeFill
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   589
'Flood-fill'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   590
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   591
#xdrawModeFilledBox
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   592
'Filled rectangle'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   593
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   594
#xdrawModePaste
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   595
'Paste'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   596
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   597
#xdrawModePasteUnder
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   598
'Paste under'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   599
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   600
#xdrawModePasteWithMask
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   601
'Paste with Mask'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   602
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   603
#xdrawModePoint
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   604
'Point'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   605
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   606
#xfileGrabImage
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   607
'Pick from screen'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   608
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   609
#xfileLoadFromClass
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   610
'Load from method...'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   611
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   612
#xfileLoadFromFile
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   613
'Load from file...'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   614
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   615
#xfileNewImage
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   616
'New image'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   617
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   618
#xfileSaveAs
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   619
'Save to file...'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   620
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   621
#xfileSaveMaskAs
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   622
'Save mask to file...'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   623
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   624
#xfileSaveMethod
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   625
'Save as method'
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   626
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   627
#xfileSaveMethodAs
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
   628
'Save as Method...'
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   629
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   630
)
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   631
3513
79c3eab8cb2f #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3512
diff changeset
   632
    "Modified: / 16-02-2017 / 12:30:55 / cg"
3644
61d49e748c1f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3635
diff changeset
   633
    "Modified: / 28-02-2019 / 11:57:39 / Claus Gittinger"
460
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   634
! !
9d141cb07d5e help texts added
tz
parents: 450
diff changeset
   635
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   636
!ImageEditor class methodsFor:'image specs'!
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
   637
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   638
brighterIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   639
    "This resource specification was automatically generated
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   640
     by the ImageEditor of ST/X."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   641
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   642
    "Do not manually edit this!! If it is corrupted,
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   643
     the ImageEditor may not be able to read the specification."
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
     self brighterIcon inspect
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   647
     ImageEditor openOnClass:self andSelector:#brighterIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   648
     Icon flushCachedIcons
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   649
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   650
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   651
    <resource: #image>
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   652
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   653
    ^Icon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   654
        constantNamed:'ImageEditor class brighterIcon'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   655
        ifAbsentPut:[(Depth8Image width:14 height:14) bits:(ByteArray fromPackedString:'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   656
@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
   657
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
   658
;><A@PDA@PDA@PDA@PDA@P@a')
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   659
            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
   660
            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
   661
!
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   662
2272
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   663
circleIcon
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   664
    "This resource specification was automatically generated
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   665
     by the ImageEditor of ST/X."
3442
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   666
2272
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   667
    "Do not manually edit this!! If it is corrupted,
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   668
     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
   669
2272
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   670
    "
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   671
     self circleIcon inspect
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   672
     ImageEditor openOnClass:self andSelector:#circleIcon
3442
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   673
     Icon flushCachedIcons
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   674
    "
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   675
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   676
    <resource: #image>
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   677
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   678
    ^Icon
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   679
        constantNamed:'ImageEditor class circleIcon'
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   680
        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
   681
            colorMapFromArray:#[0 0 0 127 127 127]
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
   682
            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
   683
!
d1923697d456 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2260
diff changeset
   684
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   685
copyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   686
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   687
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   688
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   689
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   690
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   691
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   692
     self copyIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   693
     ImageEditor openOnClass:self andSelector:#copyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   694
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   695
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   696
    ^ Icon constantNamed:'ImageEditor class copyIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   697
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   698
            (Depth2Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   699
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   700
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   701
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   702
                bitsPerSample:(#( 2 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   703
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   704
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   705
                            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
   706
                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
   707
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   708
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   709
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   710
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   711
                                        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
   712
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   713
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   714
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   715
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   716
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   717
cropSubImageIcon
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   718
    "This resource specification was automatically generated
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   719
     by the ImageEditor of ST/X."
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   720
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   721
    "Do not manually edit this!! If it is corrupted,
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   722
     the ImageEditor may not be able to read the specification."
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
     self cropSubImageIcon inspect
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   726
     ImageEditor openOnClass:self andSelector:#cropSubImageIcon
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   727
     Icon flushCachedIcons
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   728
    "
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   729
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   730
    <resource: #image>
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   731
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   732
    ^Icon
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   733
        constantNamed:'ImageEditor class cropSubImageIcon'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   734
        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
   735
            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
   736
            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
   737
!
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   738
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   739
darkerIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   740
    "This resource specification was automatically generated
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   741
     by the ImageEditor of ST/X."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   742
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   743
    "Do not manually edit this!! If it is corrupted,
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   744
     the ImageEditor may not be able to read the specification."
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
     self darkerIcon inspect
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   748
     ImageEditor openOnClass:self andSelector:#darkerIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   749
     Icon flushCachedIcons
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   750
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   751
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   752
    <resource: #image>
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   753
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   754
    ^Icon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   755
        constantNamed:'ImageEditor class darkerIcon'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   756
        ifAbsentPut:[(Depth8Image width:14 height:14) bits:(ByteArray fromPackedString:'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   757
@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
   758
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
   759
9^TA@PDA@PDA@PDA@PDA@P@a')
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   760
            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
   761
            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
   762
!
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   763
2155
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   764
defaultIcon
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   765
    <resource: #programImage>
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   766
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   767
    ^ ToolbarIconLibrary startImageEditorIcon
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   768
!
bfc839d08928 Add #defaultIcon
Stefan Vogel <sv@exept.de>
parents: 2136
diff changeset
   769
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   770
editIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   771
    "This resource specification was automatically generated
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   772
     by the ImageEditor of ST/X."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   773
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   774
    "Do not manually edit this!! If it is corrupted,
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   775
     the ImageEditor may not be able to read the specification."
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
     self editIcon inspect
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   779
     ImageEditor openOnClass:self andSelector:#editIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   780
     Icon flushCachedIcons
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   781
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   782
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   783
    <resource: #image>
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   784
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   785
    ^Icon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   786
        constantNamed:'ImageEditor class editIcon'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   787
        ifAbsentPut:[(Depth8Image width:15 height:16) bits:(ByteArray fromPackedString:'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   788
@@@@@@@3V41AJ0T@@@@@@@@@@B1(TD4>EP@@@@@@@@@@@CA!!S4X2D@@@@@@@@@@@LV)XTTHX@@@@@@@@@@@@K6UTS$LR@@@@@@@@@@@9OE9VRQ8@@@@@@@@@
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   789
@@@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
   790
@@ IDP@@@@@@@@@@@@@@@@\K@@@@@@@@@@@@@@@@@A,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@')
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   791
            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
   792
            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
   793
!
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
   794
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   795
emptyIcon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   796
    "This resource specification was automatically generated
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   797
     by the ImageEditor of ST/X."
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   798
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   799
    "Do not manually edit this!! If it is corrupted,
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   800
     the ImageEditor may not be able to read the specification."
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
     self emptyIcon inspect
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   804
     ImageEditor openOnClass:self andSelector:#emptyIcon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   805
     Icon flushCachedIcons
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   806
    "
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   807
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   808
    <resource: #image>
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   809
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   810
    ^Icon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   811
        constantNamed:'ImageEditor class emptyIcon'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   812
        ifAbsentPut:[(Depth4Image width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   813
@@@@@@@@@@@b')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   814
            colorMapFromArray:#[0 0 0]
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   815
            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
   816
!
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   817
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   818
emptyIcon2
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   819
    "This resource specification was automatically generated
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   820
     by the ImageEditor of ST/X."
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   821
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   822
    "Do not manually edit this!! If it is corrupted,
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   823
     the ImageEditor may not be able to read the specification."
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
     self emptyIcon2 inspect
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   827
     ImageEditor openOnClass:self andSelector:#emptyIcon2
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   828
     Icon flushCachedIcons
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   829
    "
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   830
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   831
    <resource: #image>
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
    ^Icon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   834
        constantNamed:'ImageEditor class emptyIcon2'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   835
        ifAbsentPut:[(Depth4Image width:28 height:14) bits:(ByteArray fromPackedString:'
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
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   838
@@@@@@@@@@@@@@@@@@@@@@@a')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   839
            colorMapFromArray:#[0 0 0]
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   840
            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
   841
!
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   842
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   843
fillCircleIcon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   844
    "This resource specification was automatically generated
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   845
     by the ImageEditor of ST/X."
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   846
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   847
    "Do not manually edit this!! If it is corrupted,
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   848
     the ImageEditor may not be able to read the specification."
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
     self fillCircleIcon inspect
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   852
     ImageEditor openOnClass:self andSelector:#fillCircleIcon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   853
     Icon flushCachedIcons
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   854
    "
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   855
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   856
    <resource: #image>
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   857
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   858
    ^Icon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   859
        constantNamed:'ImageEditor class fillCircleIcon'
3443
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   860
        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
   861
            colorMapFromArray:#[0 0 0 127 127 127]
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   862
            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
   863
!
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
   864
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   865
fillDiagonalGradientRectIcon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   866
    "This resource specification was automatically generated
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   867
     by the ImageEditor of ST/X."
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   868
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   869
    "Do not manually edit this!! If it is corrupted,
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   870
     the ImageEditor may not be able to read the specification."
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
     self fillDiagonalGradientRectIcon inspect
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   874
     ImageEditor openOnClass:self andSelector:#fillDiagonalGradientRectIcon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   875
     Icon flushCachedIcons
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   876
    "
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   877
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   878
    <resource: #image>
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   879
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   880
    ^Icon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   881
        constantNamed:'ImageEditor class fillDiagonalGradientRectIcon'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   882
        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
   883
@@@@@@@@@@@b')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   884
            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
   885
            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
   886
!
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   887
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   888
fillGradientRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   889
    <resource: #image>
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   890
    "This resource specification was automatically generated
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   891
     by the ImageEditor of ST/X."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   892
    "Do not manually edit this!! If it is corrupted,
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   893
     the ImageEditor may not be able to read the specification."
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   894
    "
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   895
     self fillGradientRectIcon inspect
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   896
     ImageEditor openOnClass:self andSelector:#fillGradientRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   897
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   898
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   899
    ^ Icon constantNamed:'ImageEditor class fillGradientRectIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   900
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   901
            (Depth4Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   902
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   903
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   904
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   905
                bitsPerSample:(#[ 4 ]);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   906
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   907
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   908
                            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
   909
@@@@@@@@@@@b');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   910
                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
   911
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   912
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   913
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   914
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   915
                                        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
   916
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   917
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   918
        ]
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   919
!
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   920
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   921
fillHorizontalGradientRectIcon
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   922
    "This resource specification was automatically generated
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   923
     by the ImageEditor of ST/X."
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   924
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   925
    "Do not manually edit this!! If it is corrupted,
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   926
     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
   927
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   928
    "
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   929
     self fillHorizontalGradientRectIcon inspect
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   930
     ImageEditor openOnClass:self andSelector:#fillHorizontalGradientRectIcon
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   931
     Icon flushCachedIcons
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   932
    "
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   933
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   934
    <resource: #image>
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   935
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   936
    ^Icon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   937
        constantNamed:'ImageEditor class fillHorizontalGradientRectIcon'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   938
        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
   939
@@@@@@@@@@@b')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
   940
            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
   941
            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
   942
!
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
   943
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   944
fillIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   945
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   946
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   947
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   948
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   949
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   950
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   951
     self fillIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   952
     ImageEditor openOnClass:self andSelector:#fillIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   953
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   954
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   955
    ^ Icon constantNamed:'ImageEditor class fillIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   956
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   957
            (Depth2Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   958
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   959
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   960
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   961
                bitsPerSample:(#( 2 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   962
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   963
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   964
                            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
   965
                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
   966
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   967
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   968
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   969
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   970
                                        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
   971
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   972
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   973
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   974
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   975
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   976
fillRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   977
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   978
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   979
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   980
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   981
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   982
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   983
     self fillRectIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
   984
     ImageEditor openOnClass:self andSelector:#fillRectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   985
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   986
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   987
    ^ Icon constantNamed:'ImageEditor class fillRectIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   988
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   989
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   990
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   991
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   992
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   993
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   994
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   995
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   996
                            fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   997
                colorMapFromArray:#[ 0 0 0 255 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   998
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
   999
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1000
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1001
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1002
                                        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
  1003
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1004
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1005
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1006
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1007
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
  1008
fillVerticalGradientRectIcon
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
  1009
    "This resource specification was automatically generated
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
  1010
     by the ImageEditor of ST/X."
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1011
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
  1012
    "Do not manually edit this!! If it is corrupted,
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
  1013
     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
  1014
2871
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
  1015
    "
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1016
     self fillVerticalGradientRectIcon inspect
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1017
     ImageEditor openOnClass:self andSelector:#fillVerticalGradientRectIcon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1018
     Icon flushCachedIcons
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1019
    "
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1020
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1021
    <resource: #image>
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1022
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1023
    ^Icon
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1024
        constantNamed:'ImageEditor class fillVerticalGradientRectIcon'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1025
        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
  1026
@@@@@@@@@@@b')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  1027
            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
  1028
            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
  1029
!
23c3bb9d51be #localHelpTexts
Claus Gittinger <cg@exept.de>
parents: 2870
diff changeset
  1030
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1031
flipHorizontalIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1032
    <resource: #image>
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1033
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1034
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1035
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1036
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1037
    "
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1038
     self flipHorizontalIcon inspect
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1039
     ImageEditor openOnClass:self andSelector:#flipHorizontalIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1040
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1041
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1042
    ^ Icon constantNamed:'ImageEditor class flipHorizontalIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1043
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1044
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1045
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1046
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1047
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1048
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1049
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1050
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1051
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1052
                colorMapFromArray:#[ 0 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1053
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1054
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1055
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1056
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1057
                                        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
  1058
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1059
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1060
        ]
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1061
!
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1062
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1063
flipVerticalIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1064
    <resource: #image>
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1065
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1066
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1067
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1068
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1069
    "
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1070
     self flipVerticalIcon inspect
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1071
     ImageEditor openOnClass:self andSelector:#flipVerticalIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1072
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1073
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1074
    ^ Icon constantNamed:'ImageEditor class flipVerticalIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1075
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1076
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1077
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1078
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1079
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1080
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1081
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1082
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1083
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1084
                colorMapFromArray:#[ 0 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1085
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1086
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1087
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1088
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1089
                                        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
  1090
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1091
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1092
        ]
2837
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1093
!
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  1094
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1095
leftMouseKeyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1096
    <resource: #image>
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1097
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1098
     by the ImageEditor of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1099
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1100
     the ImageEditor may not be able to read the specification."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1101
    "
1405
0b2e421db465 images compactified
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
  1102
     self leftMouseKeyIcon inspect
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1103
     ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1104
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1105
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1106
    ^ Icon constantNamed:'ImageEditor class leftMouseKeyIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1107
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1108
            (Depth2Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1109
                width:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1110
                height:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1111
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1112
                bitsPerSample:(#( 2 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1113
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1114
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1115
                            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
  1116
                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
  1117
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1118
                            width:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1119
                            height:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1120
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1121
                                        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
  1122
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1123
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1124
        ]
1433
df38b2a5d335 checkin from browser
martin
parents: 1424
diff changeset
  1125
!
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1126
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1127
maskOutsideCircleIcon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1128
    "This resource specification was automatically generated
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1129
     by the ImageEditor of ST/X."
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1130
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1131
    "Do not manually edit this!! If it is corrupted,
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1132
     the ImageEditor may not be able to read the specification."
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
     self maskOutsideCircleIcon inspect
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1136
     ImageEditor openOnClass:self andSelector:#maskOutsideCircleIcon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1137
     Icon flushCachedIcons
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1138
    "
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1139
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1140
    <resource: #image>
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1141
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1142
    ^Icon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1143
        constantNamed:'ImageEditor class maskOutsideCircleIcon'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1144
        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
  1145
            colorMapFromArray:#[0 0 0 255 127 127]
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1146
            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
  1147
!
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1148
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1149
maskOutsideRectangleIcon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1150
    "This resource specification was automatically generated
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1151
     by the ImageEditor of ST/X."
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1152
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1153
    "Do not manually edit this!! If it is corrupted,
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1154
     the ImageEditor may not be able to read the specification."
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
     self maskOutsideRectangleIcon inspect
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1158
     ImageEditor openOnClass:self andSelector:#maskOutsideRectangleIcon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1159
     Icon flushCachedIcons
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1160
    "
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1161
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1162
    <resource: #image>
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1163
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1164
    ^Icon
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1165
        constantNamed:'ImageEditor class maskOutsideRectangleIcon'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1166
        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
  1167
            colorMapFromArray:#[0 0 0 255 127 127]
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1168
            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
  1169
!
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  1170
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1171
pasteIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1172
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1173
     by the ImageEditor of ST/X."
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1174
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1175
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1176
     the ImageEditor may not be able to read the specification."
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1177
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1178
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1179
     self pasteIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1180
     ImageEditor openOnClass:self andSelector:#pasteIcon
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1181
     Icon flushCachedIcons
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1182
    "
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1183
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1184
    <resource: #image>
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1185
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1186
    ^Icon
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1187
        constantNamed:'ImageEditor class pasteIcon'
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1188
        ifAbsentPut:[(Depth8Image width:14 height:14) bits:(ByteArray fromPackedString:'
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1189
:N#(:N#(:N#(:N#(:N#(:N#(:O#8:N#(:N#(:N#5>^#8:N#8:OW9:N#(:O''(=/[6=/[6:OW(:N#(=^#(:N#(:N#(>^#(:N#9=_''5>_W9=_''5:N#(:@DA@PDA
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1190
@PDA=_''(@@C(@_[6= @@@@@@@@@@@N A=/[6@@XFA XFA @@:@G6=/X@A X@@@XF@@C(@_[6= @F@@@@@@X@@N A=/[6@@XF@@@FA @@@@DA@PD@A XFA XF
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1191
@@@@@@@@@@@@@@@@@@@@@@@a')
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1192
            colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255 0 0 51 0 0 102 0 0 153 0 0 204 0 0 255 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 0 0 255 51 0 255 102 0 255 153 0 255 204 0 255 255 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 0 255 0 51 255 0 102 255 0 153 255 0 204 255 0 255 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 9 9 9 19 19 19 29 29 29 39 39 39 49 49 49 58 58 58 68 68 68 78 78 78 88 88 88 98 98 98 107 107 107 117 117 117 127 127 127 137 137 137 147 147 147 156 156 156 166 166 166 176 176 176 186 186 186 196 196 196 205 205 205 215 215 215 225 225 225 235 235 235 245 245 245 191 191 191 233 231 227 127 127 127 255 255 127 191 191 127]
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1193
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a'); yourself); yourself]
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1194
!
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1195
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1196
pasteMaskedIcon
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1197
    "This resource specification was automatically generated
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1198
     by the ImageEditor of ST/X."
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1199
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1200
    "Do not manually edit this!! If it is corrupted,
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1201
     the ImageEditor may not be able to read the specification."
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1202
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1203
    "
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1204
     self pasteMaskedIcon inspect
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1205
     ImageEditor openOnClass:self andSelector:#pasteMaskedIcon
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1206
     Icon flushCachedIcons
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1207
    "
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1208
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1209
    <resource: #image>
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1210
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1211
    ^Icon
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1212
        constantNamed:'ImageEditor class pasteMaskedIcon'
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1213
        ifAbsentPut:[(Depth8Image width:14 height:14) bits:(ByteArray fromPackedString:'
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1214
:N#(:N#(:N#(:N#(:N#(:N#(:O#8:N#(:N#(:N#5>^#8:N#8:OW9:N#(:O''(=/[6=/[6:OW(:N#(=^#(:N#(:N#(>^#(:N#9=_''5>_W9=_''5:N#(:@DA@PDA
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1215
@PDA=_''(@@C(@_[6=/[6= D@@@@@@N A=/[6= XFA XFA @@:@G6=/[6A X@@@XF@@C(@_[6=/XF= @@@@X@@N A=/[6= XF@@@FA @@@@DA@PDA@PDAA XF
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1216
@@@@@@@@@@@@@@@@@@@@@@@a')
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1217
            colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255 0 0 51 0 0 102 0 0 153 0 0 204 0 0 255 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 0 0 255 51 0 255 102 0 255 153 0 255 204 0 255 255 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 0 255 0 51 255 0 102 255 0 153 255 0 204 255 0 255 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 9 9 9 19 19 19 29 29 29 39 39 39 49 49 49 58 58 58 68 68 68 78 78 78 88 88 88 98 98 98 107 107 107 117 117 117 127 127 127 137 137 137 147 147 147 156 156 156 166 166 166 176 176 176 186 186 186 196 196 196 205 205 205 215 215 215 225 225 225 235 235 235 245 245 245 191 191 191 233 231 227 127 127 127 255 255 127 191 191 127]
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1218
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a'); yourself); yourself]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1219
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1220
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1221
pasteUnderIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1222
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1223
     by the ImageEditor of ST/X."
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1224
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1225
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1226
     the ImageEditor may not be able to read the specification."
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1227
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1228
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1229
     self pasteUnderIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1230
     ImageEditor openOnClass:self andSelector:#pasteUnderIcon
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1231
     Icon flushCachedIcons
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1232
    "
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1233
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1234
    <resource: #image>
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1235
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1236
    ^Icon
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1237
        constantNamed:'ImageEditor class pasteUnderIcon'
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1238
        ifAbsentPut:[(Depth8Image width:14 height:14) bits:(ByteArray fromPackedString:'
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1239
:N#(:N#(:N#(:N#(:N#(:N#(:O#8:N#(:N#(:N#5>^#8:N#8:OW9:N#(:O''(=/[6=/[6:OW(:N#(=^#(:N#(:N#(>^#(:N#9=_''5>_W9=_''5:N#(:@DA@PDA
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1240
@PDA=_''(@@C(@_K2</K2< D@@@@@@N A</K2</K2@PXFA @@:@G2</K2</H@@@XF@@C(@_K2</K2@@@@@@X@@N A</K2</K2@@@FA @@@@DA@PDA@PDAA XF
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1241
@@@@@@@@@@@@@@@@@@@@@@@a')
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1242
            colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255 0 0 51 0 0 102 0 0 153 0 0 204 0 0 255 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 0 0 255 51 0 255 102 0 255 153 0 255 204 0 255 255 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 0 255 0 51 255 0 102 255 0 153 255 0 204 255 0 255 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 9 9 9 19 19 19 29 29 29 39 39 39 49 49 49 58 58 58 68 68 68 78 78 78 88 88 88 98 98 98 107 107 107 117 117 117 127 127 127 137 137 137 147 147 147 156 156 156 166 166 166 176 176 176 186 186 186 196 196 196 205 205 205 215 215 215 225 225 225 235 235 235 245 245 245 191 191 191 233 231 227 127 127 127 255 255 127 191 191 127]
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1243
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a'); yourself); yourself]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1244
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1245
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1246
pasteWithMaskIcon
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1247
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1248
     by the ImageEditor of ST/X."
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1249
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1250
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1251
     the ImageEditor may not be able to read the specification."
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1252
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1253
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1254
     self pasteWithMaskIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1255
     ImageEditor openOnClass:self andSelector:#pasteWithMaskIcon
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1256
     Icon flushCachedIcons
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1257
    "
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1258
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1259
    <resource: #image>
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1260
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1261
    ^Icon
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1262
        constantNamed:'ImageEditor class pasteWithMaskIcon'
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1263
        ifAbsentPut:[(Depth8Image width:14 height:14) bits:(ByteArray fromPackedString:'
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1264
:N#(:N#(:N#(:N#(:N#(:N#(:O#8:N#(:N#(:N#5>^#8:N#8:OW9:N#(:O''(=/[6=/[6:OW(:N#(=^#(:N#(:N#(>^#(:N#9=_''5>_W9=_''5:N#(:@DA@PDA
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1265
@PDA=_''(@@C(@_C0<OC0<O@@@@@@@N A<OC0<@XFA XFA @@:@G0<OC0A [0@@XF@@C(@_C0<O@F<O@@@@X@@N A<OC0<@XF<@@FA @@@@DA@PD@A XFA XF
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1266
@@@@@@@@@@@@@@@@@@@@@@@a')
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1267
            colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255 0 0 51 0 0 102 0 0 153 0 0 204 0 0 255 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 0 0 255 51 0 255 102 0 255 153 0 255 204 0 255 255 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 0 255 0 51 255 0 102 255 0 153 255 0 204 255 0 255 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 9 9 9 19 19 19 29 29 29 39 39 39 49 49 49 58 58 58 68 68 68 78 78 78 88 88 88 98 98 98 107 107 107 117 117 117 127 127 127 137 137 137 147 147 147 156 156 156 166 166 166 176 176 176 186 186 186 196 196 196 205 205 205 215 215 215 225 225 225 235 235 235 245 245 245 191 191 191 233 231 227 127 127 127 255 255 127 191 191 127]
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  1268
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a'); yourself); yourself]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1269
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1270
3765
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1271
pointBlendIcon
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1272
    "This resource specification was automatically generated
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1273
     by the ImageEditor of ST/X."
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1274
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1275
    "Do not manually edit this!! If it is corrupted,
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1276
     the ImageEditor may not be able to read the specification."
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1277
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1278
    "
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1279
     self pointBlendIcon inspect
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1280
     ImageEditor openOnClass:self andSelector:#pointBlendIcon
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1281
     Icon flushCachedIcons
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1282
    "
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1283
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1284
    <resource: #image>
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1285
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1286
    ^Icon
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1287
        constantNamed:'ImageEditor class pointBlendIcon'
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1288
        ifAbsentPut:[(Depth1Image width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a')
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1289
            colorMapFromArray:#[0 0 0 255 255 255]
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1290
            mask:((ImageMask width:14 height:14) bits:(ByteArray fromPackedString:'@@@@@@@0@G@@8@G@@8@G@@8PGA@X_@@P@A@@@@@a'); yourself); yourself]
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1291
!
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  1292
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1293
pointIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1294
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1295
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1296
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1297
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1298
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1299
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1300
     self pointIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1301
     ImageEditor openOnClass:self andSelector:#pointIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1302
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1303
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1304
    ^ Icon constantNamed:'ImageEditor class pointIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1305
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1306
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1307
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1308
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1309
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1310
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1311
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1312
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1313
                            fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1314
                colorMapFromArray:#[ 0 0 0 255 255 255 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1315
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1316
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1317
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1318
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1319
                                        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
  1320
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1321
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1322
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1323
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1324
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1325
rectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1326
    <resource: #image>
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1327
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1328
     by the ImageEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1329
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1330
     the ImageEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1331
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1332
     self rectIcon inspect
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1333
     ImageEditor openOnClass:self andSelector:#rectIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1334
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1335
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1336
    ^ Icon constantNamed:'ImageEditor class rectIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1337
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1338
            (Depth1Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1339
                width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1340
                height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1341
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1342
                bitsPerSample:(#( 1 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1343
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1344
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1345
                            fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a');
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1346
                colorMapFromArray:#[ 0 0 0 255 0 0 ];
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1347
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1348
                            width:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1349
                            height:14;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1350
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1351
                                        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
  1352
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1353
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1354
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1355
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1356
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1357
rightMouseKeyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1358
    <resource: #image>
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1359
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1360
     by the ImageEditor of ST/X."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1361
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1362
     the ImageEditor may not be able to read the specification."
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1363
    "
1405
0b2e421db465 images compactified
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
  1364
     self rightMouseKeyIcon inspect
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1365
     ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon
3121
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1366
     Icon flushCachedIcons"
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1367
    
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1368
    ^ Icon constantNamed:'ImageEditor class rightMouseKeyIcon'
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1369
        ifAbsentPut:[
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1370
            (Depth2Image new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1371
                width:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1372
                height:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1373
                photometric:(#palette);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1374
                bitsPerSample:(#( 2 ));
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1375
                samplesPerPixel:(1);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1376
                bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1377
                            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
  1378
                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
  1379
                mask:((ImageMask new)
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1380
                            width:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1381
                            height:16;
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1382
                            bits:(ByteArray 
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1383
                                        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
  1384
                            yourself);
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1385
                yourself
b88abf599041 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 3103
diff changeset
  1386
        ]
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1387
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1388
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1389
slightlyBrighterIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1390
    "This resource specification was automatically generated
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1391
     by the ImageEditor of ST/X."
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
    "Do not manually edit this!! If it is corrupted,
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1394
     the ImageEditor may not be able to read the specification."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1395
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1396
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1397
     self slightlyBrighterIcon inspect
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1398
     ImageEditor openOnClass:self andSelector:#slightlyBrighterIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1399
     Icon flushCachedIcons
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
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1402
    <resource: #image>
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1403
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1404
    ^Icon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1405
        constantNamed:'ImageEditor class slightlyBrighterIcon'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1406
        ifAbsentPut:[(Depth8Image width:14 height:14) bits:(ByteArray fromPackedString:'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1407
@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
  1408
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
  1409
;><A@PDA@PDA@PDA@PDA@P@a')
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1410
            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
  1411
            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
  1412
!
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1413
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1414
slightlyDarkerIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1415
    "This resource specification was automatically generated
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1416
     by the ImageEditor of ST/X."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1417
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1418
    "Do not manually edit this!! If it is corrupted,
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1419
     the ImageEditor may not be able to read the specification."
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1420
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1421
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1422
     self slightlyDarkerIcon inspect
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1423
     ImageEditor openOnClass:self andSelector:#slightlyDarkerIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1424
     Icon flushCachedIcons
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1425
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1426
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1427
    <resource: #image>
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1428
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1429
    ^Icon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1430
        constantNamed:'ImageEditor class slightlyDarkerIcon'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1431
        ifAbsentPut:[(Depth8Image width:14 height:14) bits:(ByteArray fromPackedString:'
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1432
@PDA@PDA@PDA@PDA@PG/;>?/;>?/@@@@@@@@@N?/;>?/;><@@@@@@@@@;>?/;>?/;0@@@@@@@@C/;>?/;>?/@@@@@@@@@N?/;>?/;><@@@@@@@@@;>?/A XF
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1433
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
  1434
@@@A@PDA@PDA@PDA@PDA@P@a')
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1435
            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
  1436
            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
  1437
!
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1438
3191
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1439
smoothIcon
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1440
    "This resource specification was automatically generated
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1441
     by the ImageEditor of ST/X."
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1442
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1443
    "Do not manually edit this!! If it is corrupted,
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1444
     the ImageEditor may not be able to read the specification."
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1445
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1446
    "
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1447
     self smoothIcon inspect
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1448
     ImageEditor openOnClass:self andSelector:#smoothIcon
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1449
     Icon flushCachedIcons
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1450
    "
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1451
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1452
    <resource: #image>
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1453
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1454
    ^Icon
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1455
        constantNamed:'ImageEditor smoothIcon'
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1456
        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
  1457
@@@@@@@@@@@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
  1458
!
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1459
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1460
specialCircleIcon
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1461
    "This resource specification was automatically generated
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1462
     by the ImageEditor of ST/X."
3442
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1463
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1464
    "Do not manually edit this!! If it is corrupted,
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1465
     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
  1466
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1467
    "
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1468
     self specialCircleIcon inspect
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1469
     ImageEditor openOnClass:self andSelector:#specialCircleIcon
3442
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1470
     Icon flushCachedIcons
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1471
    "
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1472
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1473
    <resource: #image>
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1474
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1475
    ^Icon
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1476
        constantNamed:'ImageEditor class specialCircleIcon'
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1477
        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
  1478
            colorMapFromArray:#[0 0 0 255 0 0 127 127 127]
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1479
            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
  1480
!
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  1481
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1482
specialRectangleIcon
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1483
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1484
     by the ImageEditor of ST/X."
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1485
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1486
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1487
     the ImageEditor may not be able to read the specification."
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1488
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  1489
    "
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1490
     self specialRectangleIcon inspect
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1491
     ImageEditor openOnClass:self andSelector:#specialRectangleIcon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1492
     Icon flushCachedIcons
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1493
    "
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1494
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1495
    <resource: #image>
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1496
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1497
    ^Icon
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  1498
        constantNamed:'ImageEditor class specialRectangleIcon'
3442
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1499
        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
  1500
            colorMapFromArray:#[0 0 0 255 0 0 127 127 127]
01fc9215d9c2 #UI_ENHANCEMENT by expecco
Claus Gittinger <cg@exept.de>
parents: 3441
diff changeset
  1501
            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
  1502
!
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1503
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1504
sprayIcon
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1505
    "This resource specification was automatically generated
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1506
     by the ImageEditor of ST/X."
3191
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1507
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1508
    "Do not manually edit this!! If it is corrupted,
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1509
     the ImageEditor may not be able to read the specification."
3191
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1510
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1511
    "
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1512
     self sprayIcon inspect
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  1513
     ImageEditor openOnClass:self andSelector:#sprayIcon
3191
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1514
     Icon flushCachedIcons
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1515
    "
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1516
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1517
    <resource: #image>
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1518
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1519
    ^Icon
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1520
        constantNamed:'ImageEditor sprayIcon'
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  1521
        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
  1522
@@@@@@@@@@@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
  1523
! !
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  1524
400
228524287573 intitial checkin
tz
parents:
diff changeset
  1525
!ImageEditor class methodsFor:'interface specs'!
228524287573 intitial checkin
tz
parents:
diff changeset
  1526
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1527
changeHLSDialogSpec
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1528
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1529
     by the UIPainter of ST/X."
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1530
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1531
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1532
     the UIPainter may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1533
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1534
    "
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1535
     UIPainter new openOnClass:ImageEditor andSelector:#changeHLSDialogSpec
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1536
     ImageEditor new openInterface:#changeHLSDialogSpec
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1537
    "
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1538
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1539
    <resource: #canvas>
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1540
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1541
    ^ 
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1542
    #(FullSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1543
       name: changeHLSDialogSpec
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1544
       uuid: 'b5dfeb64-6197-11e8-a86d-b8f6b1108e05'
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1545
       window: 
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1546
      (WindowSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1547
         label: 'HLS Edit Dialog'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1548
         name: 'HLS Edit Dialog'
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1549
         uuid: '3787f3b8-6194-11e8-a86d-b8f6b1108e05'
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1550
         min: (Point 10 10)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1551
         bounds: (Rectangle 0 0 378 312)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1552
       )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1553
       component: 
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1554
      (SpecCollection
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1555
         collection: (
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1556
          (LabelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1557
             label: 'Hue-Shift:'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1558
             name: 'HueLabel'
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1559
             layout: (LayoutFrame 4 0 21 0 171 0 43 0)
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1560
             activeHelpKey: hueShift
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1561
             uuid: '3787f638-6194-11e8-a86d-b8f6b1108e05'
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1562
             translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1563
             adjust: right
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1564
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1565
          (InputFieldSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1566
             name: 'HueShiftEntryField'
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1567
             layout: (LayoutFrame 172 0 21 0 243 0 43 0)
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1568
             activeHelpKey: hueShift
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1569
             uuid: '3787f84a-6194-11e8-a86d-b8f6b1108e05'
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1570
             tabable: true
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1571
             model: hueShiftHolder
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1572
             type: numberInRange
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1573
             minValue: 0
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1574
             maxValue: 360
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1575
             acceptChannel: acceptChannel
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1576
             acceptOnPointerLeave: true
3468
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
          (ThumbWheelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1579
             name: 'HueWheel'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1580
             layout: (LayoutFrame 246 0 22 0 363 0 42 0)
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1581
             activeHelpKey: hueShift
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1582
             uuid: '3787fafc-6194-11e8-a86d-b8f6b1108e05'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1583
             model: hueShiftHolder
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1584
             orientation: horizontal
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1585
             step: 1
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1586
             endlessRotation: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1587
           )
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1588
          (ActionButtonSpec
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1589
             name: 'resetHueShift'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1590
             layout: (LayoutFrame -10 1 27 0 0 1 37 0)
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1591
             activeHelpKey: resetHueShift
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1592
             uuid: 'e8c1e754-6196-11e8-a86d-b8f6b1108e05'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1593
             translateLabel: true
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1594
             model: resetHueShift
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1595
           )
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1596
          (LabelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1597
             label: 'Light Factor:'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1598
             name: 'LightLabel'
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1599
             layout: (LayoutFrame 4 0 50 0 171 0 72 0)
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1600
             activeHelpKey: lightFactor
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1601
             uuid: '3787fda4-6194-11e8-a86d-b8f6b1108e05'
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1602
             translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1603
             adjust: right
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1604
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1605
          (InputFieldSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1606
             name: 'LightEntryField'
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1607
             layout: (LayoutFrame 172 0 50 0 243 0 72 0)
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1608
             activeHelpKey: lightFactor
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1609
             uuid: '3787feee-6194-11e8-a86d-b8f6b1108e05'
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1610
             tabable: true
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1611
             model: lightFactorHolder
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1612
             type: numberInRange
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1613
             minValue: 0.0
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1614
             maxValue: 10.0
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1615
             acceptChannel: acceptChannel
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1616
             acceptOnPointerLeave: true
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1617
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1618
          (ThumbWheelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1619
             name: 'LightWheel'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1620
             layout: (LayoutFrame 246 0 51 0 363 0 71 0)
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1621
             activeHelpKey: lightFactor
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1622
             uuid: '378800d8-6194-11e8-a86d-b8f6b1108e05'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1623
             model: lightFactorHolder
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1624
             orientation: horizontal
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1625
             start: 0.0
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1626
             stop: 10.0
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1627
             step: 0.001
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1628
           )
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1629
          (ActionButtonSpec
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1630
             name: 'Button3'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1631
             layout: (LayoutFrame -10 1 56 0 0 1 66 0)
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1632
             activeHelpKey: resetLightFactor
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1633
             uuid: 'e8c1eb50-6196-11e8-a86d-b8f6b1108e05'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1634
             translateLabel: true
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1635
             model: resetLightFactor
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1636
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1637
          (LabelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1638
             label: 'Saturation Factor:'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1639
             name: 'SaturationLabel'
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1640
             layout: (LayoutFrame 4 0 79 0 171 0 101 0)
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1641
             activeHelpKey: saturationFactor
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1642
             uuid: '3788022c-6194-11e8-a86d-b8f6b1108e05'
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1643
             translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1644
             adjust: right
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1645
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1646
          (InputFieldSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1647
             name: 'SaturationEntryField'
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1648
             layout: (LayoutFrame 172 0 79 0 243 0 101 0)
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1649
             activeHelpKey: saturationFactor
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1650
             uuid: '37880358-6194-11e8-a86d-b8f6b1108e05'
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1651
             tabable: true
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1652
             model: saturationFactorHolder
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1653
             type: numberInRange
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1654
             minValue: 0.0
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1655
             maxValue: 10.0
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1656
             acceptChannel: acceptChannel
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1657
             acceptOnPointerLeave: true
3468
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
          (ThumbWheelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1660
             name: 'SaturationWheel'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1661
             layout: (LayoutFrame 246 0 80 0 363 0 100 0)
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1662
             activeHelpKey: saturationFactor
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1663
             uuid: '3788051a-6194-11e8-a86d-b8f6b1108e05'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1664
             model: saturationFactorHolder
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1665
             orientation: horizontal
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1666
             start: 0.0
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1667
             stop: 10.0
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1668
             step: 0.001
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1669
           )
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1670
          (ActionButtonSpec
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1671
             name: 'Button4'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1672
             layout: (LayoutFrame -10 1 85 0 0 1 95 0)
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1673
             activeHelpKey: resetSaturationFactor
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1674
             uuid: 'e8c1efce-6196-11e8-a86d-b8f6b1108e05'
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1675
             translateLabel: true
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1676
             model: resetSaturationFactor
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1677
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1678
          (LabelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1679
             label: 'Color Shift'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1680
             name: 'Label2'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1681
             layout: (LayoutFrame 5 0 127 0 -15 0.5 149 0)
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1682
             uuid: '37880650-6194-11e8-a86d-b8f6b1108e05'
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1683
             translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1684
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1685
          (LabelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1686
             name: 'HueColorLabel'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1687
             layout: (LayoutFrame 18 0.0 150 0 -41 0.5 234 0)
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1688
             uuid: '37880768-6194-11e8-a86d-b8f6b1108e05'
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1689
             level: -1
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1690
             backgroundChannel: hlsColor
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1691
             translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1692
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1693
          (LabelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1694
             label: 'Preview'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1695
             name: 'Label3'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1696
             layout: (LayoutFrame 5 0.5 127 0 -5 1 149 0)
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1697
             uuid: '37880894-6194-11e8-a86d-b8f6b1108e05'
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1698
             translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1699
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1700
          (LabelSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1701
             name: 'PreviewLabel'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1702
             layout: (LayoutFrame 36 0.5 150 0 -23 1.0 234 0)
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1703
             uuid: '378809ac-6194-11e8-a86d-b8f6b1108e05'
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1704
             level: -1
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1705
             translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1706
             labelChannel: previewImageHolder
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1707
           )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1708
          (HorizontalPanelViewSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1709
             name: 'HorizontalPanel1'
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1710
             layout: (LayoutFrame 0 0.0 -30 1 -16 1.0 0 1)
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1711
             uuid: '37880ace-6194-11e8-a86d-b8f6b1108e05'
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1712
             horizontalLayout: fitSpace
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1713
             verticalLayout: center
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1714
             horizontalSpace: 3
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1715
             verticalSpace: 3
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1716
             reverseOrderIfOKAtLeft: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1717
             component: 
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1718
            (SpecCollection
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1719
               collection: (
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1720
                (ActionButtonSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1721
                   label: 'Cancel'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1722
                   name: 'Button1'
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1723
                   uuid: '37880cd6-6194-11e8-a86d-b8f6b1108e05'
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1724
                   translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1725
                   tabable: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1726
                   model: cancel
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1727
                   extent: (Point 175 28)
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1728
                 )
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1729
                (ActionButtonSpec
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1730
                   label: 'OK'
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1731
                   name: 'Button2'
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1732
                   uuid: '37880ee8-6194-11e8-a86d-b8f6b1108e05'
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1733
                   translateLabel: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1734
                   tabable: true
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1735
                   model: accept
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1736
                   extent: (Point 175 28)
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1737
                 )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1738
                )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1739
              
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1740
             )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1741
             keepSpaceForOSXResizeHandleH: true
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1742
           )
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1743
          )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1744
        
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1745
       )
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  1746
     )
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1747
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  1748
    "Modified: / 27-05-2018 / 12:27:58 / Claus Gittinger"
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1749
!
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1750
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1751
cropSpec
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1752
    "This resource specification was automatically generated
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1753
     by the UIPainter of ST/X."
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1754
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1755
    "Do not manually edit this!! If it is corrupted,
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1756
     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
  1757
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1758
    "
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1759
     UIPainter new openOnClass:ImageEditor andSelector:#cropSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1760
     ImageEditor new openInterface:#cropSpec
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1761
    "
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1762
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1763
    <resource: #canvas>
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1764
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  1765
    ^ 
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1766
    #(FullSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1767
       name: cropSpec
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1768
       window: 
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1769
      (WindowSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1770
         label: 'Crop Border(s)'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1771
         name: 'Crop Border(s)'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1772
         min: (Point 10 10)
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1773
         bounds: (Rectangle 0 0 364 312)
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1774
       )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1775
       component: 
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1776
      (SpecCollection
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1777
         collection: (
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1778
          (LabelSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1779
             label: 'Left:'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1780
             name: 'CropLeftLabel'
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1781
             layout: (LayoutFrame 14 0 24 0 90 0 46 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1782
             activeHelpKey: cropLeft
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1783
             translateLabel: true
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1784
             adjust: left
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1785
           )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1786
          (InputFieldSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1787
             name: 'CropLeftEntryField'
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1788
             layout: (LayoutFrame 95 0 24 0 125 0 46 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1789
             activeHelpKey: cropLeft
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1790
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1791
             model: cropLeftAmount
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1792
             type: number
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1793
             acceptChannel: acceptChannel
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1794
             acceptOnPointerLeave: false
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1795
           )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1796
          (ActionButtonSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1797
             label: 'Crop Now'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1798
             name: 'CropLeftNowButton'
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1799
             layout: (LayoutFrame 133 0 21 0 229 0 50 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1800
             activeHelpKey: cropLeft
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1801
             translateLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1802
             resizeForLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1803
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1804
             model: cropLeftNow
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1805
             autoRepeat: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1806
             usePreferredWidth: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1807
           )
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1808
          (ActionButtonSpec
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1809
             label: 'Auto'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1810
             name: 'Button6'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1811
             layout: (LayoutFrame 236 0 21 0 289 0 50 0)
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1812
             activeHelpKey: autoCropLeft
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1813
             translateLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1814
             resizeForLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1815
             tabable: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1816
             model: autoCropLeft
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1817
             autoRepeat: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1818
             usePreferredWidth: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1819
           )
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1820
          (LabelSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1821
             label: 'Right:'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1822
             name: 'CropRightLabel'
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1823
             layout: (LayoutFrame 14 0 55 0 90 0 77 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1824
             activeHelpKey: cropRight
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1825
             translateLabel: true
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1826
             adjust: left
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1827
           )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1828
          (InputFieldSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1829
             name: 'CropRightEntryField'
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1830
             layout: (LayoutFrame 95 0 55 0 125 0 77 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1831
             activeHelpKey: cropRight
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1832
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1833
             model: cropRightAmount
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1834
             type: number
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1835
             acceptChannel: acceptChannel
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1836
             acceptOnPointerLeave: false
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1837
           )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1838
          (ActionButtonSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1839
             label: 'Crop Now'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1840
             name: 'CropRightButton'
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1841
             layout: (LayoutFrame 133 0 51 0 229 0 80 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1842
             activeHelpKey: cropRight
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1843
             translateLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1844
             resizeForLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1845
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1846
             model: cropRightNow
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1847
             autoRepeat: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1848
             usePreferredWidth: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1849
           )
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1850
          (ActionButtonSpec
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1851
             label: 'Auto'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1852
             name: 'Button7'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1853
             layout: (LayoutFrame 236 0 51 0 289 0 80 0)
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1854
             activeHelpKey: autoCropRight
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1855
             translateLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1856
             resizeForLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1857
             tabable: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1858
             model: autoCropRight
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1859
             autoRepeat: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1860
             usePreferredWidth: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1861
           )
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1862
          (LabelSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1863
             label: 'Top:'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1864
             name: 'CropTopLabel'
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1865
             layout: (LayoutFrame 14 0 85 0 90 0 107 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1866
             activeHelpKey: cropTop
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1867
             translateLabel: true
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1868
             adjust: left
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1869
           )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1870
          (InputFieldSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1871
             name: 'CropTopEntryField'
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1872
             layout: (LayoutFrame 95 0 85 0 125 0 107 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1873
             activeHelpKey: cropTop
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1874
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1875
             model: cropTopAmount
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1876
             type: number
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1877
             acceptChannel: acceptChannel
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1878
             acceptOnPointerLeave: false
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1879
           )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1880
          (ActionButtonSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1881
             label: 'Crop Now'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1882
             name: 'CropTopButton'
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1883
             layout: (LayoutFrame 133 0 81 0 229 0 110 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1884
             activeHelpKey: cropTop
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1885
             translateLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1886
             resizeForLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1887
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1888
             model: cropTopNow
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1889
             autoRepeat: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1890
             usePreferredWidth: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1891
           )
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1892
          (ActionButtonSpec
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1893
             label: 'Auto'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1894
             name: 'Button8'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1895
             layout: (LayoutFrame 236 0 81 0 289 0 110 0)
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1896
             activeHelpKey: autoCropTop
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1897
             translateLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1898
             resizeForLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1899
             tabable: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1900
             model: autoCropTop
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1901
             autoRepeat: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1902
             usePreferredWidth: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1903
           )
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1904
          (LabelSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1905
             label: 'Bottom:'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1906
             name: 'CropBottomLabel'
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1907
             layout: (LayoutFrame 14 0 115 0 90 0 137 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1908
             activeHelpKey: cropBottom
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1909
             translateLabel: true
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1910
             adjust: left
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
          (InputFieldSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1913
             name: 'CropBottomEntryField'
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  1914
             layout: (LayoutFrame 95 0 115 0 125 0 137 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1915
             activeHelpKey: cropBottom
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1916
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1917
             model: cropBottomAmount
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1918
             type: number
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1919
             acceptChannel: acceptChannel
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1920
             acceptOnPointerLeave: false
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1921
           )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1922
          (ActionButtonSpec
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1923
             label: 'Crop Now'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1924
             name: 'CropBottomButton'
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1925
             layout: (LayoutFrame 133 0 111 0 229 0 140 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1926
             activeHelpKey: cropBottom
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1927
             translateLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1928
             resizeForLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1929
             tabable: true
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1930
             model: cropBottomNow
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1931
             autoRepeat: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1932
             usePreferredWidth: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1933
           )
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1934
          (ActionButtonSpec
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1935
             label: 'Auto'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1936
             name: 'Button9'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1937
             layout: (LayoutFrame 236 0 111 0 289 0 140 0)
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1938
             activeHelpKey: autoCropBottom
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1939
             translateLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1940
             resizeForLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1941
             tabable: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1942
             model: autoCropBottom
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1943
             autoRepeat: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1944
             usePreferredWidth: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1945
           )
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1946
          (ActionButtonSpec
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1947
             label: 'All'
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1948
             name: 'Button4'
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1949
             layout: (LayoutFrame 133 0 148 0 229 0 176 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1950
             activeHelpKey: cropAll
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1951
             translateLabel: true
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1952
             resizeForLabel: true
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1953
             tabable: true
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1954
             model: applyCropAction
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1955
           )
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1956
          (HorizontalPanelViewSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1957
             name: 'HorizontalPanel1'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1958
             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
  1959
             visibilityChannel: cropBoxIsDialog
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1960
             horizontalLayout: fitSpace
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1961
             verticalLayout: center
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1962
             horizontalSpace: 3
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1963
             verticalSpace: 3
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1964
             reverseOrderIfOKAtLeft: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1965
             component: 
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1966
            (SpecCollection
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1967
               collection: (
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1968
                (ActionButtonSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1969
                   label: 'Cancel'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1970
                   name: 'Button1'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1971
                   translateLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1972
                   resizeForLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1973
                   tabable: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1974
                   model: cancel
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1975
                   extent: (Point 116 28)
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  1976
                 )
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1977
                (ActionButtonSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1978
                   label: 'Apply'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1979
                   name: 'Button3'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1980
                   translateLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1981
                   resizeForLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1982
                   tabable: true
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1983
                   model: applyCropAction
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1984
                   extent: (Point 116 28)
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1985
                 )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1986
                (ActionButtonSpec
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1987
                   label: 'OK'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1988
                   name: 'Button2'
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1989
                   translateLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1990
                   resizeForLabel: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1991
                   tabable: true
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1992
                   model: accept
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  1993
                   extent: (Point 116 28)
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1994
                 )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1995
                )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1996
              
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  1997
             )
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  1998
           )
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  1999
          (ActionButtonSpec
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  2000
             label: 'All'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  2001
             name: 'Button10'
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  2002
             layout: (LayoutFrame 236 0 148 0 289 0 176 0)
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  2003
             activeHelpKey: autoCropAll
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  2004
             translateLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  2005
             resizeForLabel: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  2006
             tabable: true
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  2007
             model: autoCropAll
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  2008
           )
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  2009
          )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  2010
        
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  2011
       )
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  2012
     )
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  2013
!
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  2014
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2015
dialogSpecForNewImage
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2016
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2017
     by the UIPainter of ST/X."
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2018
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2019
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2020
     the UIPainter may not be able to read the specification."
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2021
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2022
    "
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2023
     UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2024
     ImageEditor new openInterface:#dialogSpecForNewImage
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2025
    "
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2026
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2027
    <resource: #canvas>
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2028
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  2029
    ^ 
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2030
    #(FullSpec
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2031
       name: dialogSpecForNewImage
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2032
       window: 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2033
      (WindowSpec
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2034
         label: 'New Image'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2035
         name: 'New Image'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2036
         min: (Point 10 10)
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2037
         bounds: (Rectangle 0 0 301 119)
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2038
       )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2039
       component: 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2040
      (SpecCollection
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2041
         collection: (
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2042
          (ViewSpec
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2043
             name: 'View'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2044
             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
  2045
             level: 1
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2046
             component: 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2047
            (SpecCollection
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2048
               collection: (
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2049
                (FramedBoxSpec
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2050
                   label: 'Size'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2051
                   name: 'framedBox1'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2052
                   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
  2053
                   style: (FontDescription helvetica medium roman 12)
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2054
                   labelPosition: topLeft
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2055
                   translateLabel: true
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2056
                   component: 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2057
                  (SpecCollection
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2058
                     collection: (
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2059
                      (ComboBoxSpec
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2060
                         name: 'defaultSizesComboBox'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2061
                         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
  2062
                         model: selectionOfSize
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2063
                         type: string
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2064
                         acceptOnPointerLeave: false
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2065
                         comboList: listOfDefaultSizes
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2066
                         isFilenameBox: false
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2067
                       )
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2068
                      )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2069
                    
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2070
                   )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2071
                 )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2072
                (FramedBoxSpec
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2073
                   label: 'Color Map'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2074
                   name: 'framedBox2'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2075
                   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
  2076
                   style: (FontDescription helvetica medium roman 12)
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2077
                   labelPosition: topLeft
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2078
                   translateLabel: true
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2079
                   component: 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2080
                  (SpecCollection
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2081
                     collection: (
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2082
                      (ComboListSpec
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2083
                         name: 'colorMapComboBox'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2084
                         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
  2085
                         model: selectionOfColorMap
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2086
                         comboList: listOfColorMaps
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2087
                         useIndex: false
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2088
                         hidePullDownMenuButton: false
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2089
                       )
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2090
                      )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2091
                    
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2092
                   )
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  2093
                 )
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2094
                )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2095
              
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2096
             )
1457
8c15098c3469 ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents: 1449
diff changeset
  2097
           )
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2098
          (UISubSpecification
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2099
             name: 'windowSpecForCommitWithoutChannels'
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2100
             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
  2101
             minorKey: windowSpecForCommitWithoutChannels
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2102
             keepSpaceForOSXResizeHandleH: true
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2103
           )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2104
          )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2105
        
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2106
       )
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  2107
     )
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  2108
!
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  2109
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2110
floodFillToleranceSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2111
    "This resource specification was automatically generated
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2112
     by the UIPainter of ST/X."
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2113
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2114
    "Do not manually edit this!! If it is corrupted,
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2115
     the UIPainter may not be able to read the specification."
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2116
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2117
    "
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2118
     UIPainter new openOnClass:ImageEditor andSelector:#floodFillToleranceSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2119
     ImageEditor new openInterface:#floodFillToleranceSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2120
    "
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2121
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2122
    <resource: #canvas>
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
    ^ 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2125
    #(FullSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2126
       name: floodFillToleranceSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2127
       window: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2128
      (WindowSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2129
         label: 'Flood Fill Tolerance'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2130
         name: 'Flood Fill Tolerance'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2131
         min: (Point 10 10)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2132
         bounds: (Rectangle 0 0 364 312)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2133
       )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2134
       component: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2135
      (SpecCollection
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2136
         collection: (
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2137
          (LabelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2138
             label: 'Flood Fill Tolerance:'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2139
             name: 'Label1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2140
             layout: (LayoutFrame 14 0 10 0 242 0 32 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2141
             activeHelpKey: floodFillMaxError
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2142
             visibilityChannel: cropBoxIsNotDialog
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2143
             translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2144
             adjust: left
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
          (LabelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2147
             label: 'Hue:'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2148
             name: 'Label2'
3440
4e18ffc36717 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3436
diff changeset
  2149
             layout: (LayoutFrame 29 0 38 0 127 0 60 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2150
             activeHelpKey: floodFillMaxError
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2151
             visibilityChannel: cropBoxIsNotDialog
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2152
             translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2153
             adjust: left
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2154
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2155
          (InputFieldSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2156
             name: 'EntryField2'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2157
             layout: (LayoutFrame 132 0 38 0 190 0 60 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2158
             activeHelpKey: floodFillMaxError
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2159
             visibilityChannel: cropBoxIsNotDialog
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2160
             tabable: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2161
             model: floodFillMaxHueError
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2162
             type: number
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2163
             acceptChannel: acceptChannel
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2164
             acceptOnPointerLeave: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2165
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2166
          (LabelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2167
             label: 'Light:'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2168
             name: 'Label3'
3440
4e18ffc36717 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3436
diff changeset
  2169
             layout: (LayoutFrame 29 0 64 0 127 0 86 0)
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2170
             activeHelpKey: floodFillMaxError
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2171
             visibilityChannel: cropBoxIsNotDialog
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2172
             translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2173
             adjust: left
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2174
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2175
          (InputFieldSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2176
             name: 'EntryField3'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2177
             layout: (LayoutFrame 132 0 64 0 190 0 86 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2178
             activeHelpKey: floodFillMaxError
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2179
             visibilityChannel: cropBoxIsNotDialog
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2180
             tabable: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2181
             model: floodFillMaxLightError
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2182
             type: number
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2183
             acceptChannel: acceptChannel
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2184
             acceptOnPointerLeave: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2185
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2186
          (HorizontalPanelViewSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2187
             name: 'HorizontalPanel1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2188
             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
  2189
             visibilityChannel: cropBoxIsDialog
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2190
             horizontalLayout: fitSpace
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2191
             verticalLayout: center
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2192
             horizontalSpace: 3
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2193
             verticalSpace: 3
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2194
             reverseOrderIfOKAtLeft: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2195
             component: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2196
            (SpecCollection
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2197
               collection: (
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2198
                (ActionButtonSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2199
                   label: 'Cancel'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2200
                   name: 'Button1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2201
                   translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2202
                   resizeForLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2203
                   tabable: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2204
                   model: cancel
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2205
                   extent: (Point 116 28)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2206
                 )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2207
                (ActionButtonSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2208
                   label: 'Apply'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2209
                   name: 'Button3'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2210
                   translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2211
                   resizeForLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2212
                   tabable: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2213
                   model: applyCropAction
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2214
                   extent: (Point 116 28)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2215
                 )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2216
                (ActionButtonSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2217
                   label: 'OK'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2218
                   name: 'Button2'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2219
                   translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2220
                   resizeForLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2221
                   tabable: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2222
                   model: accept
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2223
                   extent: (Point 116 28)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2224
                 )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2225
                )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2226
              
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2227
             )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2228
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2229
          )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2230
        
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2231
       )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2232
     )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2233
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2234
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2235
shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2236
    "This resource specification was automatically generated
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2237
     by the UIPainter of ST/X."
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2238
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2239
    "Do not manually edit this!! If it is corrupted,
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2240
     the UIPainter may not be able to read the specification."
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2241
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2242
    "
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2243
     UIPainter new openOnClass:ImageEditor andSelector:#shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2244
     ImageEditor new openInterface:#shiftDialogSpec
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2245
    "
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2246
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2247
    <resource: #canvas>
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2248
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2249
    ^ 
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2250
     #(FullSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2251
        name: shiftDialogSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2252
        window: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2253
       (WindowSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2254
          label: 'Shift'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2255
          name: 'Shift'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2256
          min: (Point 10 10)
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2257
          bounds: (Rectangle 14 46 259 229)
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2258
        )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2259
        component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2260
       (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2261
          collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2262
           (LabelSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2263
              label: 'Amount:'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2264
              name: 'AmountLabel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2265
              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
  2266
              translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2267
              adjust: right
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2268
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2269
           (InputFieldSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2270
              name: 'AmountEntryField'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2271
              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
  2272
              tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2273
              model: shiftAmount
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2274
              type: number
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2275
              acceptChannel: acceptChannel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2276
              acceptOnPointerLeave: false
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2277
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2278
           (HorizontalPanelViewSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2279
              name: 'HorizontalPanel1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2280
              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
  2281
              horizontalLayout: fitSpace
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2282
              verticalLayout: center
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2283
              horizontalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2284
              verticalSpace: 3
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2285
              reverseOrderIfOKAtLeft: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2286
              component: 
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2287
             (SpecCollection
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2288
                collection: (
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2289
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2290
                    label: 'Cancel'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2291
                    name: 'Button1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2292
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2293
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2294
                    model: cancel
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2295
                    extent: (Point 118 22)
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2296
                  )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2297
                 (ActionButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2298
                    label: 'OK'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2299
                    name: 'Button2'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2300
                    translateLabel: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2301
                    tabable: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2302
                    model: accept
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2303
                    extent: (Point 118 22)
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2304
                  )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2305
                 )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2306
               
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2307
              )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2308
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2309
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2310
              name: 'upArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2311
              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
  2312
              model: shiftUpNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2313
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2314
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2315
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2316
              direction: up
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2317
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2318
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2319
              name: 'leftArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2320
              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
  2321
              model: shiftLeftNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2322
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2323
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2324
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2325
              direction: left
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2326
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2327
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2328
              name: 'rightArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2329
              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
  2330
              model: shiftRightNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2331
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2332
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2333
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2334
              direction: right
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2335
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2336
           (ArrowButtonSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2337
              name: 'downArrowButton'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2338
              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
  2339
              model: shiftDownNow
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2340
              isTriggerOnDown: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2341
              autoRepeat: true
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2342
              actionValue: ''
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2343
              direction: down
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2344
            )
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2345
           (CheckBoxSpec
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2346
              label: 'Wrap'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2347
              name: 'CheckBox1'
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2348
              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
  2349
              model: wrap
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  2350
              translateLabel: true
1713
088ff38c03a5 shift + wrap
Claus Gittinger <cg@exept.de>
parents: 1708
diff changeset
  2351
            )
1557
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2352
           )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2353
         
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2354
        )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2355
      )
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2356
!
78409b670c85 added shift operation
Claus Gittinger <cg@exept.de>
parents: 1556
diff changeset
  2357
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2358
uncropSpec
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2359
    "This resource specification was automatically generated
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2360
     by the UIPainter of ST/X."
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2361
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2362
    "Do not manually edit this!! If it is corrupted,
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2363
     the UIPainter may not be able to read the specification."
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2364
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2365
    "
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2366
     UIPainter new openOnClass:ImageEditor andSelector:#uncropSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2367
     ImageEditor new openInterface:#uncropSpec
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2368
    "
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2369
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2370
    <resource: #canvas>
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2371
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2372
    ^ 
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2373
    #(FullSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2374
       name: uncropSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2375
       window: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2376
      (WindowSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2377
         label: 'Add Border(s)'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2378
         name: 'Add Border(s)'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2379
         min: (Point 10 10)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2380
         max: (Point 800 478)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2381
         bounds: (Rectangle 0 0 261 228)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2382
       )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2383
       component: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2384
      (SpecCollection
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2385
         collection: (
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2386
          (LabelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2387
             label: 'Left:'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2388
             name: 'Label1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2389
             layout: (LayoutFrame 14 0 21 0 90 0 43 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2390
             translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2391
             adjust: right
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2392
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2393
          (InputFieldSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2394
             name: 'EntryField1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2395
             layout: (LayoutFrame 95 0 21 0 132 0 43 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2396
             model: cropLeftAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2397
             type: number
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2398
             acceptOnPointerLeave: false
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2399
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2400
          (LabelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2401
             label: 'Right:'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2402
             name: 'Label2'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2403
             layout: (LayoutFrame 14 0 51 0 90 0 73 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2404
             translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2405
             adjust: right
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2406
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2407
          (InputFieldSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2408
             name: 'EntryField2'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2409
             layout: (LayoutFrame 95 0 51 0 132 0 73 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2410
             model: cropRightAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2411
             type: number
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2412
             acceptOnPointerLeave: false
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2413
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2414
          (LabelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2415
             label: 'Top:'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2416
             name: 'Label3'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2417
             layout: (LayoutFrame 14 0 81 0 90 0 103 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2418
             translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2419
             adjust: right
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2420
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2421
          (InputFieldSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2422
             name: 'EntryField3'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2423
             layout: (LayoutFrame 95 0 81 0 132 0 103 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2424
             model: cropTopAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2425
             type: number
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2426
             acceptOnPointerLeave: false
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2427
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2428
          (LabelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2429
             label: 'Bottom:'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2430
             name: 'Label4'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2431
             layout: (LayoutFrame 14 0 111 0 90 0 133 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2432
             translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2433
             adjust: right
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2434
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2435
          (InputFieldSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2436
             name: 'EntryField4'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2437
             layout: (LayoutFrame 95 0 111 0 132 0 133 0)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2438
             model: cropBottomAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2439
             type: number
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2440
             acceptOnPointerLeave: false
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2441
           )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2442
          (HorizontalPanelViewSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2443
             name: 'HorizontalPanel1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2444
             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
  2445
             horizontalLayout: fitSpace
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2446
             verticalLayout: center
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2447
             horizontalSpace: 3
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2448
             verticalSpace: 3
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2449
             reverseOrderIfOKAtLeft: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2450
             component: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2451
            (SpecCollection
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2452
               collection: (
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2453
                (ActionButtonSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2454
                   label: 'Cancel'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2455
                   name: 'Button1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2456
                   translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2457
                   model: cancel
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2458
                   extent: (Point 124 22)
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2459
                 )
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2460
                (ActionButtonSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2461
                   label: 'OK'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2462
                   name: 'Button2'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2463
                   translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2464
                   model: accept
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2465
                   extent: (Point 125 22)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2466
                 )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2467
                )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2468
              
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2469
             )
1796
e2c8c895443a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1793
diff changeset
  2470
           )
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2471
          )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2472
        
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2473
       )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2474
     )
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2475
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  2476
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2477
windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2478
    "This resource specification was automatically generated
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2479
     by the UIPainter of ST/X."
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2480
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2481
    "Do not manually edit this!! If it is corrupted,
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2482
     the UIPainter may not be able to read the specification."
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2483
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2484
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2485
     UIPainter new openOnClass:ImageEditor andSelector:#windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2486
     ImageEditor new openInterface:#windowSpec
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2487
     ImageEditor open
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2488
    "
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2489
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2490
    <resource: #canvas>
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  2491
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2492
    ^ 
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2493
    #(FullSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2494
       name: windowSpec
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2495
       uuid: 'ea3a8340-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2496
       window: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2497
      (WindowSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2498
         label: 'Image Editor'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2499
         name: 'Image Editor'
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2500
         uuid: 'ea3a8bec-1e4a-11b2-83b1-485b39758412'
3443
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
  2501
         min: (Point 800 400)
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
  2502
         bounds: (Rectangle 0 0 800 446)
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2503
         menu: menu
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2504
         icon: defaultIcon
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2505
       )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2506
       component: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2507
      (SpecCollection
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2508
         collection: (
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2509
          (MenuPanelSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2510
             name: 'menuToolbarView'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2511
             layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2512
             style: (FontDescription helvetica medium roman 10 #'iso10646-1' nil nil)
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2513
             uuid: 'ea3a98c6-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2514
             menu: menuToolbar
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2515
           )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2516
          (VariableHorizontalPanelSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2517
             name: 'mainPanel'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2518
             layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2519
             uuid: 'ea3a9eca-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2520
             snapMode: both
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2521
             barLevel: 0
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2522
             component: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2523
            (SpecCollection
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2524
               collection: (
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2525
                (ViewSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2526
                   name: 'leftView'
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2527
                   uuid: 'ea3aa3d4-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2528
                   level: 1
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2529
                   component: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2530
                  (SpecCollection
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2531
                     collection: (
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2532
                      (VariableVerticalPanelSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2533
                         name: 'verticalPanel'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2534
                         layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2535
                         uuid: 'ea3aa672-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2536
                         level: 0
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2537
                         snapMode: both
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2538
                         component: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2539
                        (SpecCollection
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2540
                           collection: (
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2541
                            (ViewSpec
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  2542
                               name: 'ColorAnCropBox'
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2543
                               uuid: 'ea3aa992-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2544
                               component: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2545
                              (SpecCollection
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2546
                                 collection: (
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2547
                                  (TabViewSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2548
                                     name: 'TabHeader1'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2549
                                     layout: (LayoutFrame 0 0 0 0 0 1 36 0)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2550
                                     uuid: 'ea3aab9a-1e4a-11b2-83b1-485b39758412'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2551
                                     model: colorCropTabSelectionIndexHolder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2552
                                     menu: colorCropTabLabelList
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2553
                                     useIndex: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2554
                                     translateLabel: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2555
                                   )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2556
                                  (ViewSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2557
                                     name: 'ColorBox'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2558
                                     layout: (LayoutFrame 0 0 36 0 0 1 0 1)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2559
                                     uuid: 'ea3ab0ae-1e4a-11b2-83b1-485b39758412'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2560
                                     visibilityChannel: colorBoxVisibleHolder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2561
                                     component: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2562
                                    (SpecCollection
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2563
                                       collection: (
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2564
                                        (MenuPanelSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2565
                                           name: 'MouseButtonColorToolBar'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2566
                                           layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2567
                                           uuid: 'ea3ab2d4-1e4a-11b2-83b1-485b39758412'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2568
                                           level: 0
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2569
                                           menu: menuMouseButtonColors
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2570
                                         )
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2571
                                        (LabelSpec
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2572
                                           label: 'Label'
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2573
                                           name: 'Label1'
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2574
                                           layout: (LayoutFrame -160 1 0 0 -104 1 22 0)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2575
                                           activeHelpKey: drawingAlpha
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2576
                                           uuid: 'ea3ab590-1e4a-11b2-83b1-485b39758412'
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2577
                                           visibilityChannel: alphaVisibleHolder
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2578
                                           translateLabel: true
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2579
                                           labelChannel: alphaText
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2580
                                         )
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2581
                                        (InputFieldSpec
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2582
                                           name: 'EntryField1'
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2583
                                           layout: (LayoutFrame -106 1 2 0 -56 1 22 0)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2584
                                           activeHelpKey: drawingAlpha
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2585
                                           uuid: 'ea3aba90-1e4a-11b2-83b1-485b39758412'
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2586
                                           visibilityChannel: alphaVisibleHolder
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2587
                                           model: alphaHolder
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2588
                                           type: numberInRange
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2589
                                           acceptOnReturn: true
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2590
                                           acceptOnTab: true
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2591
                                           numChars: 3
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2592
                                           minValue: 0
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2593
                                           maxValue: 100
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2594
                                           acceptOnPointerLeave: true
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  2595
                                         )
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2596
                                        (ViewSpec
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2597
                                           name: 'Box1'
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2598
                                           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
  2599
                                           activeHelpKey: drawingColor1
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2600
                                           uuid: 'ea3ac1c0-1e4a-11b2-83b1-485b39758412'
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2601
                                           level: -1
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2602
                                           backgroundChannel: drawingColor1Holder
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2603
                                         )
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2604
                                        (ViewSpec
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2605
                                           name: 'Box2'
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2606
                                           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
  2607
                                           activeHelpKey: drawingColor2
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2608
                                           uuid: 'ea3ac418-1e4a-11b2-83b1-485b39758412'
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2609
                                           level: -1
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2610
                                           backgroundChannel: drawingColor2Holder
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  2611
                                         )
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2612
                                        (DataSetSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2613
                                           name: 'colorDataSetView'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2614
                                           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
  2615
                                           activeHelpKey: colorMapTable
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2616
                                           style: (FontDescription helvetica medium roman 10 #'iso10646-1' nil nil)
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2617
                                           uuid: 'ea3ac652-1e4a-11b2-83b1-485b39758412'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2618
                                           model: selectedColors
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2619
                                           menu: colorMapMenuHolder
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2620
                                           hasHorizontalScrollBar: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2621
                                           hasVerticalScrollBar: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2622
                                           miniScrollerHorizontal: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2623
                                           miniScrollerVertical: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2624
                                           dataList: listOfColors
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2625
                                           has3Dseparators: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2626
                                           doubleClickSelector: doubleClickOnColor:
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2627
                                           columnHolder: colorTableColumns
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2628
                                           multipleSelectOk: true
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2629
                                           verticalSpacing: 1
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2630
                                           columnAdaptor: colorColumnAdaptor
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2631
                                         )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2632
                                        )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2633
                                      
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2634
                                     )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2635
                                   )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2636
                                  (ViewSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2637
                                     name: 'FloodFillBox'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2638
                                     layout: (LayoutFrame 0 0 36 0 0 1 0 1)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2639
                                     uuid: 'ea3acfda-1e4a-11b2-83b1-485b39758412'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2640
                                     visibilityChannel: floodFillBoxVisibleHolder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2641
                                     component: 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2642
                                    (SpecCollection
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2643
                                       collection: (
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2644
                                        (UISubSpecification
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2645
                                           name: 'SubSpecification2'
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2646
                                           layout: (LayoutFrame 0 0 0 0 0 1 0 1)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2647
                                           uuid: 'ea3ad21e-1e4a-11b2-83b1-485b39758412'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2648
                                           minorKey: floodFillToleranceSpec
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2649
                                         )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2650
                                        )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2651
                                      
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2652
                                     )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2653
                                   )
3400
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2654
                                  (ViewSpec
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2655
                                     name: 'CropBox'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2656
                                     layout: (LayoutFrame 0 0 36 0 0 1 0 1)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2657
                                     uuid: 'ea3ad552-1e4a-11b2-83b1-485b39758412'
3400
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2658
                                     visibilityChannel: cropBoxVisibleHolder
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2659
                                     component: 
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2660
                                    (SpecCollection
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2661
                                       collection: (
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2662
                                        (UISubSpecification
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2663
                                           name: 'SubSpecification1'
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2664
                                           layout: (LayoutFrame 0 0 0 0 0 1 0 1)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2665
                                           uuid: 'ea3ad76e-1e4a-11b2-83b1-485b39758412'
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  2666
                                           minorKey: cropSpec
3400
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2667
                                         )
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2668
                                        )
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2669
                                      
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2670
                                     )
3cd67963333d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3393
diff changeset
  2671
                                   )
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2672
                                  )
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
                               )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2675
                             )
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2676
                            (ArbitraryComponentSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2677
                               name: 'imagePreView'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2678
                               activeHelpKey: previewView
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2679
                               uuid: 'ea3ad9a8-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2680
                               menu: previewMenu
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2681
                               hasHorizontalScrollBar: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2682
                               hasVerticalScrollBar: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2683
                               miniScrollerHorizontal: false
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2684
                               miniScrollerVertical: false
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2685
                               hasBorder: false
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2686
                               component: ImageView
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
                         handles: (Any 0.5 1.0)
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2692
                       )
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2693
                      )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2694
                    
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2695
                   )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2696
                 )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2697
                (ViewSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2698
                   name: 'rightView'
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2699
                   uuid: 'ea3ade8a-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2700
                   component: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2701
                  (SpecCollection
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2702
                     collection: (
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2703
                      (MenuPanelSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2704
                         name: 'ToolBar1'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2705
                         layout: (LayoutFrame 0 0 0 0.0 28 0 0 1.0)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2706
                         uuid: 'ea3ae0b0-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2707
                         level: 1
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2708
                         menu: toolsMenuToolbar
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2709
                         verticalLayout: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2710
                         centerItems: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2711
                         textDefault: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2712
                       )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2713
                      (ViewSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2714
                         name: 'editingView'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2715
                         layout: (LayoutFrame 28 0.0 0 0.0 0 1.0 0 1.0)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2716
                         uuid: 'ea3ae3bc-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2717
                         level: 1
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2718
                         component: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2719
                        (SpecCollection
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2720
                           collection: (
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2721
                            (ArbitraryComponentSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2722
                               name: 'imageEditView'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2723
                               layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2724
                               uuid: 'ea3ae5ec-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2725
                               hasHorizontalScrollBar: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2726
                               hasVerticalScrollBar: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2727
                               hasBorder: false
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2728
                               component: ImageEditView
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2729
                             )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2730
                            (LabelSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2731
                               name: 'coordLabel'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2732
                               layout: (LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2733
                               uuid: 'ea3ae8da-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2734
                               level: -1
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2735
                               translateLabel: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2736
                               labelChannel: imageInfoHolder
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2737
                               resizeForLabel: false
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2738
                               adjust: left
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2739
                             )
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2740
                            (ArrowButtonSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2741
                               name: 'magnifyDownButton'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2742
                               layout: (LayoutFrame -80 1 -22 1 -58 1 0 1)
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2743
                               activeHelpKey: magnifyImageDown
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2744
                               uuid: 'ea3aebd2-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2745
                               translateLabel: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2746
                               model: doMagnifyDown
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2747
                               enableChannel: imageIsLoadedHolder
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2748
                               isTriggerOnDown: true
3479
8053bda07548 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3478
diff changeset
  2749
                               autoRepeat: true
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2750
                               direction: left
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2751
                             )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2752
                            (ArrowButtonSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2753
                               name: 'magnifyUpButton'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2754
                               layout: (LayoutFrame -24 1 -22 1 -2 1 0 1)
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2755
                               activeHelpKey: magnifyImageUp
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2756
                               uuid: 'ea3af26c-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2757
                               translateLabel: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2758
                               model: doMagnifyUp
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2759
                               enableChannel: imageIsLoadedHolder
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2760
                               isTriggerOnDown: true
3479
8053bda07548 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3478
diff changeset
  2761
                               autoRepeat: true
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2762
                               direction: right
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2763
                             )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2764
                            (InputFieldSpec
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2765
                               name: 'magnificationInputField'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2766
                               layout: (LayoutFrame -57 1 -22 1 -26 1 0 1)
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2767
                               activeHelpKey: magnificationNumber
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2768
                               uuid: 'ea3af62c-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2769
                               enableChannel: imageIsLoadedHolder
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2770
                               model: magnificationHolder
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2771
                               type: numberInRange
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2772
                               acceptOnReturn: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2773
                               acceptOnTab: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2774
                               numChars: 2
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2775
                               minValue: 1
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2776
                               maxValue: 99
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2777
                               acceptOnPointerLeave: true
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2778
                             )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2779
                            )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2780
                          
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2781
                         )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2782
                       )
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2783
                      )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2784
                    
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2785
                   )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2786
                 )
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2787
                )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2788
              
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2789
             )
3443
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
  2790
             handles: (Any 0.47999999999999998 1.0)
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  2791
           )
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2792
          (UISubSpecification
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2793
             name: 'infoBarSubSpec'
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2794
             layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  2795
             uuid: 'ea3afaf0-1e4a-11b2-83b1-485b39758412'
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2796
             majorKey: ToolApplicationModel
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2797
             minorKey: windowSpecForInfoBar
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2798
           )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2799
          )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2800
        
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2801
       )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2802
     )
519
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2803
! !
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2804
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2805
!ImageEditor class methodsFor:'menu specs'!
085cf69fcd6c single lines in tool bar removed
tz
parents: 503
diff changeset
  2806
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2807
colorMapMenu
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2808
    "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
  2809
     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
  2810
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2811
    "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
  2812
     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
  2813
3592
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2814
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2815
    "
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2816
     MenuEditor new openOnClass:ImageEditor andSelector:#colorMapMenu
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2817
     (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
  2818
    "
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2819
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2820
    <resource: #menu>
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2821
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2822
    ^ 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2823
     #(Menu
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2824
        (
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2825
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2826
            enabled: canAddColorToColormapHolder
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2827
            label: 'Add Color'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2828
            itemValue: addColorToColormap
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2829
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2830
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2831
            enabled: canAddColorToColormapHolder
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  2832
            label: 'Add & Paste Color'
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  2833
            itemValue: addPastedColorToColormap
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  2834
          )
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  2835
         (MenuItem
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  2836
            enabled: canAddColorToColormapHolder
2539
3fa0fde65f75 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2520
diff changeset
  2837
            label: 'Pick and Add Color...'
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2838
            itemValue: pickAndAddColorToColormap
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2839
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2840
         (MenuItem
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2841
            label: '-'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2842
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2843
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2844
            enabled: hasColormapAndSingleColorSelectedHolder
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2845
            label: 'Cut Color'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2846
            itemValue: cutColorFromColormap
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2847
            isVisible: false
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2848
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2849
         (MenuItem
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2850
            enabled: hasSingleColorSelectedHolder
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2851
            label: 'Copy Color'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2852
            itemValue: copyColorFromColormap
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  2853
            shortcutKey: Copy
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2854
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2855
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2856
            enabled: hasColormapAndSingleWritableColorSelectedHolder
2539
3fa0fde65f75 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2520
diff changeset
  2857
            label: 'Pick and Paste Color...'
1933
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  2858
            itemValue: pickAndPasteColor
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2859
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2860
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2861
            enabled: canChangeColorInColormapHolder
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2862
            label: 'Paste Color'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2863
            itemValue: pasteColorIntoColormap
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  2864
            shortcutKey: Paste
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2865
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2866
         (MenuItem
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2867
            label: '-'
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2868
          )
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  2869
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2870
            enabled: hasColormapAndSingleWritableColorSelectedHolder
2539
3fa0fde65f75 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2520
diff changeset
  2871
            label: 'Edit Color...'
1931
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  2872
            itemValue: editSelectedColor
3592
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2873
          )
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2874
         (MenuItem
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2875
            enabled: hasColormapAndColorSelected
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2876
            label: 'Make Gray'
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2877
            itemValue: makeSelectedColorGray
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2878
          )
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2879
         (MenuItem
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2880
            enabled: hasColormapAndSingleWritableColorSelectedHolder
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2881
            label: 'Color Shift...'
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2882
            itemValue: makeSelectedColorShifted
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2883
          )
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2884
         (MenuItem
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2885
            label: '-'
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2886
          )
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2887
         (MenuItem
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2888
            enabled: hasColormapAndColorSelected
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2889
            label: 'Slightly Brighter'
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2890
            itemValue: makeSelectedColorSlightlyBrighter
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2891
          )
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2892
         (MenuItem
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2893
            enabled: hasColormapAndColorSelected
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2894
            label: 'Slightly Darker'
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  2895
            itemValue: makeSelectedColorSlightlyDarker
1931
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  2896
          )
34b208e7231f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
  2897
         (MenuItem
3553
31631af8baf9 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3552
diff changeset
  2898
            enabled: hasColormapAndColorSelected
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2899
            label: 'Brighter'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2900
            itemValue: makeSelectedColorBrighter
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2901
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2902
         (MenuItem
3553
31631af8baf9 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3552
diff changeset
  2903
            enabled: hasColormapAndColorSelected
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2904
            label: 'Darker'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2905
            itemValue: makeSelectedColorDarker
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2906
          )
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2907
         (MenuItem
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2908
            label: '-'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2909
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2910
         (MenuItem
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2911
            enabled: hasSingleColorSelectedHolder
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2912
            label: 'Inspect Color'
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2913
            itemValue: inspectColor
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2914
          )
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2915
         (MenuItem
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  2916
            enabled: imageHasColormapHolder
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2917
            label: 'Inspect Colormap'
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  2918
            itemValue: inspectColormap
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2919
          )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2920
         )
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2921
        nil
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  2922
        nil
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2923
      )
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2924
!
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  2925
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2926
menu
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2927
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2928
     by the MenuEditor of ST/X."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2929
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2930
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  2931
     the MenuEditor may not be able to read the specification."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2932
228524287573 intitial checkin
tz
parents:
diff changeset
  2933
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  2934
     MenuEditor new openOnClass:ImageEditor andSelector:#menu
228524287573 intitial checkin
tz
parents:
diff changeset
  2935
     (Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
  2936
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  2937
228524287573 intitial checkin
tz
parents:
diff changeset
  2938
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
  2939
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2940
    ^ 
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2941
     #(Menu
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2942
        (
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2943
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2944
            label: '&File'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2945
            translateLabel: true
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2946
            submenuChannel: menuFile
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2947
            "/ keepLinkedMenu: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2948
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2949
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2950
            label: 'Edit'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2951
            translateLabel: true
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  2952
            submenuChannel: menuEdit
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2953
            "/ keepLinkedMenu: true
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2954
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2955
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2956
            label: 'Mode'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2957
            translateLabel: true
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2958
            submenuChannel: modeMenu
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  2959
            isVisible: modeMenuVisible
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  2960
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2961
         (MenuItem
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  2962
            label: 'Image'
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2963
            translateLabel: true
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2964
            submenuChannel: menuColors
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2965
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2966
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2967
            label: 'Settings'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2968
            translateLabel: true
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2969
            submenuChannel: menuSettings
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2970
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2971
         (MenuItem
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2972
            label: 'History'
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2973
            translateLabel: true
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  2974
            isVisible: isStandAlone
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2975
            submenuChannel: menuHistory
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2976
          )
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2977
         (MenuItem
2136
bb10485fa455 support '?' as help (for now: controlled by resources)
Claus Gittinger <cg@exept.de>
parents: 2125
diff changeset
  2978
            label: 'MENU_Help'
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2979
            translateLabel: true
2125
22ad4aa3e495 #conditionalRight
Claus Gittinger <cg@exept.de>
parents: 2073
diff changeset
  2980
            startGroup: conditionalRight
1882
80845a794f11 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1880
diff changeset
  2981
            submenuChannel: menuHelp
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2982
          )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2983
         )
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2984
        nil
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  2985
        nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2986
      )
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  2987
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  2988
    "Modified: / 23-10-2017 / 10:39:43 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  2989
!
228524287573 intitial checkin
tz
parents:
diff changeset
  2990
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2991
menuColors
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2992
    "This resource specification was automatically generated
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2993
     by the MenuEditor of ST/X."
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2994
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2995
    "Do not manually edit this!! If it is corrupted,
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2996
     the MenuEditor may not be able to read the specification."
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2997
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  2998
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  2999
    "
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3000
     MenuEditor new openOnClass:ImageEditor andSelector:#menuColors
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3001
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuColors)) startUp
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3002
    "
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3003
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3004
    <resource: #menu>
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3005
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3006
    ^ 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3007
     #(Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3008
        (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3009
         (MenuItem
3666
7ec8466f4f67 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
  3010
            enabled: imageIsLoadedHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3011
            label: 'Depth'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3012
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3013
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3014
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3015
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3016
                  activeHelpKey: colorMap1
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3017
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3018
                  label: '1-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3019
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3020
                  argument: depth1
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3021
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3022
                  choiceValue: depth1
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3023
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3024
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3025
                  activeHelpKey: colorMap1M
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3026
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3027
                  label: '1-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3028
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3029
                  argument: masked1
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3030
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3031
                  choiceValue: masked1
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3032
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3033
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3034
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3035
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3036
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3037
                  activeHelpKey: colorMap2
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3038
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3039
                  label: '2-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3040
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3041
                  argument: depth2
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3042
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3043
                  choiceValue: depth2
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3044
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3045
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3046
                  activeHelpKey: colorMap2M
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3047
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3048
                  label: '2-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3049
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3050
                  argument: masked2
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3051
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3052
                  choiceValue: masked2
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
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3056
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3057
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3058
                  activeHelpKey: colorMap4
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3059
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3060
                  label: '4-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3061
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3062
                  argument: depth4
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3063
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3064
                  choiceValue: depth4
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3065
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3066
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3067
                  activeHelpKey: colorMap4M
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3068
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3069
                  label: '4-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3070
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3071
                  argument: masked4
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3072
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3073
                  choiceValue: masked4
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3074
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3075
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3076
                  label: '-'
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
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3079
                  activeHelpKey: colorMap8
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3080
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3081
                  label: '8-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3082
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3083
                  argument: depth8
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3084
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3085
                  choiceValue: depth8
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3086
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3087
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3088
                  activeHelpKey: colorMap8M
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3089
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3090
                  label: '8-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3091
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3092
                  argument: masked8
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3093
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3094
                  choiceValue: masked8
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3095
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3096
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3097
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3098
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3099
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3100
                  activeHelpKey: colorMap16
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3101
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3102
                  label: '16-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3103
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3104
                  argument: depth16
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3105
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3106
                  choiceValue: depth16
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3107
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3108
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3109
                  activeHelpKey: colorMap16M
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3110
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3111
                  label: '16-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3112
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3113
                  argument: masked16
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3114
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3115
                  choiceValue: masked16
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3116
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3117
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3118
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3119
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3120
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3121
                  activeHelpKey: colorMap24
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3122
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3123
                  label: '24-Plane'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3124
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3125
                  argument: depth24
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3126
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3127
                  choiceValue: depth24
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3128
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3129
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3130
                  activeHelpKey: colorMap24M
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3131
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3132
                  label: '24-Plane + Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3133
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3134
                  argument: masked24
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3135
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3136
                  choiceValue: masked24
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3137
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3138
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3139
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3140
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3141
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3142
                  activeHelpKey: colorMap32
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3143
                  enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3144
                  label: '32-Plane (rgba)'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3145
                  itemValue: colorMapMode:
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3146
                  argument: depth32
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3147
                  choice: colorMapMode
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3148
                  choiceValue: depth32
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3149
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3150
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3151
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3152
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3153
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3154
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3155
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3156
            enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3157
            label: 'ColorMap'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3158
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3159
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3160
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3161
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3162
                  activeHelpKey: compressColormap
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3163
                  enabled: hasColormapHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3164
                  label: 'Compress Colormap'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3165
                  itemValue: #'menu_compressColorMap'
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3166
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3167
               (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3168
                  enabled: hasColormapHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3169
                  label: 'Sort Colormap'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3170
                  itemValue: #'menu_sortColorMap'
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3171
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3172
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3173
                  label: 'Reduce Number of Colors by Rounding...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3174
                  itemValue: reduceNumberOfColors2
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3175
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3176
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3177
                  label: 'Reduce Number of Colors by Masking Bits...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3178
                  itemValue: reduceNumberOfColors
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  3179
                )
2585
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
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3182
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3183
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3184
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3185
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3186
            enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3187
            label: 'Process'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3188
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3189
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3190
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3191
               (MenuItem
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3192
                  label: 'Negative'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3193
                  itemValue: makeNegative
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3194
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3195
               (MenuItem
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3196
                  label: 'Invert Pixel Bits'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3197
                  itemValue: makeInvertedBits
3598
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  3198
                )
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  3199
               (MenuItem
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  3200
                  label: 'Exchange Red-Green'
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  3201
                  itemValue: exchangeRedGreenChannels
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  3202
                )
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  3203
               (MenuItem
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  3204
                  label: 'Exchange Red-Blue'
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  3205
                  itemValue: exchangeRedBlueChannels
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  3206
                )
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  3207
               (MenuItem
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  3208
                  label: 'Exchange Green-Blue'
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  3209
                  itemValue: exchangeGreenBlueChannels
3458
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3210
                )
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3211
               (MenuItem
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3212
                  label: '-'
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3213
                )
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3214
               (MenuItem
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3215
                  enabled: allowedToChangeImageDimensionAndDepth
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3216
                  label: 'Make dithered 8Bit Palette'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3217
                  itemValue: makeDitheredPaletteImage
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3218
                  isVisible: false
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3219
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3220
               (MenuItem
3458
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3221
                  label: 'Dither to Depth...'
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3222
                  itemValue: ditherToDepth
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3223
                )
159bab42fdbb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3443
diff changeset
  3224
               (MenuItem
3471
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  3225
                  label: 'Threshold to Depth...'
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  3226
                  itemValue: thresholdToDepth
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3227
                )
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3228
               (MenuItem
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3229
                  label: '-'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3230
                )
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3231
               (MenuItem
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3232
                  label: 'Make Monochrome...'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3233
                  itemValue: makeMonochromeImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3234
                )
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3235
               (MenuItem
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3236
                  label: 'Make GrayScale (same Depth)'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3237
                  itemValue: makeGrayScaleImage
3471
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  3238
                )
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  3239
               (MenuItem
3460
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  3240
                  label: 'Make GrayScale with Depth (Dither)...'
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  3241
                  itemValue: ditherGrayToDepth
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  3242
                )
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  3243
               (MenuItem
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  3244
                  label: 'Make GrayScale with Depth (Threshold)...'
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  3245
                  itemValue: thresholdGrayToDepth
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3246
                )
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3247
               (MenuItem
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3248
                  label: 'Make GrayScale with N Gray Colors (Dither)...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3249
                  itemValue: ditherToNumberOfGrayColors
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3250
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3251
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3252
                  label: 'Make GrayScale with N Gray Colors (Threshold)...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3253
                  itemValue: thresholdToNumberOfGrayColors
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
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3256
                  label: '-'
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3257
                )
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3258
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3259
                  label: 'Make Slightly Brighter'
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3260
                  itemValue: makeSlightlyBrighter
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3261
                )
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3262
               (MenuItem
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3263
                  label: 'Make Brighter'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3264
                  itemValue: makeBrighter
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3265
                )
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3266
               (MenuItem
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3267
                  label: 'Make Slightly Darker'
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3268
                  itemValue: makeSlightlyDarker
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3269
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3270
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3271
                  label: 'Make Darker'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3272
                  itemValue: makeDarker
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3273
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3274
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3275
                  label: '-'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3276
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3277
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3278
                  label: 'Change HLS...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3279
                  itemValue: changeHLS
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3280
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3281
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3282
                  label: 'Colorize...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3283
                  itemValue: colorize
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3284
                )
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3285
               (MenuItem
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3286
                  enabled: imageIsLoadedHolder
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3287
                  label: 'Brighten'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3288
                  itemValue: doBrightenImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3289
                )
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3290
               (MenuItem
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3291
                  enabled: imageIsLoadedHolder
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3292
                  label: 'Darken'
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  3293
                  itemValue: doDarkenImage
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3294
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3295
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3296
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3297
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3298
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3299
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3300
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  3301
            enabled: imageIsLoadedAndNotReadonlyHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3302
            label: 'Mask'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3303
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3304
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3305
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3306
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3307
                  activeHelpKey: copyMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3308
                  enabled: hasMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3309
                  label: 'Copy Mask'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3310
                  itemValue: #'menu_copyMask'
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3311
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3312
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3313
                  activeHelpKey: pasteMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3314
                  enabled: hasMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3315
                  label: 'Paste Mask'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3316
                  itemValue: #'menu_pasteMask'
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3317
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3318
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3319
                  enabled: hasMask
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3320
                  label: 'Clear Masked Pixels'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3321
                  itemValue: #'menu_clearMaskedPixels'
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  3322
                )
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  3323
               (MenuItem
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  3324
                  enabled: hasMask
2653
f0e64b82fa93 changed: #menuColors
Claus Gittinger <cg@exept.de>
parents: 2652
diff changeset
  3325
                  label: 'Clear Colormap Entry for Masked Pixels'
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  3326
                  itemValue: #'menu_clearColormapEntry0AndMaskedPixels'
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3327
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3328
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3329
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3330
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3331
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3332
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3333
         )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3334
        nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3335
        nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3336
      )
3666
7ec8466f4f67 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
  3337
7ec8466f4f67 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
  3338
    "Modified: / 19-05-2019 / 11:46:50 / Claus Gittinger"
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3339
!
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3340
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3341
menuEdit
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3342
    "This resource specification was automatically generated
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3343
     by the MenuEditor of ST/X."
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3344
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3345
    "Do not manually edit this!! If it is corrupted,
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3346
     the MenuEditor may not be able to read the specification."
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3347
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3348
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3349
    "
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3350
     MenuEditor new openOnClass:ImageEditor andSelector:#menuEdit
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3351
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuEdit)) startUp
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3352
    "
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
    <resource: #menu>
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3355
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3356
    ^ 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3357
     #(Menu
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
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3360
            activeHelpKey: editUndo
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3361
            enabled: canUndoHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3362
            label: 'Undo'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3363
            itemValue: doUndo
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3364
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3365
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3366
            label: '-'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3367
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3368
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3369
            enabled: imageIsLoadedHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3370
            label: 'Copy to Clipboard'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3371
            itemValue: doCopyImageToClipboard
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3372
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3373
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3374
            label: '-'
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
            activeHelpKey: editResize
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3378
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3379
            label: 'Resize...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3380
            itemValue: doResizeImage
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3381
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3382
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3383
            activeHelpKey: editMagnifyImage
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3384
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3385
            label: 'Magnify...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3386
            itemValue: doMagnifyImage
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3387
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3388
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3389
            activeHelpKey: editMagnifyImage
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3390
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3391
            label: 'Magnify By...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3392
            itemValue: doMagnifyImageBy
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3393
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3394
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3395
            activeHelpKey: editRotate
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3396
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3397
            label: 'Rotate...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3398
            itemValue: doRotateImage
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3399
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3400
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3401
            activeHelpKey: edit3DProjection
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3402
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3403
            label: '3D Projection...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3404
            itemValue: do3DProjection
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3405
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3406
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3407
            enabled: imageIsLoadedAndAllowedToFlipHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3408
            label: 'Flip'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3409
            submenu: 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3410
           (Menu
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
                  activeHelpKey: editFlipVertical
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3414
                  enabled: imageIsLoadedAndNotReadonlyHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3415
                  label: 'Flip - Vertical'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3416
                  itemValue: doFlipVertical
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3417
                  labelImage: (ResourceRetriever ImageEditor flipVerticalIcon 'Flip - Vertical')
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3418
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3419
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3420
                  activeHelpKey: editFlipHorizontal
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3421
                  enabled: imageIsLoadedAndNotReadonlyHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3422
                  label: 'Flip - Horizontal'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3423
                  itemValue: doFlipHorizontal
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3424
                  labelImage: (ResourceRetriever ImageEditor flipHorizontalIcon 'Flip - Horizontal')
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3425
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3426
               )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3427
              nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3428
              nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3429
            )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3430
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3431
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3432
            label: '-'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3433
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3434
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3435
            enabled: imageIsLoadedAndAllowedToChangeImageDimension
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3436
            label: 'Crop'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3437
            submenu: 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3438
           (Menu
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3439
              (
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3440
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3441
                  activeHelpKey: cropManual
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3442
                  label: 'Manual...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3443
                  itemValue: doCropManual
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3444
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3445
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3446
                  label: '-'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3447
                  isVisible: false
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3448
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3449
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3450
                  activeHelpKey: autoCropAll
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3451
                  label: 'All'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3452
                  itemValue: autoCropAll
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3453
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3454
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3455
                  label: '-'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3456
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3457
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3458
                  activeHelpKey: autoCropLeft
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3459
                  label: 'Left'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3460
                  itemValue: autoCropLeft
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3461
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3462
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3463
                  activeHelpKey: autoCropRight
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3464
                  label: 'Right'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3465
                  itemValue: autoCropRight
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3466
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3467
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3468
                  activeHelpKey: autoCropTop
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3469
                  label: 'Top'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3470
                  itemValue: autoCropTop
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3471
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3472
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3473
                  activeHelpKey: autoCropBottom
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3474
                  label: 'Bottom'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3475
                  itemValue: autoCropBottom
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3476
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3477
               )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3478
              nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3479
              nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3480
            )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3481
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3482
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3483
            activeHelpKey: uncropManual
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3484
            enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3485
            label: 'Uncrop (Add Border)...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3486
            itemValue: doUnCropManual
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3487
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3488
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3489
            activeHelpKey: shiftManual
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3490
            enabled: imageIsLoadedAndAllowedToChangeImageDimension
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3491
            label: 'Shift...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3492
            itemValue: doShiftManual
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3493
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3494
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3495
            label: '-'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3496
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3497
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3498
            activeHelpKey: fileEditMask
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3499
            enabled: hasMaskHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3500
            label: 'Edit Mask'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3501
            itemValue: doEditMask
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3502
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3503
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3504
            enabled: imageIsLoadedAndNotReadonlyHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3505
            label: 'Text...'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3506
            itemValue: doInsertTextFromUser
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3507
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3508
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3509
            label: '-'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3510
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3511
         (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3512
            enabled: imageIsLoadedHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3513
            label: 'Animation Sequence'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3514
            submenu: 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3515
           (Menu
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3516
              (
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3517
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3518
                  enabled: imageHasNextImageHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3519
                  label: 'Next in Sequence'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3520
                  itemValue: nextImageInSequence
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3521
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3522
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3523
                  enabled: imageHasPreviousImageHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3524
                  label: 'Previous in Sequence'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3525
                  itemValue: previousImageInSequence
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3526
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3527
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3528
                  label: '-'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3529
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3530
               (MenuItem
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3531
                  enabled: imageHasImageSequenceHolder
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3532
                  label: 'Edit each from Sequence'
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3533
                  itemValue: editEachImageFromSequence
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3534
                )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3535
               )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3536
              nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3537
              nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3538
            )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3539
          )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3540
         )
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3541
        nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3542
        nil
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  3543
      )
2196
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
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3546
menuFile
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3547
    "This resource specification was automatically generated
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3548
     by the MenuEditor of ST/X."
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3549
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3550
    "Do not manually edit this!! If it is corrupted,
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3551
     the MenuEditor may not be able to read the specification."
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3552
3022
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  3553
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3554
    "
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3555
     MenuEditor new openOnClass:ImageEditor andSelector:#menuFile
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3556
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuFile)) startUp
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3557
    "
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3558
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3559
    <resource: #menu>
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3560
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3561
    ^ 
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3562
     #(Menu
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3563
        (
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3564
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3565
            activeHelpKey: fileNewImageEditor
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3566
            label: 'New ImageEditor'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3567
            itemValue: doNewImageEditor
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3568
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3569
         (MenuItem
2876
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3570
            label: '-'
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3571
          )
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3572
         (MenuItem
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3573
            activeHelpKey: fileNewImage
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3574
            label: 'New...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3575
            itemValue: doNewImage
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
3200
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  3578
            activeHelpKey: fileNewImageFromClipboard
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3579
            label: 'New from ClipBoard'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3580
            itemValue: doNewImageFromClipboard
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3581
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3582
         (MenuItem
3200
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  3583
            activeHelpKey: fileNewMaskFromClipboard
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  3584
            label: 'Mask from ClipBoard'
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  3585
            itemValue: doNewMaskFromClipboard
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  3586
          )
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  3587
         (MenuItem
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3588
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3589
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3590
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3591
            activeHelpKey: fileLoadFromClass
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3592
            label: 'Load...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3593
            itemValue: doLoadFromClass
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  3594
            isVisible: methodSaveAndLoadMenuItemsVisible
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3595
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3596
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3597
            activeHelpKey: fileLoadFromFile
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3598
            label: 'Load from File...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3599
            itemValue: doLoadFromFile
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3600
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3601
         (MenuItem
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  3602
            activeHelpKey: fileLoadFromURL
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  3603
            label: 'Load from URL...'
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  3604
            itemValue: doLoadFromURL
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  3605
          )
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  3606
         (MenuItem
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3607
            label: 'Grab'
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3608
            submenu: 
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3609
           (Menu
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3610
              (
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3611
               (MenuItem
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3612
                  activeHelpKey: fileGrabImageFromScreen
2717
fac7e5156235 changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2712
diff changeset
  3613
                  label: 'Grab from Screen Area...'
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3614
                  itemValue: grabScreenImage
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3615
                )
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3616
               (MenuItem
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3617
                  activeHelpKey: fileGrabImageFromScreen
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3618
                  enabled: hasLastGrabScreenArea
2711
4700f54d0040 changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2708
diff changeset
  3619
                  label: 'Grab again from same Screen Area'
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3620
                  itemValue: grabScreenImageFromLastArea
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3621
                )
2771
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3622
               (MenuItem
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3623
                  label: '-'
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3624
                )
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3625
               (MenuItem
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3626
                  activeHelpKey: fileGrabImageFromWindow
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3627
                  label: 'Grab from Window...'
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3628
                  itemValue: grabWindowImage
244f8e53399b changed: #menuFile
Claus Gittinger <cg@exept.de>
parents: 2767
diff changeset
  3629
                )
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  3630
               (MenuItem
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  3631
                  activeHelpKey: fileGrabFullSreenImage
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  3632
                  label: 'Grab from whole Screen'
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  3633
                  itemValue: grabFullScreenImage
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  3634
                )
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3635
               )
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3636
              nil
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3637
              nil
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  3638
            )
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  3639
          )
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  3640
         (MenuItem
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3641
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3642
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3643
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3644
            activeHelpKey: fileSaveMethod
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3645
            enabled: imageIsLoadedAndClassDefined
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3646
            label: 'Save'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3647
            itemValue: doSaveMethod
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  3648
            isVisible: methodSaveAndLoadMenuItemsVisible
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3649
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3650
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3651
            activeHelpKey: fileSaveMethodAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3652
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3653
            label: 'Save As...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3654
            itemValue: doSaveMethodAs
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  3655
            isVisible: methodSaveAndLoadMenuItemsVisible
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3656
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3657
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3658
            activeHelpKey: fileSaveAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3659
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3660
            label: 'Save to File...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3661
            itemValue: doSaveImageFileAs
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3662
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3663
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3664
            activeHelpKey: fileSaveMaskAs
3411
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  3665
            enabled: hasMaskHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3666
            label: 'Save Mask to File...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3667
            itemValue: doSaveImageMaskFileAs
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3668
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3669
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3670
            activeHelpKey: fileSaveButtonImageAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3671
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3672
            label: 'Save as Button to File...'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3673
            itemValue: doSaveButtonImageToFileAs
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3674
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3675
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3676
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3677
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3678
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3679
            activeHelpKey: filePrint
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3680
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3681
            label: 'Print'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3682
            itemValue: doPrint
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3683
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3684
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3685
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3686
            isVisible: isStandAlone
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3687
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3688
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3689
            activeHelpKey: fileBrowseClass
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3690
            enabled: hasClassDefinedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3691
            label: 'Browse Class'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3692
            itemValue: doBrowseClass
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3693
            isVisible: isStandAlone
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3694
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3695
         (MenuItem
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3696
            enabled: imageIsLoadedHolder
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3697
            label: 'Inspect Image'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3698
            itemValue: doInspectImage
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3699
            isVisible: isStandAlone
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3700
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3701
         (MenuItem
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3702
            activeHelpKey: fileShowStoreString
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3703
            enabled: imageIsLoadedHolder
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3704
            label: 'Show storeString'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3705
            itemValue: doShowStoreString
3022
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  3706
          )
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  3707
         (MenuItem
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  3708
            activeHelpKey: fileShowStoreString
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  3709
            enabled: imageIsLoadedHolder
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  3710
            label: 'Show Pixel Array Literal String'
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  3711
            itemValue: doShowPixelArrayLiteralString
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3712
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3713
         (MenuItem
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3714
            label: '-'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3715
            isVisible: isStandAlone
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3716
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3717
         (MenuItem
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3718
            activeHelpKey: fileExit
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3719
            label: 'Exit'
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3720
            itemValue: closeRequest
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3721
            isVisible: isStandAlone
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3722
          )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3723
         )
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3724
        nil
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3725
        nil
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3726
      )
3411
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  3727
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  3728
    "Modified: / 25-02-2017 / 12:40:30 / cg"
2196
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3729
!
7e4e066ca7f5 rotation; text input
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
  3730
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3731
menuMouseButtonColors
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3732
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3733
     by the MenuEditor of ST/X."
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3734
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3735
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3736
     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
  3737
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3738
    "
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3739
     MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3740
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3741
    "
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3742
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3743
    <resource: #menu>
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3744
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3745
    ^
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3746
     
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3747
       #(#Menu
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3748
          
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3749
           #(
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3750
             #(#MenuItem
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3751
                #label: 'Left Mouse Button'
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3752
                #nameKey: #leftMouseKeyButton
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3753
                #activeHelpKey: #mouseKeyColorMode
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3754
                #enabled: #imageIsLoadedHolder
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3755
                #labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3756
                #choice: #mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3757
                #choiceValue: 1
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3758
            )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3759
             #(#MenuItem
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3760
                #label: 'Right Mouse Button'
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3761
                #nameKey: #rightMouseKeyButton
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3762
                #activeHelpKey: #mouseKeyColorMode
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3763
                #enabled: #imageIsLoadedHolder
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3764
                #labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon)
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3765
                #choice: #mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  3766
                #choiceValue: 2
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3767
            )
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3768
          ) nil
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3769
          nil
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3770
      )
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3771
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3772
    "Modified: / 04-07-2010 / 10:17:37 / cg"
679
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3773
!
9cd2115ac627 mouse button color menu readded below the color map
tz
parents: 676
diff changeset
  3774
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3775
menuSettings
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3776
    "This resource specification was automatically generated
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3777
     by the MenuEditor of ST/X."
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3778
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3779
    "Do not manually edit this!! If it is corrupted,
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3780
     the MenuEditor may not be able to read the specification."
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3781
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3782
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3783
    "
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3784
     MenuEditor new openOnClass:ImageEditor andSelector:#menuSettings
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3785
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuSettings)) startUp
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3786
    "
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3787
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3788
    <resource: #menu>
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3789
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3790
    ^ 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3791
     #(Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3792
        (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3793
         (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3794
            activeHelpKey: settingsGridMagnification
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3795
            label: 'Grid Magnification Limit...'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3796
            itemValue: doChangeGridMagnification
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3797
            translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3798
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3799
         (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3800
            label: 'Pen'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3801
            translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3802
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3803
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3804
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3805
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3806
                  label: '1'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3807
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3808
                  choice: penWidthHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3809
                  choiceValue: 1
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3810
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3811
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3812
                  label: '5'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3813
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3814
                  choice: penWidthHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3815
                  choiceValue: 5
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3816
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3817
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3818
                  label: '10'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3819
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3820
                  choice: penWidthHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3821
                  choiceValue: 10
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3822
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3823
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3824
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3825
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3826
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3827
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3828
         (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3829
            label: 'Spray'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3830
            translateLabel: true
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3831
            submenu: 
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3832
           (Menu
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3833
              (
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3834
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3835
                  label: '4'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3836
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3837
                  choice: spraySpotHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3838
                  choiceValue: 4
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3839
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3840
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3841
                  label: '8'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3842
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3843
                  choice: spraySpotHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3844
                  choiceValue: 8
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3845
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3846
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3847
                  label: '16'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3848
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3849
                  choice: spraySpotHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3850
                  choiceValue: 16
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3851
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3852
               (MenuItem
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3853
                  label: '32'
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3854
                  translateLabel: true
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3855
                  choice: spraySpotHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  3856
                  choiceValue: 32
2585
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3857
                )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3858
               )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3859
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3860
              nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3861
            )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3862
          )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3863
         )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3864
        nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3865
        nil
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3866
      )
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3867
!
c6150678bc9f menu reorg
Claus Gittinger <cg@exept.de>
parents: 2576
diff changeset
  3868
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3869
menuToolbar
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3870
    "This resource specification was automatically generated
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3871
     by the MenuEditor of ST/X."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3872
737
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3873
    "Do not manually edit this!! If it is corrupted,
ed5b109a0f91 user can define own fonts
tz
parents: 732
diff changeset
  3874
     the MenuEditor may not be able to read the specification."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3875
2876
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3876
400
228524287573 intitial checkin
tz
parents:
diff changeset
  3877
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  3878
     MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar
228524287573 intitial checkin
tz
parents:
diff changeset
  3879
     (Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp
228524287573 intitial checkin
tz
parents:
diff changeset
  3880
    "
228524287573 intitial checkin
tz
parents:
diff changeset
  3881
228524287573 intitial checkin
tz
parents:
diff changeset
  3882
    <resource: #menu>
228524287573 intitial checkin
tz
parents:
diff changeset
  3883
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3884
    ^ 
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3885
     #(Menu
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3886
        (
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3887
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3888
            activeHelpKey: fileNewImage
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3889
            label: 'newImage'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3890
            itemValue: doNewImage
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3891
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1882
diff changeset
  3892
            labelImage: (ResourceRetriever ToolbarIconLibrary newImageIcon)
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3893
          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3894
         (MenuItem
2876
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3895
            activeHelpKey: fileGrabImageFromScreen
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3896
            label: 'grabScreenImage'
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3897
            itemValue: grabScreenImage
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3898
            isButton: true
2877
1a7cd3e6eea1 changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2876
diff changeset
  3899
            labelImage: (ResourceRetriever ToolbarIconLibrary snapshot24x24Icon)
2876
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3900
          )
3c7d06dab802 changed:
Claus Gittinger <cg@exept.de>
parents: 2871
diff changeset
  3901
         (MenuItem
1949
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  3902
            label: '-'
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  3903
          )
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  3904
         (MenuItem
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3905
            activeHelpKey: fileLoadFromClass
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3906
            label: 'loadFromClass'
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3907
            itemValue: doLoadFromClass
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3908
            isButton: true
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  3909
            isVisible: isStandAloneAndMethodSaveAndLoadMenuItemsVisible
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3910
            submenuChannel: menuHistory
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3911
            labelImage: (ResourceRetriever XPToolbarIconLibrary loadImageFromMethodIcon)
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3912
            keepLinkedMenu: true
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3913
          )
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3914
         (MenuItem
2567
903843f8a824 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2556
diff changeset
  3915
            activeHelpKey: fileSaveMethodAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3916
            enabled: imageIsLoadedHolder
2567
903843f8a824 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2556
diff changeset
  3917
            label: 'fileSaveMethodAs'
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3918
            itemValue: doSaveMethodAs
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3919
            isButton: true
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  3920
            isVisible: isStandAloneAndMethodSaveAndLoadMenuItemsVisible
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3921
            labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageAsMethodAsIcon)
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3922
          )
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3923
         (MenuItem
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3924
            activeHelpKey: fileSaveMethod
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3925
            enabled: imageIsLoadedHolder
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3926
            label: 'saveAsMethod'
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3927
            itemValue: doSaveMethod
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3928
            isButton: true
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  3929
            isVisible: isNotStandAloneAndMethodSaveAndLoadMenuItemsVisible
2590
9f2cb061d07f changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
  3930
            labelImage: (ResourceRetriever ToolbarIconLibrary saveImageAsMethodIcon)
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3931
          )
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3932
         (MenuItem
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3933
            label: '-'
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  3934
            isVisible: methodSaveAndLoadMenuItemsVisible
1970
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3935
          )
279cc79d6e27 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1969
diff changeset
  3936
         (MenuItem
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3937
            activeHelpKey: fileLoadFromFile
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3938
            label: 'loadFromFile'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3939
            itemValue: doLoadFromFile
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3940
            isButton: true
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  3941
            labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromFileIcon)
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3942
          )
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3943
         (MenuItem
3425
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3944
            activeHelpKey: fileSave
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3945
            enabled: imageIsLoadedHolder
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3946
            label: 'save'
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3947
            itemValue: doSaveImageFile
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3948
            isButton: true
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3949
            isVisible: saveButtonInToolbarVisibleHolder
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3950
            labelImage: (ResourceRetriever ToolbarIconLibrary saveImageIcon)
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3951
          )
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3952
         (MenuItem
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3953
            activeHelpKey: fileSaveAs
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  3954
            enabled: imageIsLoadedHolder
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3955
            label: 'saveAsFile'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3956
            itemValue: doSaveImageFileAs
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3957
            isButton: true
1885
a09ede39c43f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1884
diff changeset
  3958
            labelImage: (ResourceRetriever ToolbarIconLibrary saveImageToFileAsIcon)
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3959
          )
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3960
         (MenuItem
1949
00defdb89630 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1943
diff changeset
  3961
            label: '-'
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3962
          )
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3963
         (MenuItem
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3964
            activeHelpKey: editUndo
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  3965
            enabled: canUndoHolder
1820
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3966
            label: 'Undo'
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3967
            itemValue: doUndo
3d834d5e5bb4 toolbar icons & help texts
Claus Gittinger <cg@exept.de>
parents: 1806
diff changeset
  3968
            isButton: true
1883
577a267a87cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1882
diff changeset
  3969
            labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon)
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  3970
          )
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3971
         (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3972
            label: '-'
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3973
            isVisible: imageHasImageSequenceHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3974
          )
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3975
         (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3976
            activeHelpKey: previousImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3977
            enabled: imageHasPreviousImageHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3978
            label: 'Previous Image'
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3979
            itemValue: previousImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3980
            isVisible: imageHasImageSequenceHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3981
            labelImage: (ResourceRetriever ToolbarIconLibrary leftArrow24x24Icon)
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3982
          )
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3983
         (MenuItem
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3984
            activeHelpKey: nextImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3985
            enabled: imageHasNextImageHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3986
            label: 'Next Image'
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3987
            itemValue: nextImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3988
            isVisible: imageHasImageSequenceHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3989
            labelImage: (ResourceRetriever ToolbarIconLibrary rightArrow24x24Icon)
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  3990
          )
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3991
         )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3992
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3993
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3994
      )
3425
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3995
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  3996
    "Modified: / 26-02-2017 / 23:03:40 / cg"
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3997
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3998
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  3999
modeMenu
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4000
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4001
     by the MenuEditor of ST/X."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4002
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4003
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4004
     the MenuEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4005
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4006
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4007
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4008
     MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4009
     (Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4010
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4011
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4012
    <resource: #menu>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4013
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4014
    ^ 
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4015
     #(Menu
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4016
        (
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4017
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4018
            activeHelpKey: drawModePoint
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4019
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4020
            label: 'Point'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4021
            labelImage: (ResourceRetriever ImageEditor pointIcon 'Point')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4022
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4023
            choiceValue: point
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4024
          )
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4025
         (MenuItem
3765
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  4026
            activeHelpKey: drawModePointBlend
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  4027
            enabled: imageIsLoadedHolder
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  4028
            label: 'Point Blend'
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  4029
            labelImage: (ResourceRetriever ImageEditor pointBlendIcon 'Point')
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  4030
            choice: editMode
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  4031
            choiceValue: pointBlend
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  4032
          )
4443157a398a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 3750
diff changeset
  4033
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4034
            label: '-'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4035
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4036
         (MenuItem
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4037
            activeHelpKey: drawModePoint
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: 'Spray'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4040
            labelImage: (ResourceRetriever ImageEditor sprayIcon 'Spray')
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: spray
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
3191
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  4045
            activeHelpKey: drawModeSmooth
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  4046
            enabled: imageIsLoadedHolder
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  4047
            label: 'Smooth'
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  4048
            labelImage: (ResourceRetriever ImageEditor smoothIcon 'Smooth')
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  4049
            choice: editMode
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  4050
            choiceValue: smooth
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  4051
          )
ae97e9478128 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
  4052
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4053
            label: '-'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4054
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4055
         (MenuItem
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4056
            activeHelpKey: drawModeBox
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4057
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4058
            label: 'Rect'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4059
            labelImage: (ResourceRetriever ImageEditor rectIcon 'Rect')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4060
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4061
            choiceValue: box
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  4062
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4063
         (MenuItem
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4064
            activeHelpKey: drawModeFilledBox
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: 'Filled Rectangle'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4067
            labelImage: (ResourceRetriever ImageEditor fillRectIcon 'Filled Rectangle')
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: filledBox
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  4070
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4071
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4072
            activeHelpKey: drawModeCircle
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4073
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4074
            label: 'Circle'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4075
            labelImage: (ResourceRetriever ImageEditor circleIcon 'Circle')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4076
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4077
            choiceValue: circle
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  4078
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4079
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4080
            activeHelpKey: drawModeFilledCircle
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4081
            enabled: imageIsLoadedHolder
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4082
            label: 'Filled Circle'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4083
            labelImage: (ResourceRetriever ImageEditor fillCircleIcon 'Filled Circle')
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4084
            choice: editMode
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4085
            choiceValue: filledCircle
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4086
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4087
         (MenuItem
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4088
            activeHelpKey: drawModeFill
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4089
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4090
            label: 'Fill'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4091
            labelImage: (ResourceRetriever ImageEditor fillIcon 'Fill')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4092
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4093
            choiceValue: fill
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  4094
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4095
         (MenuItem
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4096
            enabled: imageIsLoadedHolder
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4097
            label: 'Gradient Fill'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4098
            isVisible: false
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4099
            submenu: 
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4100
           (Menu
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4101
              (
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4102
               (MenuItem
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4103
                  activeHelpKey: drawModeFill
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4104
                  enabled: imageIsLoadedHolder
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4105
                  label: 'Horizontal'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4106
                  labelImage: (ResourceRetriever ImageEditor fillHorizontalGradientRectIcon 'Horizontal')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4107
                  choice: editMode
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4108
                  choiceValue: fillHorizontalGradient
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4109
                )
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4110
               (MenuItem
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4111
                  activeHelpKey: drawModeFill
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4112
                  enabled: imageIsLoadedHolder
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4113
                  label: 'Vertical'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4114
                  labelImage: (ResourceRetriever ImageEditor fillVerticalGradientRectIcon 'Vertical')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4115
                  choice: editMode
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4116
                  choiceValue: fillVerticalGradient
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4117
                )
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4118
               (MenuItem
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4119
                  activeHelpKey: drawModeFill
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4120
                  enabled: imageIsLoadedHolder
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4121
                  isVisible: false
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4122
                  label: 'Diagonal'
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4123
                  labelImage: (ResourceRetriever ImageEditor fillDiagonalGradientRectIcon 'Diagonal')
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4124
                  choice: editMode
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4125
                  choiceValue: fillDiagonalGradient
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4126
                )
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4127
               )
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4128
              nil
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4129
              nil
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4130
            )
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4131
          )
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  4132
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4133
            label: '-'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4134
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4135
         (MenuItem
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4136
            activeHelpKey: drawModeMaskOutsideRectangle
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4137
            enabled: imageHasMaskAndIsNotReadOnlyHolder
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4138
            label: 'Mask Outside Rectangle'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4139
            labelImage: (ResourceRetriever ImageEditor maskOutsideRectangleIcon 'Mask Outside Rectangle')
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4140
            choice: editMode
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4141
            choiceValue: maskOutsideRect
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4142
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4143
         (MenuItem
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4144
            activeHelpKey: drawModeMaskOutsideCircle
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4145
            enabled: imageHasMaskAndIsNotReadOnlyHolder
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4146
            label: 'Mask Outside Circle'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4147
            labelImage: (ResourceRetriever ImageEditor maskOutsideCircleIcon 'Mask Outside Circle')
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4148
            choice: editMode
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4149
            choiceValue: maskOutsideCircle
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4150
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4151
         (MenuItem
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4152
            label: '-'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4153
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4154
         (MenuItem
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4155
            activeHelpKey: drawModeCopy
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4156
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4157
            label: 'Copy'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4158
            labelImage: (ResourceRetriever ImageEditor copyIcon 'Copy')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4159
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4160
            choiceValue: copy
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4161
          )
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4162
         (MenuItem
3512
36cd31bca6a4 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3506
diff changeset
  4163
            activeHelpKey: drawModePasteWithMask
36cd31bca6a4 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3506
diff changeset
  4164
            enabled: imageIsLoadedHolder
36cd31bca6a4 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3506
diff changeset
  4165
            label: 'Paste with Mask'
36cd31bca6a4 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3506
diff changeset
  4166
            labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon 'Paste with Mask')
36cd31bca6a4 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3506
diff changeset
  4167
            choice: editMode
36cd31bca6a4 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3506
diff changeset
  4168
            choiceValue: pasteWithMask
36cd31bca6a4 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3506
diff changeset
  4169
          )
36cd31bca6a4 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3506
diff changeset
  4170
         (MenuItem
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4171
            activeHelpKey: drawModePaste
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4172
            enabled: imageIsLoadedHolder
3512
36cd31bca6a4 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3506
diff changeset
  4173
            label: 'Paste Over'
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4174
            labelImage: (ResourceRetriever ImageEditor pasteIcon 'Paste Over')
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4175
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4176
            choiceValue: paste
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  4177
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4178
         (MenuItem
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4179
            activeHelpKey: drawModePasteMasked
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4180
            enabled: imageIsLoadedHolder
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4181
            label: 'Paste Masked'
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4182
            labelImage: (ResourceRetriever ImageEditor pasteIcon 'Paste Masked')
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4183
            choice: editMode
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4184
            choiceValue: pasteMasked
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4185
          )
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4186
         (MenuItem
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4187
            activeHelpKey: drawModePasteUnder
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4188
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4189
            label: 'Paste Under'
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4190
            labelImage: (ResourceRetriever ImageEditor pasteUnderIcon 'Paste Under')
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4191
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4192
            choiceValue: pasteUnder
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  4193
          )
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4194
         (MenuItem
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4195
            label: '-'
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4196
          )
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4197
         (MenuItem
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4198
            activeHelpKey: drawModeSpecial
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4199
            enabled: imageIsLoadedHolder
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4200
            label: 'Special'
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  4201
            labelImage: (ResourceRetriever ImageEditor specialRectangleIcon 'Special')
2592
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4202
            choice: editMode
9f52f9ca9b93 changed:
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
  4203
            choiceValue: specialOperation
1411
9daf7add7ea3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1406
diff changeset
  4204
          )
1196
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  4205
         )
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  4206
        nil
e2ced3798ed5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1146
diff changeset
  4207
        nil
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4208
      )
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  4209
3512
36cd31bca6a4 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3506
diff changeset
  4210
    "Modified: / 07-12-2017 / 15:30:46 / cg"
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4211
    "Modified: / 27-05-2018 / 10:41:20 / Claus Gittinger"
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4212
!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4213
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4214
previewMenu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4215
    "This resource specification was automatically generated
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4216
     by the MenuEditor of ST/X."
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4217
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4218
    "Do not manually edit this!! If it is corrupted,
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4219
     the MenuEditor may not be able to read the specification."
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4220
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4221
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4222
    "
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4223
     MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4224
     (Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4225
    "
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4226
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4227
    <resource: #menu>
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4228
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4229
    ^ 
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4230
     #(Menu
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4231
        (
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4232
         (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4233
            label: 'TileMode'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4234
            indication: tileModeHolder
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4235
          )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4236
         (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4237
            label: '-'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4238
          )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4239
         (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4240
            label: 'Background Color'
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4241
            submenu: 
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4242
           (Menu
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4243
              (
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4244
               (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4245
                  label: 'Gray'
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4246
                  choice: previewBackgroundColorHolder
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4247
                )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4248
               (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4249
                  label: 'Black'
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4250
                  choice: previewBackgroundColorHolder
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4251
                  choiceValue: black
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4252
                )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4253
               (MenuItem
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4254
                  label: 'White'
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4255
                  choice: previewBackgroundColorHolder
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4256
                  choiceValue: white
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4257
                )
1774
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4258
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4259
                  label: '-'
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4260
                )
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4261
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4262
                  label: 'Red'
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4263
                  choice: previewBackgroundColorHolder
1774
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4264
                  choiceValue: red
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4265
                )
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4266
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4267
                  label: 'Green'
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4268
                  choice: previewBackgroundColorHolder
1774
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4269
                  choiceValue: green
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4270
                )
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4271
               (MenuItem
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4272
                  label: 'Blue'
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4273
                  choice: previewBackgroundColorHolder
1774
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4274
                  choiceValue: blue
cb9832e71cae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  4275
                )
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4276
               )
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4277
              nil
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4278
              nil
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  4279
            )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4280
          )
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4281
         (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4282
            label: '-'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4283
          )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4284
         (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4285
            label: 'Magnification'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4286
            submenu: 
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4287
           (Menu
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4288
              (
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4289
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4290
                  label: '0.1'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4291
                  choice: previewMagnificationHolder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4292
                  choiceValue: 0.1
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4293
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4294
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4295
                  label: '0.25'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4296
                  choice: previewMagnificationHolder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4297
                  choiceValue: 0.25
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4298
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4299
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4300
                  label: '0.5'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4301
                  choice: previewMagnificationHolder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4302
                  choiceValue: 0.5
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4303
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4304
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4305
                  label: '1'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4306
                  choice: previewMagnificationHolder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4307
                  choiceValue: 1
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4308
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4309
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4310
                  label: '2'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4311
                  choice: previewMagnificationHolder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4312
                  choiceValue: 2
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4313
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4314
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4315
                  label: '4'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4316
                  choice: previewMagnificationHolder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4317
                  choiceValue: 4
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4318
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4319
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4320
                  label: '-'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4321
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4322
               (MenuItem
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4323
                  label: 'Choose...'
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4324
                  itemValue: changePreviewImageMagnification
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4325
                )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4326
               )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4327
              nil
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4328
              nil
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4329
            )
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4330
          )
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4331
         )
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4332
        nil
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4333
        nil
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  4334
      )
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4335
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  4336
    "Modified: / 10-09-2017 / 14:54:41 / cg"
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4337
!
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4338
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4339
toolsMenuToolbar
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4340
    "This resource specification was automatically generated
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4341
     by the MenuEditor of ST/X."
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
    "Do not manually edit this!! If it is corrupted,
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4344
     the MenuEditor may not be able to read the specification."
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4345
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4346
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4347
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4348
     MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4349
     (Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4350
    "
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4351
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4352
    <resource: #menu>
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4353
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4354
    ^ 
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4355
     #(Menu
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4356
        (
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4357
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4358
            activeHelpKey: drawModePoint
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  4359
            enabled: canDrawPointsHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4360
            label: 'Point'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4361
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4362
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4363
            labelImage: (ResourceRetriever ImageEditor pointIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4364
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4365
            choiceValue: point
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4366
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4367
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4368
            activeHelpKey: drawModeSpray
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  4369
            enabled: canSprayHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4370
            label: 'Spray'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4371
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4372
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4373
            labelImage: (ResourceRetriever ImageEditor sprayIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4374
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4375
            choiceValue: spray
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  4376
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4377
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4378
            activeHelpKey: drawModeBox
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  4379
            enabled: canDrawRectsHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4380
            label: 'Rect'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4381
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4382
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4383
            labelImage: (ResourceRetriever ImageEditor rectIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4384
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4385
            choiceValue: box
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4386
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4387
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4388
            activeHelpKey: drawModeFilledBox
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  4389
            enabled: canFillRectsHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4390
            label: 'FillRect'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4391
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4392
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4393
            labelImage: (ResourceRetriever ImageEditor fillRectIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4394
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4395
            choiceValue: filledBox
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4396
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4397
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4398
            activeHelpKey: drawModeCircle
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  4399
            enabled: canDrawCirclesHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4400
            label: 'Circle'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4401
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4402
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4403
            labelImage: (ResourceRetriever ImageEditor circleIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4404
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4405
            choiceValue: circle
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  4406
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4407
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4408
            activeHelpKey: drawModeFill
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  4409
            enabled: canFloodFillHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4410
            label: 'Fill'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4411
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4412
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4413
            labelImage: (ResourceRetriever ImageEditor fillIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4414
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4415
            choiceValue: fill
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4416
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4417
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4418
            activeHelpKey: drawModeCopy
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4419
            enabled: imageIsLoadedHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4420
            label: 'Copy'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4421
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4422
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4423
            labelImage: (ResourceRetriever ImageEditor copyIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4424
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4425
            choiceValue: copy
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4426
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4427
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4428
            activeHelpKey: drawModePasteWithMask
3377
6177e2e703fb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  4429
            enabled: imageIsLoadedAndNotReadonlyHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4430
            label: 'Paste With Mask'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4431
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4432
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4433
            labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4434
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4435
            choiceValue: pasteWithMask
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4436
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4437
         (MenuItem
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4438
            activeHelpKey: drawModePaste
3377
6177e2e703fb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  4439
            enabled: imageIsLoadedAndNotReadonlyHolder
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4440
            label: 'Paste Over'
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4441
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4442
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4443
            labelImage: (ResourceRetriever ImageEditor pasteIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4444
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4445
            choiceValue: paste
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4446
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4447
         (MenuItem
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4448
            activeHelpKey: drawModePasteMasked
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4449
            enabled: imageIsLoadedAndNotReadonlyHolder
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4450
            label: 'Paste Masked'
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4451
            translateLabel: true
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4452
            isButton: true
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4453
            labelImage: (ResourceRetriever ImageEditor pasteMaskedIcon)
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4454
            choice: editMode
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4455
            choiceValue: pasteMasked
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4456
          )
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4457
         (MenuItem
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4458
            activeHelpKey: drawModePasteUnder
3377
6177e2e703fb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  4459
            enabled: imageIsLoadedAndNotReadonlyHolder
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4460
            label: 'Paste Under'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4461
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4462
            isButton: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4463
            labelImage: (ResourceRetriever ImageEditor pasteUnderIcon)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4464
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4465
            choiceValue: pasteUnder
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4466
          )
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4467
         (MenuItem
3464
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4468
            activeHelpKey: drawModeCropSubImage 
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4469
            enabled: imageIsLoadedHolder
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4470
            label: 'Crop SubImage'
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4471
            translateLabel: true
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4472
            isButton: true
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4473
            labelImage: (ResourceRetriever ImageEditor cropSubImageIcon)
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4474
            choice: editMode
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4475
            choiceValue: cropSubImage
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4476
          )
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4477
         (MenuItem
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4478
            activeHelpKey: drawModeSpecial
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4479
            enabled: imageIsLoadedHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4480
            label: 'Special'
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4481
            translateLabel: true
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4482
            isButton: true
3419
dda4a17fdefc #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3418
diff changeset
  4483
            labelImage: (ResourceRetriever ImageEditor specialRectangleIcon)
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4484
            choice: editMode
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  4485
            choiceValue: specialOperation
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4486
          )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4487
         )
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4488
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4489
        nil
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  4490
      )
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  4491
3464
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  4492
    "Modified: / 24-08-2017 / 20:53:02 / cg"
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  4493
    "Modified: / 27-05-2018 / 10:45:31 / Claus Gittinger"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4494
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  4495
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4496
!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
  4497
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  4498
colorTableColumns
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4499
    "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
  4500
     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
  4501
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4502
    "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
  4503
     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
  4504
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4505
    "
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  4506
     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
  4507
    "
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4508
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4509
    <resource: #tableColumns>
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4510
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4511
    ^#(
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4512
      (DataSetColumnSpec
2174
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  4513
         activeHelpKey: ''
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4514
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4515
         rendererType: rowSelector
2712
cddda688a9f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
  4516
         backgroundSelector: theColorItself:
cddda688a9f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
  4517
         selectedBackgroundSelector: theColorItself:
1842
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4518
         isResizeable: false
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4519
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4520
      (DataSetColumnSpec
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4521
         label: 'R'
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4522
         labelAlignment: left
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4523
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4524
         columnAlignment: right
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4525
         editorType: InputField
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4526
         type: number
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4527
         model: redFromColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4528
         writeSelector: redAtColor:put:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4529
         selectSelector: canSelectRedInColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4530
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4531
      (DataSetColumnSpec
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4532
         label: 'G'
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4533
         labelAlignment: left
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4534
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4535
         columnAlignment: right
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4536
         editorType: InputField
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4537
         type: number
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4538
         model: greenFromColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4539
         writeSelector: greenAtColor:put:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4540
         selectSelector: canSelectGreenInColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4541
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4542
      (DataSetColumnSpec
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4543
         label: 'B'
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4544
         labelAlignment: left
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4545
         labelButtonType: Button
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4546
         columnAlignment: right
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4547
         editorType: InputField
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4548
         type: number
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4549
         model: blueFromColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4550
         writeSelector: blueAtColor:put:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4551
         selectSelector: canSelectBlueInColor:
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4552
       )
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4553
      )
2174
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  4554
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  4555
    "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
  4556
! !
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  4557
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4558
!ImageEditor methodsFor:'accessing'!
228524287573 intitial checkin
tz
parents:
diff changeset
  4559
228524287573 intitial checkin
tz
parents:
diff changeset
  4560
image
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4561
    "returns the current editing image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4562
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4563
    ^ imageEditView image
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4564
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4565
228524287573 intitial checkin
tz
parents:
diff changeset
  4566
postOpenAction: anAction
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4567
   "sets an action which is evaluated after opening"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4568
228524287573 intitial checkin
tz
parents:
diff changeset
  4569
    postOpenAction := anAction
1381
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  4570
!
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  4571
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  4572
resourceClass:aClass
30fedb56e7db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1380
diff changeset
  4573
    imageEditView resourceClass:aClass
3375
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  4574
!
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  4575
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  4576
savedFile
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  4577
    "if user did a save to file, return the filename.
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  4578
     Otherwise, this returns nil"
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  4579
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  4580
    ^ savedFile
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  4581
!
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  4582
3375
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  4583
savedImage
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  4584
    "if user did a save, return what was saved last.
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  4585
     Otherwise, this returns nil"
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  4586
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  4587
    ^ savedImage
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4588
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  4589
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4590
!ImageEditor methodsFor:'accessing-behavior'!
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4591
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4592
allowedToChangeImageDimension
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4593
    "used to edit an existing image's contents only (Expecco)"
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4594
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4595
    ^ self allowedToChangeImageDimensionAndDepth
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4596
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4597
    "Created: / 16-02-2017 / 01:59:21 / cg"
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4598
!
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  4599
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4600
allowedToChangeImageDimensionAndDepth
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4601
    "used to edit an existing image's contents only (Expecco)"
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4602
3378
7225434f9d46 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3377
diff changeset
  4603
    self readOnly ifTrue:[^ false].
2767
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4604
    ^ allowedToChangeImageDimensionAndDepth ? true
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4605
!
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4606
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4607
allowedToChangeImageDimensionAndDepth:aBoolean
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4608
    "used to edit an existing image's contents only (Expecco)"
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4609
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4610
    allowedToChangeImageDimensionAndDepth := aBoolean
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4611
! !
9db214621639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2766
diff changeset
  4612
1398
284781677ae1 category changes
Claus Gittinger <cg@exept.de>
parents: 1393
diff changeset
  4613
!ImageEditor methodsFor:'accessing-views'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4614
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4615
colorDataSetView
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4616
    "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
  4617
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  4618
    ^(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
  4619
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4620
    "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
  4621
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4622
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  4623
coordLabel
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4624
    "returns the view the coord label"
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  4625
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  4626
    ^self componentAt: #coordLabel
487
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  4627
!
6c336c183330 info bar as subSpec to class ToolApplicationModel moved
tz
parents: 475
diff changeset
  4628
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4629
imageEditView
3376
c508738114fa #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3375
diff changeset
  4630
    "returns the editor view of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4631
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4632
    imageEditView isNil ifTrue:[
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1583
diff changeset
  4633
        imageEditView := (self componentAt: #imageEditView) scrolledView.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4634
        imageEditView addDependent:self.
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4635
    ].
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  4636
    ^ imageEditView
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4637
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  4638
    "Modified: / 10.2.2000 / 23:19:20 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4639
!
228524287573 intitial checkin
tz
parents:
diff changeset
  4640
228524287573 intitial checkin
tz
parents:
diff changeset
  4641
imagePreView
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  4642
    "returns the preview of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4643
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4644
    |imagePreViewSubViews|
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4645
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4646
    imagePreViewSubViews := (self componentAt: #imagePreView) subViews.
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4647
2043
a816ef2ce516 #imagePreView
sr
parents: 2042
diff changeset
  4648
    "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
  4649
    imagePreViewSubViews isEmptyOrNil ifTrue:[
2043
a816ef2ce516 #imagePreView
sr
parents: 2042
diff changeset
  4650
        ^ nil
a816ef2ce516 #imagePreView
sr
parents: 2042
diff changeset
  4651
    ].
a816ef2ce516 #imagePreView
sr
parents: 2042
diff changeset
  4652
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  4653
    ^ imagePreViewSubViews first 
475
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  4654
! !
0d5a50fe59f4 default value of info label set
tz
parents: 468
diff changeset
  4655
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4656
!ImageEditor methodsFor:'actions'!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4657
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4658
applyCropAction
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4659
    self cropLeft:(self cropLeftAmount value) right:(self cropRightAmount value) 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4660
         top:(self cropTopAmount value) bottom:(self cropBottomAmount value)
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: / 17-02-2017 / 14:34:35 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4663
    "Modified: / 19-02-2017 / 15:11:41 / cg"
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
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4666
cropBottomNow
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4667
    self cropLeft:0 right:0 top:0 bottom:(self cropBottomAmount value)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4668
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4669
    "Created: / 19-02-2017 / 15:07:36 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4670
!
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
cropLeft:left right:right top:top bottom:bottom
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4673
    |img|
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4674
    
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4675
    img := imageEditView image.
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4676
    img isNil ifTrue:[^ self].
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
    true "firstChange" ifTrue:[
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4679
        imageEditView makeUndo.
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4680
        "/ firstChange := false.
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4681
    ].
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4682
    imageEditView
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4683
        makeSubImageX:left y:top 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4684
        width:(img width - left - right)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4685
        height:(img height - top - bottom).
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
    self updateImagePreView.
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4688
    self updateInfoLabel
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4689
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4690
    "Created: / 19-02-2017 / 15:07:58 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4691
!
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
cropLeftNow
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4694
    self cropLeft:(self cropLeftAmount value) right:0 top:0 bottom:0
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4695
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4696
    "Created: / 19-02-2017 / 15:08:06 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4697
!
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
cropRightNow
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4700
    self cropLeft:0 right:(self cropRightAmount value) top:0 bottom:0
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4701
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4702
    "Created: / 19-02-2017 / 15:08:12 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4703
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4704
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4705
cropTopNow
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4706
    self cropLeft:0 right:0 top:(self cropTopAmount value) bottom:0
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4707
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4708
    "Created: / 19-02-2017 / 15:08:29 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4709
! !
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4710
400
228524287573 intitial checkin
tz
parents:
diff changeset
  4711
!ImageEditor methodsFor:'aspects'!
228524287573 intitial checkin
tz
parents:
diff changeset
  4712
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  4713
activityInfoHolder
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  4714
    ^ self infoLabelHolder
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  4715
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  4716
    "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
  4717
!
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  4718
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4719
alphaHolder
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4720
    |holder|
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4721
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4722
    (holder := builder bindingAt:#alphaHolder) isNil ifTrue:[
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4723
        builder aspectAt:#alphaHolder put:(holder := 100 asValue).
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4724
        holder onChangeEvaluate:[ imageEditView drawingAlpha:holder value ].
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4725
    ].
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4726
    ^ holder
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4727
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4728
    "Created: / 05-09-2017 / 00:38:14 / cg"
3488
e9655ba452c7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3487
diff changeset
  4729
    "Modified: / 05-09-2017 / 10:47:01 / cg"
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4730
!
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4731
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4732
alphaText
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4733
    ^ 'alpha:'
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4734
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4735
    "Created: / 05-09-2017 / 00:32:55 / cg"
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4736
!
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4737
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4738
alphaVisibleHolder
3650
2fa5225d8d65 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3644
diff changeset
  4739
    ^ builder booleanValueAspectFor:#alphaVisibleHolder
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4740
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4741
    "Created: / 05-09-2017 / 00:35:36 / cg"
3650
2fa5225d8d65 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3644
diff changeset
  4742
    "Modified: / 09-03-2019 / 21:10:52 / Claus Gittinger"
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4743
!
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  4744
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4745
canAddColorToColormap
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4746
    |img|
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4747
    
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4748
    img := self image.
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4749
    img isNil ifTrue:[^ false].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4750
    img photometric == #blackIs0 ifTrue:[^ false].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4751
    img photometric == #whiteIs0 ifTrue:[^ false].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4752
    ^ true
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4753
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4754
    "Created: / 31-08-2017 / 18:32:27 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4755
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4756
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4757
canAddColorToColormapHolder
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4758
    ^ [self canAddColorToColormap]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4759
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4760
    "Created: / 31-08-2017 / 18:32:40 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4761
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4762
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4763
canChangeColorInColormap
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4764
    |img|
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4765
    
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4766
    img := self image.
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4767
    img isNil ifTrue:[^ false].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4768
    img photometric == #palette ifFalse:[^ false].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4769
    ^ true
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4770
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4771
    "Created: / 31-08-2017 / 18:34:12 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4772
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4773
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4774
canChangeColorInColormapHolder
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4775
    ^ [self canChangeColorInColormap]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4776
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4777
    "Created: / 31-08-2017 / 18:34:18 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4778
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4779
3378
7225434f9d46 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3377
diff changeset
  4780
canResizeImage
7225434f9d46 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3377
diff changeset
  4781
    ^ self imageIsLoadedAndNotReadonlyHolder
7225434f9d46 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3377
diff changeset
  4782
!
7225434f9d46 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3377
diff changeset
  4783
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4784
colorBoxVisibleHolder
3653
f66208efcf4b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3650
diff changeset
  4785
    ^ builder valueAspectFor:#colorBoxVisibleHolder initialValue:true
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4786
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4787
    "Created: / 03-02-2017 / 11:20:21 / cg"
3653
f66208efcf4b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3650
diff changeset
  4788
    "Modified: / 09-03-2019 / 22:18:00 / Claus Gittinger"
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4789
!
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4790
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4791
colorColumnAdaptor
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4792
    ^ self
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4793
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4794
    "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
  4795
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  4796
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4797
colorCropTabLabelList
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4798
    ^ resources array:(self colorCropTabSpecList collect:#first)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4799
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4800
    "Created: / 19-02-2017 / 14:58:25 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4801
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4802
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4803
colorCropTabSelectionIndexHolder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4804
    |holder|
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4805
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4806
    (holder := builder bindingAt:#colorCropTabSelectionIndexHolder) isNil ifTrue:[
3415
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4807
        builder aspectAt:#colorCropTabSelectionIndexHolder put:(holder := self defaultEditTabIndex asValue).
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4808
        holder onChangeSend:#colorCropTabSelectionIndexChanged to:self.
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4809
    ].
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4810
    ^ holder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4811
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4812
    "Created: / 19-02-2017 / 14:59:11 / cg"
3415
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4813
    "Modified: / 19-02-2017 / 23:33:39 / cg"
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4814
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4815
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4816
colorCropTabSpecList
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4817
    ^ #( 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4818
        ('Colors' colors)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4819
        ('Crop'   crop)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4820
        ('Fill'   fill)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4821
    )
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4822
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4823
    "Created: / 19-02-2017 / 15:34:33 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4824
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4825
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4826
colorCropTabSymbolList
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4827
    ^ self colorCropTabSpecList collect:#second
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4828
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4829
    "Created: / 19-02-2017 / 15:34:54 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4830
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4831
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4832
cropBottomAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4833
    ^ builder valueAspectFor:'cropBottomAmount' initialValue:1
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4834
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4835
    "Created: / 19-02-2017 / 15:09:09 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4836
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4837
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4838
cropBoxIsDialog
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4839
    ^ false
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4840
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4841
    "Created: / 03-02-2017 / 11:23:50 / cg"
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4842
    "Modified: / 19-02-2017 / 15:24:07 / cg"
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4843
!
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4844
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4845
cropBoxIsNotDialog
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4846
    ^ self cropBoxIsDialog not
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4847
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4848
    "Created: / 17-02-2017 / 14:38:04 / cg"
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4849
!
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4850
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4851
cropBoxVisibleHolder
3650
2fa5225d8d65 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3644
diff changeset
  4852
    ^ builder booleanValueAspectFor:#cropBoxVisibleHolder
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4853
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4854
    "Created: / 03-02-2017 / 11:20:13 / cg"
3650
2fa5225d8d65 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3644
diff changeset
  4855
    "Modified: / 09-03-2019 / 21:11:00 / Claus Gittinger"
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4856
!
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  4857
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4858
cropLeftAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4859
    ^ builder valueAspectFor:'cropLeftAmount' initialValue:1
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4860
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4861
    "Created: / 19-02-2017 / 15:09:23 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4862
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4863
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4864
cropRightAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4865
    ^ builder valueAspectFor:'cropRightAmount' initialValue:1
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4866
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4867
    "Created: / 19-02-2017 / 15:09:29 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4868
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4869
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4870
cropTopAmount
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4871
    ^ builder valueAspectFor:'cropTopAmount' initialValue:1
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4872
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4873
    "Created: / 19-02-2017 / 15:09:35 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4874
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4875
3415
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4876
defaultEditTabIndex
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4877
    "the default tab to show in the color/crop/fill tablist"
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4878
    
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4879
    ^ 1
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4880
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4881
    "Created: / 19-02-2017 / 23:34:12 / cg"
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4882
!
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  4883
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4884
drawingColor1Holder
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4885
    "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
  4886
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4887
    |holder|
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4888
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4889
    (holder := builder bindingAt:#drawingColor1Holder) isNil ifTrue:[
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4890
        builder aspectAt:#drawingColor1Holder put:(holder := IndirectValue new)
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4891
    ].
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4892
    ^ holder
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4893
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4894
    "Created: / 23-02-2017 / 10:18:25 / cg"
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4895
!
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4896
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4897
drawingColor2Holder
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4898
    "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
  4899
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4900
    |holder|
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4901
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4902
    (holder := builder bindingAt:#drawingColor2Holder) isNil ifTrue:[
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4903
        builder aspectAt:#drawingColor2Holder put:(holder := IndirectValue new)
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4904
    ].
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4905
    ^ holder
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4906
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4907
    "Created: / 23-02-2017 / 10:18:33 / cg"
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4908
!
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4909
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4910
floodFillBoxVisibleHolder
3650
2fa5225d8d65 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3644
diff changeset
  4911
    ^ builder booleanValueAspectFor:#floodFillBoxVisibleHolder
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4912
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4913
    "Created: / 19-02-2017 / 15:28:40 / cg"
3650
2fa5225d8d65 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3644
diff changeset
  4914
    "Modified: / 09-03-2019 / 21:11:11 / Claus Gittinger"
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4915
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  4916
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4917
floodFillMaxHueError
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4918
    |holder|
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4919
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4920
    (holder := builder bindingAt:#floodFillMaxHueError) isNil ifTrue:[
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4921
        builder aspectAt:#floodFillMaxHueError put:(holder := 0 asValue).
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4922
        holder onChangeEvaluate:[ imageEditView floodFillMaxHueError:holder value ].
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4923
    ].
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4924
    ^ holder
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4925
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4926
    "Created: / 17-02-2017 / 15:19:17 / cg"
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4927
!
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4928
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4929
floodFillMaxLightError
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4930
    |holder|
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4931
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4932
    (holder := builder bindingAt:#floodFillMaxLightError) isNil ifTrue:[
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4933
        builder aspectAt:#floodFillMaxLightError put:(holder := 0 asValue).
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4934
        holder onChangeEvaluate:[ imageEditView floodFillMaxLightError:holder value ].
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4935
    ].
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4936
    ^ holder
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4937
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4938
    "Created: / 17-02-2017 / 15:19:11 / cg"
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4939
!
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  4940
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4941
hasClassAndSelectorDefinedHolder
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4942
    ^ [
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  4943
        |cls|
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  4944
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  4945
        (cls := imageEditView resourceClass) notNil
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  4946
        and:[imageEditView resourceSelector notNil]
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4947
      ]
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4948
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4949
    "Created: / 04-07-2010 / 10:11:10 / cg"
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4950
!
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4951
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4952
hasClassDefinedHolder
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4953
    ^ [
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  4954
        imageEditView resourceClass notNil
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  4955
      ]
933
f090206aadff disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  4956
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4957
    "Created: / 04-07-2010 / 10:11:47 / cg"
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4958
!
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4959
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4960
hasColorSelectedHolder
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  4961
    ^ [ self selectedColors value notEmptyOrNil "self selectedColorIndexOrNil notNil" ]
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4962
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4963
    "Created: / 04-07-2010 / 10:12:22 / cg"
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  4964
!
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  4965
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4966
hasColormap
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4967
    "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
  4968
    
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4969
    |img|
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4970
    
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4971
    ^ (img := self image) notNil 
3598
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  4972
        and:[img colorMap notNil 
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  4973
                or:[ drawingColormap notNil 
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  4974
                or:[ self listOfColors notEmptyOrNil ]]]
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4975
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4976
    "Created: / 30-09-1998 / 23:53:55 / cg"
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  4977
    "Modified: / 23-02-2017 / 09:57:45 / cg"
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4978
    "Modified (comment): / 31-08-2017 / 18:36:08 / cg"
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4979
!
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  4980
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  4981
hasColormapAndColorSelected
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  4982
    ^ [ self hasColormap and:[self hasColorSelectedHolder value]]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  4983
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  4984
    "Modified: / 31-08-2017 / 14:08:20 / cg"
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4985
!
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  4986
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  4987
hasColormapAndSingleColorSelected
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4988
    ^ self hasColormapHolder value and:[self hasSingleColorSelectedHolder value]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4989
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4990
    "Modified: / 31-08-2017 / 18:44:49 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4991
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4992
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4993
hasColormapAndSingleColorSelectedHolder
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4994
    ^ [ self hasColormapAndSingleColorSelected value ]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4995
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4996
    "Created: / 31-08-2017 / 18:44:36 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4997
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4998
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  4999
hasColormapAndSingleWritableColorSelectedHolder
3553
31631af8baf9 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3552
diff changeset
  5000
    ^ [ self hasColormapAndSingleColorSelected 
31631af8baf9 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3552
diff changeset
  5001
    and:[self canChangeColorInColormap ]]
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5002
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5003
    "Created: / 31-08-2017 / 18:42:46 / cg"
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5004
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5005
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5006
hasColormapHolder
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5007
    "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
  5008
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5009
    ^ [self hasColormap]
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5010
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5011
    "Created: / 04-07-2010 / 10:13:05 / cg"
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5012
    "Modified (comment): / 31-08-2017 / 18:36:47 / cg"
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5013
!
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5014
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5015
hasSingleColorSelectedHolder
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5016
    ^ [ self selectedColors value size == 1 "self selectedColorIndexOrNil notNil" ]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5017
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5018
    "Created: / 04-07-2010 / 10:12:22 / cg"
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5019
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5020
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  5021
hasWritableColorSelectedHolder
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  5022
    ^ [ self hasSingleColorSelectedHolder value and:[self canChangeColorInColormap ]]
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  5023
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  5024
    "Created: / 08-10-2017 / 14:45:11 / cg"
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  5025
!
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  5026
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5027
imageHasColormap
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5028
    "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
  5029
    
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5030
    |img|
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5031
    
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5032
    ^ (img := self image) notNil 
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5033
        and:[img colorMap notNil ]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5034
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5035
    "Created: / 31-08-2017 / 18:36:25 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5036
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5037
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5038
imageHasColormapHolder
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5039
    ^ [self imageHasColormap]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5040
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5041
    "Created: / 31-08-2017 / 18:36:42 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5042
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5043
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5044
imageHasImageSequence
3080
918f79c8b30d class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3066
diff changeset
  5045
    |img|
918f79c8b30d class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3066
diff changeset
  5046
918f79c8b30d class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3066
diff changeset
  5047
    ^ (img := self image) notNil and:[img imageSequence notNil]
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5048
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5049
    "Created: / 21-10-2010 / 14:35:45 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5050
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5051
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5052
imageHasImageSequenceHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5053
    |holder|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5054
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5055
    (holder := builder bindingAt:#imageHasImageSequenceHolder) isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5056
        builder aspectAt:#imageHasImageSequenceHolder put:(holder := false asValue).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5057
        holder value:(self imageHasImageSequence).    
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5058
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5059
    ^ holder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5060
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5061
    "Modified: / 21-10-2010 / 14:36:57 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5062
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5063
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5064
imageHasMaskAndIsNotReadOnlyHolder
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5065
    "returns whether an image is loaded and editable as value holder"
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5066
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5067
    ^ BlockValue
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5068
        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
  5069
        argument:(self imageIsLoadedHolder)
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5070
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5071
    "Created: / 16-02-2017 / 12:17:25 / cg"
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5072
!
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5073
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5074
imageHasNextImage
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5075
    ^ self imageHasImageSequence and:[ (imageSeqNr ? 1) < self image imageSequence size ]
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5076
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5077
    "Created: / 21-10-2010 / 14:37:10 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5078
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5079
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5080
imageHasNextImageHolder
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5081
    |holder|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5082
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5083
    (holder := builder bindingAt:#imageHasNextImageHolder) isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5084
        builder aspectAt:#imageHasNextImageHolder put:(holder := false asValue).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5085
        holder value:(self imageHasNextImage).    
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5086
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5087
    ^ holder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5088
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5089
    "Modified: / 21-10-2010 / 14:37:40 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5090
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5091
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5092
imageHasPreviousImage
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5093
    ^ self imageHasImageSequence and:[ (imageSeqNr ? 1) > 1 ]
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5094
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5095
    "Created: / 21-10-2010 / 14:37:21 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5096
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5097
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5098
imageHasPreviousImageHolder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5099
    |holder|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5100
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5101
    (holder := builder bindingAt:#imageHasPreviousImageHolder) isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5102
        builder aspectAt:#imageHasPreviousImageHolder put:(holder := false asValue).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5103
        holder value:(self imageHasPreviousImage).    
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5104
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5105
    ^ holder
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5106
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5107
    "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
  5108
!
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  5109
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5110
imageInfoHolder
3653
f66208efcf4b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3650
diff changeset
  5111
    ^ builder valueAspectFor:#imageInfoHolder initialValue:''
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5112
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5113
    "Modified: / 04-07-2010 / 10:15:14 / cg"
3653
f66208efcf4b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3650
diff changeset
  5114
    "Modified: / 09-03-2019 / 22:18:11 / Claus Gittinger"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5115
!
228524287573 intitial checkin
tz
parents:
diff changeset
  5116
228524287573 intitial checkin
tz
parents:
diff changeset
  5117
listOfColors
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  5118
    "returns the list of colors"
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  5119
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  5120
    |list|
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  5121
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  5122
    (list := builder bindingAt:#listOfColors) isNil ifTrue:[
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  5123
        builder aspectAt:#listOfColors put:(list :=  List new).
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  5124
        list addDependent:self.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5125
    ].
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  5126
    ^ list
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5127
!
228524287573 intitial checkin
tz
parents:
diff changeset
  5128
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5129
magnificationHolder
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5130
    "returns current magnification of the image as an AspectAdaptor"
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5131
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5132
    |holder|
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5133
    (holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5134
        builder aspectAt:#valueOfMagnification put:(
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5135
        holder := AspectAdaptor new subject:self; forAspect:#magnification)
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5136
    ].
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5137
    ^ holder
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5138
!
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5139
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5140
penWidthHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5141
    |holder|
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5142
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5143
    (holder := builder bindingAt:#penWidthHolder) isNil ifTrue:[
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5144
        builder aspectAt:#penWidthHolder put:(holder := imageEditView penWidth asValue).
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5145
        holder onChangeSend:#penWidthHolderChanged to:self.
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5146
    ].
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5147
    ^ holder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5148
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5149
    "Created: / 15-02-2012 / 22:30:58 / cg"
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5150
!
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5151
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5152
previewBackgroundColorHolder
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5153
    |holder|
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5154
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5155
    (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
  5156
        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
  5157
        holder addDependent:self.
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5158
    ].
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5159
    ^ holder
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5160
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5161
    "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
  5162
!
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5163
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5164
previewMagnificationHolder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5165
    |holder|
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5166
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5167
    (holder := builder bindingAt:#previewMagnificationHolder) isNil ifTrue:[
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5168
        builder aspectAt:#previewMagnificationHolder put:(holder := 1 asValue).
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5169
        holder addDependent:self.
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5170
    ].
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5171
    ^ holder
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5172
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5173
    "Created: / 10-09-2017 / 14:10:07 / cg"
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5174
!
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5175
3377
6177e2e703fb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  5176
readOnly
6177e2e703fb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  5177
    ^ false
6177e2e703fb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  5178
!
6177e2e703fb #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3376
diff changeset
  5179
3425
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  5180
saveButtonInToolbarVisibleHolder
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  5181
    ^ false
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  5182
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  5183
    "Created: / 26-02-2017 / 22:58:41 / cg"
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  5184
!
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  5185
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5186
selectedColors
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5187
    "returns a valueHolder for the current set of selected colors."
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5188
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5189
    |holder|
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5190
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5191
    (holder := builder bindingAt:#selectedColors) isNil ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5192
        builder aspectAt:#selectedColors put:(holder := nil asValue).
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5193
        holder onChangeSend:#selectedColorsChanged to:self.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5194
    ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5195
    ^ holder
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5196
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5197
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5198
selectionOfColor
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5199
    "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
  5200
     Here, an AspectAdaptor which accesses selectedColorIndex is returned."
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5201
228524287573 intitial checkin
tz
parents:
diff changeset
  5202
    |holder|
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5203
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5204
    (holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[
228524287573 intitial checkin
tz
parents:
diff changeset
  5205
        builder aspectAt:#selectionOfColor put:(
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  5206
        holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex ).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5207
    ].
228524287573 intitial checkin
tz
parents:
diff changeset
  5208
    ^ holder
228524287573 intitial checkin
tz
parents:
diff changeset
  5209
!
228524287573 intitial checkin
tz
parents:
diff changeset
  5210
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5211
spraySpotHolder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5212
    |holder|
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5213
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5214
    (holder := builder bindingAt:#spraySpotHolder) isNil ifTrue:[
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5215
        builder aspectAt:#spraySpotHolder put:(holder := imageEditView spraySpot asValue).
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5216
        holder onChangeSend:#spraySpotHolderChanged to:self.
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5217
    ].
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5218
    ^ holder
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5219
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5220
    "Created: / 15-02-2012 / 22:36:38 / cg"
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5221
!
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  5222
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5223
tileModeHolder
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5224
    |holder|
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5225
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5226
    (holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5227
        builder aspectAt:#tileModeHolder put:(holder := false asValue).
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5228
        holder addDependent:self.
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5229
    ].
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5230
    ^ holder
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5231
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5232
    "Modified: / 21-10-2010 / 14:35:24 / cg"
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5233
!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5234
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5235
valueOfMagnification
2308
60722577a10a Mark obsolete methods
Stefan Vogel <sv@exept.de>
parents: 2272
diff changeset
  5236
    <resource: #obsolete>
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5237
    "returns current magnification of the image as an AspectAdaptor"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5238
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5239
    self obsoleteMethodWarning:'stupid method name - use #magnificationHolder'.
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5240
    ^ self magnificationHolder
400
228524287573 intitial checkin
tz
parents:
diff changeset
  5241
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  5242
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5243
!ImageEditor methodsFor:'change & update'!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5244
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5245
changePreviewImageMagnification
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5246
    |mag|
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5247
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5248
    mag := Dialog request:'Magnification?' initialAnswer:self imagePreView magnificationFactor.
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5249
    mag isEmptyOrNil ifTrue:[^ self].
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5250
    mag := Number readFrom:mag onError:nil.
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5251
    mag isNil ifTrue:[^ self].
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5252
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5253
    self previewMagnificationHolder value:mag
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5254
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5255
    "Created: / 10-09-2017 / 14:52:52 / cg"
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5256
!
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5257
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5258
colorCropTabSelectionIndexChanged
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5259
    |selIndex sym|
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5260
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5261
    selIndex := self colorCropTabSelectionIndexHolder value.
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5262
    sym := self colorCropTabSymbolList at:selIndex.
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5263
    
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5264
    self colorBoxVisibleHolder value:(sym == #colors).
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5265
    self cropBoxVisibleHolder value:(sym == #crop).
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5266
    self floodFillBoxVisibleHolder value:(sym == #fill).
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5267
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5268
    "Created: / 19-02-2017 / 15:01:05 / cg"
3443
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
  5269
    "Modified: / 21-04-2017 / 16:05:51 / cg"
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5270
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  5271
3433
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5272
colorMapModeFromImage:anImage
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5273
    "retrieves the colorMapMode for an image"
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5274
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5275
    |image colorMapModeKey|
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5276
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5277
    image := self image.
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5278
    image isNil ifTrue:[^ nil ].
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5279
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5280
    image mask notNil ifTrue: [             
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5281
        colorMapModeKey := 'masked'.
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5282
    ] ifFalse:[
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5283
        colorMapModeKey := 'depth'.
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5284
    ].
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5285
    colorMapModeKey := (colorMapModeKey , image depth printString) asSymbol.
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5286
    ^ colorMapModeKey
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5287
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5288
    "Created: / 06-04-2017 / 13:19:19 / cg"
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5289
!
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5290
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5291
findColorMapMode
899
43b744c647ba comment grammar
tz
parents: 898
diff changeset
  5292
    "finds the colorMapMode for a new image"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5293
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5294
    |image newListOfColors colorMapModeKey drawColor1 drawColor2 someOrAllUsedColors|
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  5295
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  5296
    image := self image.
3433
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5297
    (colorMapModeKey := self colorMapModeFromImage:image) isNil ifTrue:[^ self].
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  5298
1967
c95484b7da49 some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1966
diff changeset
  5299
    self colorMapMode setValue:colorMapModeKey.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5300
3359
258a64461215 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3357
diff changeset
  5301
    image photometric == #palette ifTrue:[
258a64461215 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3357
diff changeset
  5302
        image colorMap isNil ifTrue:[
258a64461215 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3357
diff changeset
  5303
            image depth > 16 ifTrue:[
258a64461215 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3357
diff changeset
  5304
                image photometric:#rgb
258a64461215 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3357
diff changeset
  5305
            ].
258a64461215 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3357
diff changeset
  5306
        ].
258a64461215 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3357
diff changeset
  5307
    ].
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5308
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5309
    image depth > 12 ifTrue:[
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5310
        newListOfColors := OrderedCollection new.
2870
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  5311
        (image depth > 16 or:[image colorMap isEmptyOrNil]) ifTrue:[
1927
c5068006116d colors of deep images
Claus Gittinger <cg@exept.de>
parents: 1926
diff changeset
  5312
            someOrAllUsedColors := image usedColorsMax:10000.
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5313
            someOrAllUsedColors notNil ifTrue:[
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5314
                someOrAllUsedColors := someOrAllUsedColors asArray.
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5315
                someOrAllUsedColors sort:self sortBlockForColors.
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5316
                newListOfColors addAll:someOrAllUsedColors.
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5317
                "/ listOfColors add:Color black; add:Color white.
3317
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  5318
            ].
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  5319
            image mask notNil ifTrue:[
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  5320
                newListOfColors := (Array with:(Color noColor)),newListOfColors.
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  5321
            ].
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  5322
        ] ifFalse:[
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5323
            newListOfColors addAll:(image colorMap).
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5324
        ].
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5325
    ] ifFalse:[
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5326
        newListOfColors := OrderedCollection withAll:(self listOfColors).
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5327
        newListOfColors isEmpty ifTrue:[   
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5328
            self colorMapMode: colorMapMode value.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5329
            image := self image.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5330
        ].                               
3317
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  5331
        "/ image mask notNil ifTrue:[
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  5332
        "/     newListOfColors := (Array with:(Color noColor)),newListOfColors.
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  5333
        "/ ].
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5334
    ].  
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5335
    newListOfColors notEmptyOrNil ifTrue:[
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5336
        drawColor1 := newListOfColors at:1.
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5337
        drawColor2 := newListOfColors at:2 ifAbsent:drawColor1.
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5338
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5339
        self hasTransparentColorInColorList ifTrue: [             
3367
033c21371bea #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 3359
diff changeset
  5340
            (newListOfColors includes:(Color colorId:0)) ifFalse:[
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5341
                newListOfColors addFirst:(Color colorId:0).
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5342
                drawColor1 := newListOfColors at:2. 
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5343
                drawColor2 := newListOfColors at:3 ifAbsent:drawColor1.
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5344
            ]
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  5345
        ].
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5346
"/        imageEditView drawingColors:(Array with: drawColor1 with: drawColor2).
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5347
"/        self selectionOfColor 
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5348
"/            setValue: 0;
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5349
"/            value: (listOfColors indexOf: imageEditView selectedColor).
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5350
    ].
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5351
    self listOfColors asOrderedCollection ~= newListOfColors ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5352
        self listOfColors contents:newListOfColors.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5353
    ].
2870
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  5354
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5355
    "Modified: / 05-09-2017 / 09:03:31 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5356
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5357
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5358
selectedColorsChanged
3408
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5359
    |colorIndices selectedIndex|
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5360
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5361
    (colorIndices := self selectedColors value) size == 1 ifTrue:[        
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5362
        "/ a single color selected
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5363
        selectedIndex := colorIndices first
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5364
    ].    
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5365
    self selectionOfColor value:selectedIndex
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5366
86d2e0cd4970 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3407
diff changeset
  5367
    "Modified: / 17-02-2017 / 14:40:33 / cg"
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5368
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5369
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5370
update:something with:aParameter from:changedObject
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5371
    |clrIndex image imagePreView clr changedColor cMap|
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5372
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5373
    image := self image.
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  5374
    imagePreView := self imagePreView.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5375
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5376
    changedObject == self tileModeHolder ifTrue:[
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5377
        image isNil ifTrue:[
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5378
            ^ self
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5379
        ].
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5380
        imagePreView
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5381
            tileMode:(changedObject value) tileOffset:(image extent);
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5382
            clear;
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5383
            invalidate.
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5384
        ^ self
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5385
    ].
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5386
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5387
    changedObject == self previewBackgroundColorHolder ifTrue:[
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5388
        clr := changedObject value isNil
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5389
                    ifTrue:[imageEditView viewBackground]
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5390
                    ifFalse:[Color perform:changedObject value].
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5391
        imagePreView
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5392
            viewBackground:clr;
3493
4396fb652bd7 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3492
diff changeset
  5393
            clear;
1764
7e9b804fd2d9 changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents: 1762
diff changeset
  5394
            invalidate.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5395
        ^ self
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5396
    ].
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5397
    changedObject == self previewMagnificationHolder ifTrue:[
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5398
        imagePreView
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5399
            magnificationFactor:(self previewMagnificationHolder value);
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5400
            clear;
3493
4396fb652bd7 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3492
diff changeset
  5401
            invalidate.
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5402
        ^ self
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5403
    ].
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5404
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5405
    changedObject == self listOfColors ifTrue:[
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5406
        something == #at: ifTrue:[
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5407
            "/ colormap entry changed at aParameter
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5408
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5409
            clrIndex := aParameter.
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5410
            (self hasTransparentColorInColorList) ifTrue:[
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5411
                clrIndex := clrIndex - 1.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5412
            ].
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5413
            changedColor := changedObject at:aParameter.
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5414
            cMap := image colorMap.
3407
2e0024e012e9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3405
diff changeset
  5415
            (cMap notNil and:[cMap isFixedPalette not]) ifTrue:[
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5416
                image colorMap at:clrIndex put:changedColor.
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5417
                self colorMapChanged.
3430
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5418
            ] ifFalse:[
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5419
                drawingColormap notNil ifTrue:[
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5420
                    drawingColormap size < clrIndex ifTrue:[
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5421
                        |newDrawingColormap|
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5422
3430
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5423
                        newDrawingColormap := drawingColormap species new:clrIndex.
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5424
                        newDrawingColormap replaceFrom:1 with:drawingColormap.
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5425
                        drawingColormap := newDrawingColormap.
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5426
                    ].
3430
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5427
                    drawingColormap at:clrIndex put:changedColor.
9b5190f88556 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3427
diff changeset
  5428
                ].
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5429
            ].
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5430
            ^ self
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5431
        ].
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  5432
        ^ self
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5433
    ].
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5434
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5435
    changedObject == imageEditView undoImages ifTrue:[
1987
3889bd6912fb valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1985
diff changeset
  5436
        self canUndoHolder value:(changedObject notEmpty).
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5437
        ^ self
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5438
    ].
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  5439
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5440
    changedObject == imageEditView ifTrue:[
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5441
        something == #imageColors ifTrue:[
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5442
            self updateListOfColorsAndColormapMode.
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5443
            ^ self
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5444
        ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5445
        something == #image ifTrue:[
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5446
            self updateAfterImageChange.
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5447
            imagePreView image:image scroll:false.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5448
            self updateListOfColorsAndColormapMode.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5449
            self tileModeHolder value ifTrue:[
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5450
                imagePreView tileMode:true tileOffset:(image extent).
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5451
            ].
3460
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  5452
            self updateInfoLabel.
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5453
            ^ self
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5454
        ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5455
        something == #subImageIn ifTrue:[
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5456
            imagePreView image ~~ image ifTrue:[
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  5457
                self error:'internal error' mayProceed:true.
1406
6de5c78f5bcd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1405
diff changeset
  5458
            ].
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5459
            self tileModeHolder value ifTrue:[
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  5460
                imagePreView invalidate.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5461
            ] ifFalse:[
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  5462
                imagePreView invalidate:aParameter.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  5463
            ].
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5464
            ^ self
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5465
        ].
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  5466
        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
  5467
            (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
  5468
                "/ no color/mask */
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  5469
                "/ self halt.
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5470
                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
  5471
            ] ifFalse:[
f04fe34d10ac do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents: 1820
diff changeset
  5472
                clrIndex := self listOfColors indexOf:aParameter.
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  5473
            ].
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5474
            self selectedColors value:{clrIndex}. "/ selectionOfColor value:clrIndex.
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5475
            ^ self
1491
4249a6a1b252 pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents: 1490
diff changeset
  5476
        ].
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5477
        ^ self
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5478
    ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5479
1880
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  5480
    changedObject == imageEditView modifiedHolder ifTrue:[
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  5481
        "/ self halt:'to be implemented'.
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  5482
        ^ self
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  5483
    ].
8a11bb0a86e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  5484
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5485
    changedObject == imageEditView image ifTrue:[
2042
963042f2c474 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2016
diff changeset
  5486
        "/ self halt:'to be implemented'.
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5487
        self updateAfterImageChange.
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  5488
        ^ self
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5489
    ].
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  5490
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5491
    super update:something with:aParameter from:changedObject
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5492
3493
4396fb652bd7 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3492
diff changeset
  5493
    "Modified: / 13-09-2017 / 18:01:26 / cg"
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5494
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5495
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5496
updateAfterImageChange
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5497
    |img|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5498
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5499
    (img := self image) notNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5500
        img := img onDevice:device.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5501
        self updateColorsFromImage:img.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5502
        self findColorMapMode.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5503
        self updateLabelsAndHistory.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5504
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5505
        imageSeqNr isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5506
            imageSeqNr := 1
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5507
        ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5508
        self imageHasImageSequenceHolder value:(self imageHasImageSequence).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5509
        self imageHasNextImageHolder value:(self imageHasNextImage).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5510
        self imageHasPreviousImageHolder value:(self imageHasPreviousImage).
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5511
        self alphaVisibleHolder value:(img hasAlphaChannel).
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5512
    ] ifFalse:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5513
        self updateForNoImage
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5514
    ].
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5515
    self window label:(self constructWindowTitle).
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5516
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5517
    "Modified: / 05-09-2017 / 00:44:10 / cg"
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5518
    "Modified: / 27-05-2018 / 11:32:01 / Claus Gittinger"
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5519
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5520
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  5521
updateColorsFromImage:image
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5522
    |colors depth|
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5523
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5524
    depth := image depth.
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5525
    
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5526
    depth > 16 ifTrue:[
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5527
        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
  5528
    ] ifFalse:[
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5529
        ((image photometric == #blackIs0)
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5530
        or:[ image photometric == #whiteIs0 ]) ifTrue:[
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5531
            depth <= 8 ifTrue:[
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5532
                colors := 1 to:(1 << depth) collect:[:i | image colorFromValue:i-1]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5533
            ].
2870
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  5534
        ].
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5535
        colors isNil ifTrue:[
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5536
            colors := image colorMap.
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5537
            colors isNil ifTrue:[
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5538
                Error handle:[:ex |
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5539
                    colors := OrderedCollection new.
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5540
                ] do:[
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5541
                    colors := image usedColors asSet.
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5542
                ].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5543
            ].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5544
        ].
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5545
    ].    
1904
46a0b109cb47 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1900
diff changeset
  5546
    self listOfColors contents:(colors asOrderedCollection).
2870
0f130285be97 changed:
Claus Gittinger <cg@exept.de>
parents: 2866
diff changeset
  5547
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  5548
    "Modified: / 31-08-2017 / 18:54:53 / cg"
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  5549
!
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  5550
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  5551
updateForNoImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5552
    "updates channels and view, if image is loaded"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5553
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5554
    self imageIsLoadedHolder value: false.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5555
    self listOfColors removeAll.
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5556
    self imagePreView image: nil.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  5557
    self imageHasImageSequenceHolder value:false.
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5558
    self alphaVisibleHolder value:false.
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5559
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5560
    "Modified: / 05-09-2017 / 00:44:20 / cg"
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5561
    "Modified: / 27-05-2018 / 11:32:06 / Claus Gittinger"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5562
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5563
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5564
updateLabelsAndHistory
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5565
    "updates labels and history, if something has changed"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5566
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5567
    |image rsrcClass rsrcSelector imgFile|
1910
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  5568
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  5569
    image := self image.
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  5570
2792
f056aa5d29a7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  5571
    self imageIsLoadedHolder value: image notNil.
1910
4ca9f4b322c9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
  5572
    image isNil ifTrue: [^nil].
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5573
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5574
    self updateInfoLabel.
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5575
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5576
    ((rsrcClass := imageEditView resourceClass) notNil 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5577
    and:[ (rsrcSelector := imageEditView resourceSelector) notNil ]) ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5578
        self addHistoryEntryForClass:rsrcClass selector:rsrcSelector.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5579
    ] ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5580
        (imgFile := image fileName) notNil ifTrue: [
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5581
            self addHistoryEntryForFile:imgFile.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5582
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5583
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5584
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  5585
    "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
  5586
!
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5587
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5588
updateListOfColorsAndColormapMode
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5589
    |listOfColors selectedColor colorMap image|
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5590
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5591
    selectedColor := self selectedColorOrNil.
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5592
    listOfColors := self listOfColors.
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5593
    
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5594
    image := self image.
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5595
    image isNil ifTrue:[
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5596
        listOfColors removeAll.
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5597
    ] ifFalse:[
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5598
        colorMap := image colorMap.
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5599
        colorMap notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5600
            (colorMap size <= 4096) ifTrue:[
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5601
                (image mask notNil or:[image hasAlphaChannel]) ifTrue:[
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5602
                    colorMap := (Array with:(Color noColor)),colorMap.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5603
                ].
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5604
                listOfColors contents:colorMap.
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5605
            ] ifFalse:[
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5606
                listOfColors removeAll.
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5607
                colorMap isFixedPalette ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5608
                    image colorMap:nil.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5609
                    image photometric:#rgb.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5610
                    image samplesPerPixel:3.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5611
                    
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5612
                    image bitsPerSample:(Array 
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5613
                                            with:(colorMap bitsRed)
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5614
                                            with:(colorMap bitsGreen)
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5615
                                            with:(colorMap bitsBlue)).
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5616
                ].
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  5617
            ]
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5618
        ].
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5619
    ].
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  5620
    self findColorMapMode.
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5621
    selectedColor notNil ifTrue:[
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5622
        self selectColor:selectedColor.
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  5623
    ].
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5624
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  5625
    "Modified: / 05-09-2017 / 08:25:14 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5626
! !
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5627
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5628
!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
  5629
1951
9ad40a628278 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  5630
atColor:anOldColor put:newColor
1952
73a141744891 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1951
diff changeset
  5631
    "a color changed to a new color"
73a141744891 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1951
diff changeset
  5632
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5633
    |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
  5634
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5635
    list  := self listOfColors.
1951
9ad40a628278 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  5636
    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
  5637
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5638
    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
  5639
    index ~~ 0 ifTrue:[
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5640
        oldColor := list at:index.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5641
        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
  5642
    ] ifFalse:[
1740
5c0b60e76676 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1734
diff changeset
  5643
        self error:'internal error' mayProceed:true.
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5644
        list add:newColor
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5645
    ].
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5646
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5647
    image := self image.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5648
    (image colorMap isNil 
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5649
    and:[drawingColormap isNil]) ifTrue:[
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5650
        oldColor notNil ifTrue:[
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5651
            imageEditView makeUndo.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5652
            newImage := image copy.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5653
            newImage
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5654
                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
  5655
                do:[:x :y :clr |
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5656
                    |newClr|
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5657
1951
9ad40a628278 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  5658
                    newClr := (clr = oldColor) ifTrue:[newColor] ifFalse:[clr].
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5659
                    newImage colorAtX:x y:y put:newClr
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5660
                ].
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5661
            imageEditView image:newImage.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5662
            imageEditView setModified.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5663
            self updateImage.
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5664
            self updateImagePreView.
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5665
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  5666
            self selectedColors value:{oldSel}.
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5667
            imageEditView selectedColorIndex:oldSel.
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  5668
            imageEditView selectedColor:(self listOfColors at:oldSel).
1928
06c3681a79b3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1927
diff changeset
  5669
        ]
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5670
    ].
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5671
!
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5672
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5673
blueAtColor:aColor put:newBlue
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5674
    "helper used to return a new row element, when blue is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5675
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5676
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5677
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5678
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5679
    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
  5680
    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
  5681
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5682
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5683
             put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5684
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5685
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5686
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
  5687
    "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
  5688
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  5689
    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
  5690
    ^ 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
  5691
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5692
    "Created: / 26.7.1998 / 12:30:35 / cg"
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  5693
    "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
  5694
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5695
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5696
canSelectBlueInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5697
    ^ aColor blueByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5698
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5699
    "Created: / 7.8.1998 / 22:50:34 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5700
    "Modified: / 7.8.1998 / 22:52:57 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5701
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5702
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5703
canSelectGreenInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5704
    ^ aColor greenByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5705
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5706
    "Created: / 7.8.1998 / 22:50:22 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5707
    "Modified: / 7.8.1998 / 22:52:46 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5708
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5709
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5710
canSelectRedInColor:aColor
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5711
    ^ aColor redByte notNil
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5712
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5713
    "Created: / 7.8.1998 / 22:50:00 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5714
    "Modified: / 7.8.1998 / 22:51:03 / cg"
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5715
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  5716
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5717
greenAtColor:aColor put:newGreen
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5718
    "helper used to return a new row element, when green is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5719
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5720
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5721
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5722
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5723
    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
  5724
    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
  5725
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5726
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5727
             put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5728
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5729
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5730
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
  5731
    "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
  5732
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  5733
    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
  5734
    ^ 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
  5735
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5736
    "Created: / 26.7.1998 / 12:30:29 / cg"
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  5737
    "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
  5738
!
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5739
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5740
redAtColor:aColor put:newRed
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5741
    "helper used to return a new row element, when red is changed"
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5742
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5743
    |byte|
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5744
1611
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5745
    aColor isNil ifTrue:[^ self].       "/ mask cannot be changed
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5746
    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
  5747
    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
  5748
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5749
    self atColor:aColor
2f23751929d6 behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents: 1603
diff changeset
  5750
             put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)).
942
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5751
!
4b47d3d652ad checkin from browser
tz
parents: 941
diff changeset
  5752
915
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5753
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
  5754
    "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
  5755
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  5756
    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
  5757
    ^ 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
  5758
930
4cf126b710b3 handle errors when grabbing
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  5759
    "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
  5760
!
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  5761
2712
cddda688a9f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
  5762
theColorItself:aColor
cddda688a9f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
  5763
    "an accessor for the table-column"
cddda688a9f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2711
diff changeset
  5764
1449
49ad9f552d64 oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents: 1446
diff changeset
  5765
    ^ 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
  5766
! !
99f8e19aab3a better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  5767
2663
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  5768
!ImageEditor methodsFor:'defaults'!
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  5769
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  5770
aboutIcon
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  5771
    ^ self class defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  5772
! !
Claus Gittinger <cg@exept.de>
parents: 2653
diff changeset
  5773
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5774
!ImageEditor methodsFor:'drag & drop'!
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5775
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5776
canDropObjects:aCollectionOfDropObjects in:aWidget
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5777
    ^ (aCollectionOfDropObjects size == 1) 
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5778
      and:[ aCollectionOfDropObjects 
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5779
                contains:[:dropObject | dropObject isFileObject]]
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5780
!
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5781
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5782
dropObjects:aCollectionOfDropObjects in:aWidget at:position
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5783
    |dropObject|
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5784
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5785
    dropObject := aCollectionOfDropObjects first.
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5786
    dropObject isFileObject ifTrue:[
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5787
        self loadFromFile:dropObject asFilename.
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5788
    ]
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5789
! !
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5790
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5791
!ImageEditor methodsFor:'event handling'!
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5792
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5793
processEvent:anEvent
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5794
    "Return true, if I have eaten the event"
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5795
2945
facf3c7b0e31 changed: #processEvent:
Claus Gittinger <cg@exept.de>
parents: 2932
diff changeset
  5796
    <resource: #keyboard (#Paste #Copy )>
facf3c7b0e31 changed: #processEvent:
Claus Gittinger <cg@exept.de>
parents: 2932
diff changeset
  5797
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5798
    |view focusView p transformation|
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5799
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5800
    view := anEvent view.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5801
    view notNil ifTrue:[
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5802
        
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5803
        view == self imagePreView ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5804
            ((anEvent isButtonPressEvent and:[ anEvent button == 1 ])
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5805
            or:[ anEvent isButtonMotionEvent and:[ anEvent hasButton1 ]])  ifTrue:[
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5806
                p := anEvent x @ anEvent y.                
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5807
                (transformation := view transformation) notNil ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5808
                    p := transformation applyInverseTo:p.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5809
                ].
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5810
                p := p / self previewMagnificationHolder value.
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5811
                self imageEditView scrollToMakeVisible:p.    
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5812
                ^ true.
2546
b69247f503b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2539
diff changeset
  5813
            ].
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5814
        ].
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5815
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5816
        anEvent isKeyPressEvent ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5817
            focusView := view windowGroup focusView ? view.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5818
            (focusView isComponentOf:(builder componentAt:#colorDataSetView)) ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5819
                anEvent key == #Paste ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5820
                    self pasteColorIntoColormap.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5821
                    ^ true.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5822
                ].
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5823
                anEvent key == #Copy ifTrue:[
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5824
                    self copyColorFromColormap.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5825
                    ^ true.
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5826
                ].
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5827
            ].
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5828
        ].
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5829
    ].
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5830
    ^ false.
2841
5f247fa01174 changed:
Claus Gittinger <cg@exept.de>
parents: 2837
diff changeset
  5831
3489
ed003c06c33b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3488
diff changeset
  5832
    "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
  5833
! !
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5834
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  5835
!ImageEditor methodsFor:'help'!
738210a2fa06 revised version
tz
parents: 651
diff changeset
  5836
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5837
constructWindowTitle
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5838
    |resourceClass resourceSelector img|
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5839
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5840
    resourceClass := imageEditView resourceClass.
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5841
    resourceClass notNil ifTrue:[
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5842
        resourceSelector := imageEditView resourceSelector.
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5843
        resourceSelector notNil ifTrue:[
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5844
            ^ resources 
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5845
                    string:(self modified 
3811
1c02ea1990b5 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 3765
diff changeset
  5846
                            ifTrue:['ImageEditor (modified): %1 » %2']
1c02ea1990b5 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 3765
diff changeset
  5847
                            ifFalse:['ImageEditor: %1 » %2'])
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5848
                    with:resourceClass name
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5849
                    with:resourceSelector
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5850
        ].
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5851
    ].
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5852
    
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5853
    (img := imageEditView image) notNil ifTrue:[
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5854
        img fileName notNil ifTrue:[
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5855
            ^ resources 
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5856
                    string:(self modified 
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5857
                            ifTrue:['ImageEditor (modified): %1']
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5858
                            ifFalse:['ImageEditor: %1'])
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5859
                     with:(img fileName asFilename baseName).
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5860
        ].    
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5861
        ^ resources string:'ImageEditor: some image.'
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5862
    ].    
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5863
    ^ resources string:'ImageEditor: << no image >>.'
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5864
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5865
    "Created: / 27-05-2018 / 11:31:20 / Claus Gittinger"
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5866
!
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  5867
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  5868
defaultInfoLabel
1969
f1763f6f4500 stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents: 1967
diff changeset
  5869
    "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
  5870
     some widget with a help text."
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  5871
3465
510f01b982de #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3464
diff changeset
  5872
    |resourceClass resourceSelector img|
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5873
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5874
    resourceClass := imageEditView resourceClass.
1965
1d2b7893ae89 some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents: 1962
diff changeset
  5875
    resourceClass notNil ifTrue:[
1969
f1763f6f4500 stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents: 1967
diff changeset
  5876
        resourceSelector := imageEditView resourceSelector.
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5877
        resourceSelector notNil ifTrue:[
3469
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5878
            ^ resources 
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5879
                    string:(self modified 
3811
1c02ea1990b5 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 3765
diff changeset
  5880
                            ifTrue:['Image (modified) from: %1 » %2']
1c02ea1990b5 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 3765
diff changeset
  5881
                            ifFalse:['Image from: %1 » %2'])
3469
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5882
                    with:resourceClass name
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5883
                    with:resourceSelector
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5884
        ].
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  5885
    ].
3465
510f01b982de #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3464
diff changeset
  5886
    
510f01b982de #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3464
diff changeset
  5887
    (img := imageEditView image) notNil ifTrue:[
510f01b982de #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3464
diff changeset
  5888
        img fileName notNil ifTrue:[
3469
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5889
            ^ resources 
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5890
                    string:(self modified 
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5891
                            ifTrue:['Image (modified) from: %1']
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5892
                            ifFalse:['Image from: %1'])
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5893
                     with:(img fileName asFilename baseName).
3465
510f01b982de #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3464
diff changeset
  5894
        ].    
510f01b982de #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3464
diff changeset
  5895
    ].    
3380
0eb344c2fe3a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3379
diff changeset
  5896
    ^ resources string:'No class and selector defined.'
3465
510f01b982de #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3464
diff changeset
  5897
3469
52837773925b #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3468
diff changeset
  5898
    "Modified: / 29-08-2017 / 19:47:25 / cg"
674
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  5899
!
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  5900
702
c9de7a9bc416 docu call changed
tz
parents: 694
diff changeset
  5901
openDocumentation
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5902
    "opens the documentation file of the Image Editor"
3811
1c02ea1990b5 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 3765
diff changeset
  5903
    "Called when <F1> is pressed"
674
d49e23b768e6 unused method found + help file access added
tz
parents: 673
diff changeset
  5904
763
19b3e479e0b8 docu call
tz
parents: 756
diff changeset
  5905
    self openHTMLDocument: 'tools/uipainter/ImageEditor.html'
672
738210a2fa06 revised version
tz
parents: 651
diff changeset
  5906
! !
738210a2fa06 revised version
tz
parents: 651
diff changeset
  5907
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5908
!ImageEditor methodsFor:'loading'!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5909
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5910
loadFromClass:aClass andSelector:aSelector
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5911
    "loads an image from the method specified by class and selector"
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5912
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5913
    self assert:(aClass isNil or:[aClass isClass]).
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5914
2932
7f305ee14e98 changed: #loadFromClass:andSelector:
Claus Gittinger <cg@exept.de>
parents: 2893
diff changeset
  5915
    (aClass isNil or:[aSelector isNil]) ifTrue:[
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5916
        imageEditView resourceClass:aClass.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5917
        imageEditView resourceSelector:aSelector.
1969
f1763f6f4500 stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents: 1967
diff changeset
  5918
        imageEditView image:nil.
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  5919
        self clearModified.
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5920
        ^ self.
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5921
    ].
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5922
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5923
    (imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue:[
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5924
        self updateAfterImageChange.
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  5925
        self clearModified.
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5926
    ]
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5927
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5928
    "Modified: / 16-03-1999 / 21:44:41 / cg"
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5929
    "Modified (comment): / 16-02-2017 / 10:22:51 / cg"
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5930
!
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5931
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  5932
loadFromFile:aFileName
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5933
    "loads an image from aFileName and sets up color map list and other info labels"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5934
980
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  5935
    self withCursor:Cursor wait do:[
bd21079f40e1 show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  5936
        (imageEditView loadFromFile: aFileName) notNil ifTrue:[
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5937
            self updateAfterImageChange
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5938
        ]
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5939
    ]
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5940
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5941
    "Modified: / 16.3.1999 / 21:44:26 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5942
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5943
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  5944
loadFromImage:anImage
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5945
    "loads an image from anImage and sets up color map list and other info labels"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5946
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5947
    |img|
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5948
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5949
    anImage notNil ifTrue:[    
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5950
        img := anImage onDevice:device.
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5951
    ].
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5952
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5953
    imageEditView image:img.
1799
e605f0af928a clear modified flag when an image is loaded
Claus Gittinger <cg@exept.de>
parents: 1796
diff changeset
  5954
    imageEditView clearModified.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5955
1966
274324851cfd some code cleanup
Claus Gittinger <cg@exept.de>
parents: 1965
diff changeset
  5956
    self updateAfterImageChange.
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5957
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5958
    "Modified: / 16-03-1999 / 21:43:56 / cg"
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  5959
    "Modified (comment): / 16-02-2017 / 10:21:47 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5960
!
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5961
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5962
loadFromOrPrepareForClass: aClass andSelector: aSelector
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5963
    "loads an image by evaluating aMessage;
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5964
     if no image could extract from aMessage; do set the class and the selector from 
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5965
     the aMessage for a saving at the end of editing"
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5966
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5967
    (imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue: [
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  5968
        self updateColorsFromImage:self image.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5969
        self findColorMapMode.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  5970
    ] ifFalse: [
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5971
        imageEditView resourceClass: aClass.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  5972
        imageEditView resourceSelector:aSelector.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5973
    ].
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5974
    self updateLabelsAndHistory.
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5975
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5976
    "Modified: / 16.3.1999 / 21:45:07 / cg"
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5977
! !
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  5978
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5979
!ImageEditor methodsFor:'menu aspects'!
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5980
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5981
canDrawCirclesHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5982
    ^ self imageIsLoadedAndNotReadonlyHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5983
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5984
    "Created: / 16-02-2017 / 01:41:31 / cg"
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5985
!
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5986
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5987
canDrawPointsHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5988
    ^ self imageIsLoadedAndNotReadonlyHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5989
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5990
    "Created: / 16-02-2017 / 01:39:37 / cg"
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5991
!
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5992
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5993
canDrawRectsHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5994
    ^ self imageIsLoadedAndNotReadonlyHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5995
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5996
    "Created: / 16-02-2017 / 01:40:17 / cg"
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5997
!
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  5998
3435
e3e1eea25472 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  5999
canFillCircleHolder
e3e1eea25472 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  6000
    ^ self imageIsLoadedAndNotReadonlyHolder
e3e1eea25472 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  6001
e3e1eea25472 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  6002
    "Created: / 10-04-2017 / 08:46:00 / cg"
e3e1eea25472 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  6003
!
e3e1eea25472 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  6004
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6005
canFillRectsHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6006
    ^ self imageIsLoadedAndNotReadonlyHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6007
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6008
    "Created: / 16-02-2017 / 01:40:21 / cg"
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6009
!
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6010
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6011
canFloodFillHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6012
    ^ self imageIsLoadedAndNotReadonlyHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6013
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6014
    "Created: / 16-02-2017 / 01:41:33 / cg"
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6015
!
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6016
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6017
canSprayHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6018
    ^ self imageIsLoadedAndNotReadonlyHolder
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6019
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6020
    "Created: / 16-02-2017 / 01:44:47 / cg"
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6021
!
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6022
3475
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  6023
colorMapMenuHolder
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  6024
    ^ [ self class colorMapMenu ]
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  6025
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  6026
    "Created: / 31-08-2017 / 18:47:17 / cg"
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  6027
!
7eafbd0cad40 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3472
diff changeset
  6028
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6029
imageIsLoadedAndAllowedToChangeImageDimension
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6030
    "returns whether an image is loaded as value holder"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6031
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6032
    ^ [ 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6033
        self imageIsLoadedHolder value
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6034
        and:[ self allowedToChangeImageDimension ] 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6035
      ]
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6036
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6037
    "Created: / 16-02-2017 / 01:58:41 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6038
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6039
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6040
imageIsLoadedAndAllowedToChangeImageDimensionAndDepth
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6041
    "returns whether an image is loaded as value holder"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6042
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6043
    ^ [ 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6044
        self imageIsLoadedHolder value
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6045
        and:[ self allowedToChangeImageDimensionAndDepth ] 
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6046
      ]
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6047
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6048
    "Modified: / 04-07-2010 / 10:15:43 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6049
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6050
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6051
imageIsLoadedAndAllowedToFlipHolder
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6052
    ^ self imageIsLoadedAndNotReadonlyHolder
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6053
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6054
    "Created: / 16-02-2017 / 01:57:02 / cg"
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6055
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6056
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6057
imageIsLoadedAndClassDefined
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6058
    "returns whether an image is loaded as value holder"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6059
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6060
    ^ [self hasClassAndSelectorDefinedHolder value
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6061
       and:[self imageIsLoadedHolder value]]
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6062
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6063
    "Created: / 31-07-1998 / 02:04:18 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6064
    "Modified: / 04-07-2010 / 10:15:48 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6065
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6066
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6067
imageIsLoadedAndNotReadonlyHolder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6068
    "returns whether an image is loaded and editable as value holder"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6069
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6070
    ^ BlockValue
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6071
        with:[:loaded | loaded and:[ self readOnly not ]]
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6072
        argument:(self imageIsLoadedHolder)
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6073
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6074
    "Modified: / 16-02-2017 / 12:11:31 / cg"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6075
!
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6076
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6077
imageIsLoadedHolder
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6078
    "returns whether an image is loaded as value holder"
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6079
3650
2fa5225d8d65 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3644
diff changeset
  6080
    ^ builder booleanValueAspectFor:#imageIsLoadedHolder
3413
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6081
52d0f1ff020d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3412
diff changeset
  6082
    "Created: / 04-07-2010 / 10:15:38 / cg"
3650
2fa5225d8d65 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3644
diff changeset
  6083
    "Modified: / 09-03-2019 / 21:11:20 / Claus Gittinger"
3404
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6084
! !
cd90f4aece50 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3401
diff changeset
  6085
3374
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6086
!ImageEditor methodsFor:'menu item visibility'!
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6087
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6088
isNotStandAloneAndMethodSaveAndLoadMenuItemsVisible
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6089
    ^ self isNotStandAlone and:[ self methodSaveAndLoadMenuItemsVisible ]
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6090
!
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6091
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6092
isStandAloneAndMethodSaveAndLoadMenuItemsVisible
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6093
    ^ self isStandAlone and:[ self methodSaveAndLoadMenuItemsVisible ]
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6094
!
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6095
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6096
methodSaveAndLoadMenuItemsVisible
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6097
    ^ true
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6098
!
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6099
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6100
modeMenuVisible
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6101
    ^ true
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6102
! !
2cb3e68941a8 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3370
diff changeset
  6103
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6104
!ImageEditor methodsFor:'menu modes'!
228524287573 intitial checkin
tz
parents:
diff changeset
  6105
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  6106
colorMapMode
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6107
    "returns the colorMapMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6108
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  6109
    colorMapMode isNil ifTrue: [colorMapMode := '' asValue].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6110
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  6111
    ^colorMapMode
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6112
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6113
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  6114
editMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  6115
    "returns editMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6116
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6117
    editMode isNil ifTrue: [
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  6118
        editMode := #point asValue.
1329
a38c2e29d1fb use onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
  6119
        editMode onChangeEvaluate:[imageEditView editMode:(editMode value)]
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  6120
    ].
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  6121
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  6122
    ^editMode
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6123
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6124
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  6125
mouseKeyColorMode
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  6126
    "returns mouseKeyColorMode"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6127
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  6128
    mouseKeyColorMode isNil ifTrue:[
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  6129
        mouseKeyColorMode := 1 asValue.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  6130
        mouseKeyColorMode onChangeEvaluate: [
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  6131
            imageEditView mouseKeyColorMode:mouseKeyColorMode value. 
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6132
            self selectedColors value:{ self listOfColors indexOf:imageEditView selectedColor }.
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  6133
        ]
956
dc4df8952e82 check whether imageEditView is nil
ca
parents: 951
diff changeset
  6134
    ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6135
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  6136
    ^mouseKeyColorMode
1345
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  6137
218b7fcff239 de-uglified
Claus Gittinger <cg@exept.de>
parents: 1329
diff changeset
  6138
    "Modified: / 10.2.2000 / 23:16:42 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6139
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  6140
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  6141
!ImageEditor methodsFor:'private'!
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  6142
3460
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6143
askForDepthThenDo:aBlock
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6144
    |oldDepth suggestion depth|
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6145
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6146
    oldDepth := self image depth.
3471
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  6147
    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  6148
    suggestion := LastDepth notNil ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  6149
                    LastDepth
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  6150
                  ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  6151
                    oldDepth > 8 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  6152
                        ifTrue:[8] 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  6153
                        ifFalse:[(oldDepth // 2 - 1) nextPowerOf2]
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  6154
                  ].
3460
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6155
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6156
    depth := Dialog request:'New depth ?' initialAnswer:suggestion asString.
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6157
    depth isEmptyOrNil ifTrue:[^ self].
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6158
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6159
    depth := Number readFrom:depth onError:nil.
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6160
    depth isNil ifTrue:[^ self].
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6161
3471
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  6162
    LastDepth := depth.    
3460
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6163
    aBlock value:depth
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6164
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6165
    "Created: / 24-08-2017 / 17:05:39 / cg"
3471
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  6166
    "Modified: / 30-08-2017 / 01:22:36 / cg"
3460
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6167
!
5d1d7e85222c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3459
diff changeset
  6168
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6169
checkModified
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6170
    imageEditView modified value ifTrue:[
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6171
        (Dialog
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6172
            confirm:(resources string:'Image was not saved. Proceed anyway ?')
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6173
            yesLabel:(resources string:'Proceed')
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6174
            noLabel:(resources string:'Cancel')
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6175
            initialAnswer:false
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6176
        ) ifFalse: [^false].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6177
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6178
        imageEditView clearModified.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6179
    ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6180
    ^ true
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6181
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6182
    "Modified: / 29.7.1998 / 18:55:24 / cg"
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6183
!
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6184
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6185
clearModifiedAndRememberImageSaved
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6186
    "called after a save-to-xxx operation"
3375
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  6187
    
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  6188
    self clearModified.
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  6189
    savedImage := self image.
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  6190
!
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  6191
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6192
clearModifiedAndRememberImageSavedAsFile:file
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6193
    "called after a save-to-file operation"
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6194
    
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6195
    self clearModifiedAndRememberImageSaved.
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6196
    savedFile := file.
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6197
!
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  6198
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6199
pointFromString:aString
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6200
    |p s x y|
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6201
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6202
    p := Object readFromString:aString onError:nil.
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  6203
    p isPoint ifTrue:[^ p].
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6204
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6205
    s := aString readStream.
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6206
    x := Number readFrom:s onError:nil.
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6207
    x notNil ifTrue:[
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6208
        s skipSeparators.
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  6209
        [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
  6210
        y := Number readFrom:s onError:nil.
1961
d9082e597adb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1960
diff changeset
  6211
        ^ x @ (y ? x)
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6212
    ].
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  6213
    ^ nil
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6214
!
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  6215
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6216
sortBlockForColors
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6217
    ^ self sortBlockForColorsByHLS.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6218
"/    ^ self sortBlockForColorsByRGB
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6219
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6220
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6221
sortBlockForColorsByHLS
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6222
    ^ [:a :b |
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6223
        |h1 h2 s1 s2 l1 l2|
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6224
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6225
        h1 := a hue ? 0.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6226
        h2 := b hue ? 0.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6227
        (h1 between: h2-30 and:h2+30) ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6228
            l1 := a light.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6229
            l2 := b light.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6230
            l1 = l2 ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6231
                a saturation < b saturation
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6232
            ] ifFalse:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6233
                l1 < l2
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6234
            ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6235
"/            s1 := a saturation.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6236
"/            s2 := b saturation.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6237
"/            s1 = s2 ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6238
"/                a light < b light
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6239
"/            ] ifFalse:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6240
"/                s1 < s2 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6241
"/            ]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6242
        ] ifFalse:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6243
            h1 < h2 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6244
        ]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6245
      ]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6246
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6247
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6248
sortBlockForColorsByRGB
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6249
    ^ [:a :b |
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6250
            a redByte == b redByte ifTrue:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6251
                a greenByte == b greenByte ifTrue:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6252
                    a blueByte < b blueByte
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6253
                ] ifFalse:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6254
                    a greenByte < b greenByte 
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6255
                ]
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6256
            ] ifFalse:[
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6257
                a redByte < b redByte 
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6258
            ]
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6259
      ]
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6260
!
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  6261
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6262
updateImage
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6263
    |img|
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6264
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6265
    img := imageEditView image.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6266
    imageEditView image:img.
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6267
    self fetchImageData.
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6268
    self imageIsLoadedHolder changed.
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6269
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6270
    "Modified: / 16-02-2017 / 12:18:08 / cg"
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6271
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  6272
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  6273
updateImagePreView
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  6274
    self tileModeHolder value ifTrue:[
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  6275
        self imagePreView tileMode:true tileOffset:(self image extent).
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6276
    ].
3253
32b2ae3350b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3242
diff changeset
  6277
    self imagePreView 
32b2ae3350b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3242
diff changeset
  6278
        setImage:(self image) scroll:false invalidate:false; "/ true.
32b2ae3350b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3242
diff changeset
  6279
        invalidate.
1558
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  6280
! !
3848cbaaf6d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  6281
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  6282
!ImageEditor methodsFor:'queries'!
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  6283
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6284
hasAlphaChannel
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6285
    |img|
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6286
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6287
    img := self image.
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6288
    img isNil ifTrue:[^ false].
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6289
    ^ img hasAlphaChannel
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6290
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6291
    "Created: / 05-09-2017 / 08:29:23 / cg"
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6292
!
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6293
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6294
hasLastGrabScreenArea
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6295
    ^ [ lastGrabbedScreenArea notNil ]
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6296
!
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  6297
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  6298
hasMask
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6299
    |img|
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6300
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6301
    img := self image.
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6302
    img isNil ifTrue:[^ false].
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6303
    img mask isNil ifTrue:[^ false].
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6304
    ^ colorMapMode value notNil and:[colorMapMode value startsWith:'mask']
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  6305
3411
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  6306
    "Created: / 18-08-1998 / 17:17:38 / cg"
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6307
    "Modified: / 05-09-2017 / 08:28:44 / cg"
3411
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  6308
!
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  6309
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  6310
hasMaskHolder
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  6311
    ^ [ self hasMask ]
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  6312
fd6472405fd0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3409
diff changeset
  6313
    "Created: / 18-02-2017 / 00:41:19 / cg"
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  6314
!
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  6315
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6316
hasTransparentColorInColorList
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6317
    ^ self hasMask or:[self hasAlphaChannel]
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6318
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6319
    "Created: / 05-09-2017 / 09:03:24 / cg"
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6320
!
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6321
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6322
modified
3416
9d51a45479e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3415
diff changeset
  6323
    "true if the image was modified"
9d51a45479e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3415
diff changeset
  6324
    
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6325
    ^ imageEditView modified
3416
9d51a45479e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3415
diff changeset
  6326
9d51a45479e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3415
diff changeset
  6327
    "Modified (comment): / 20-02-2017 / 16:23:32 / cg"
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6328
!
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6329
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6330
modified:aBoolean
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6331
    super modified:aBoolean.
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6332
    imageEditView modified:aBoolean
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6333
!
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  6334
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  6335
preferredExtent
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6336
    "returns the preferred extent"
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  6337
3443
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
  6338
    ^ 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
  6339
b9d9eb4b34f9 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
  6340
    "Modified (format): / 13-04-2017 / 09:52:25 / cg"
535
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  6341
! !
1caf545614c5 info bar subspec changed
tz
parents: 519
diff changeset
  6342
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6343
!ImageEditor methodsFor:'selection'!
228524287573 intitial checkin
tz
parents:
diff changeset
  6344
228524287573 intitial checkin
tz
parents:
diff changeset
  6345
magnification
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6346
    "returns the magnification of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6347
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  6348
    self imageEditView isNil ifTrue: [^1].
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  6349
    ^imageEditView magnification x
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6350
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6351
228524287573 intitial checkin
tz
parents:
diff changeset
  6352
magnification: aValue
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6353
    "sets the magnification of the image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6354
905
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
  6355
    |magnification|        
5f5d0a415c04 grid magnification can be changed
tz
parents: 903
diff changeset
  6356
    magnification := (aValue ? 1) asPoint.
911
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  6357
    (magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil].
ec8db5b62352 unnecessary calls removed
tz
parents: 905
diff changeset
  6358
    imageEditView magnification: magnification
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6359
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6360
228524287573 intitial checkin
tz
parents:
diff changeset
  6361
selectedColorIndex
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6362
    "returns the index of the selected color"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6363
228524287573 intitial checkin
tz
parents:
diff changeset
  6364
    ^selectedColorIndex
228524287573 intitial checkin
tz
parents:
diff changeset
  6365
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6366
228524287573 intitial checkin
tz
parents:
diff changeset
  6367
selectedColorIndex: anIndex
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6368
    "sets the index of the selected color"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6369
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6370
    |clr pixel|
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6371
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6372
    selectedColorIndex := anIndex.
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  6373
    anIndex isNil ifTrue:[^ self].
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  6374
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6375
    clr := self listOfColors at:anIndex ifAbsent:nil.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6376
    clr isNil ifTrue:[^ self].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6377
1075
74795d3e647d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1057
diff changeset
  6378
    pixel := anIndex - 1.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6379
    (self listOfColors at:1) = Color noColor ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6380
        anIndex == 1 ifTrue:[
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6381
            pixel := nil.       "/ mask
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6382
        ] ifFalse:[
1075
74795d3e647d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1057
diff changeset
  6383
            pixel := pixel - 1
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6384
        ]
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6385
    ].
3409
d821859c163e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3408
diff changeset
  6386
    imageEditView selectedColor:clr.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6387
    imageEditView selectedColorIndex:pixel.
3409
d821859c163e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3408
diff changeset
  6388
d821859c163e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3408
diff changeset
  6389
    "Modified: / 17-02-2017 / 16:29:09 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6390
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  6391
1716
5ae373f6fef0 method category rename
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
  6392
!ImageEditor methodsFor:'startup & release'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6393
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6394
closeDownViews
1644
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6395
    builder notNil ifTrue:[
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6396
        DefaultRelativeSizes :=
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6397
            Array 
1998
efd9be2585e3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1996
diff changeset
  6398
                with:(builder componentAt:#mainPanel) relativeCorners    
1644
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6399
                with:(builder componentAt:#verticalPanel) relativeCorners.
df1f5a97b8e9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6400
    ].
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6401
    super closeDownViews
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6402
!
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6403
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6404
closeRequest
2016
62843f7d07b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2006
diff changeset
  6405
    "asks for permission before closing"
62843f7d07b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2006
diff changeset
  6406
62843f7d07b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2006
diff changeset
  6407
    imageEditView checkModified ifTrue:[
62843f7d07b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2006
diff changeset
  6408
        super closeRequest
62843f7d07b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2006
diff changeset
  6409
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6410
!
228524287573 intitial checkin
tz
parents:
diff changeset
  6411
1980
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6412
commonPostBuild
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6413
    imageEditView undoImages addDependent:self.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6414
    imageEditView imageInfoHolder:(self imageInfoHolder).
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6415
    imageEditView activityInfoHolder:(self activityInfoHolder).
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6416
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6417
    imageEditView clickInfoCallBack:[:button :point | 
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6418
                        |mouseButtonColorToolBar|
3170
a49100905be3 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
  6419
                        button <= 2 ifTrue:[
a49100905be3 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
  6420
                            mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar.
a49100905be3 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
  6421
                            (mouseButtonColorToolBar itemAt:button) toggleIndication.
a49100905be3 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
  6422
                            mouseButtonColorToolBar do: [:i| i updateIndicators].
a49100905be3 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
  6423
                        ].
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6424
                  ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6425
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6426
    imageEditView addDependent:self.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6427
    imageEditView modifiedHolder addDependent:self.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  6428
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6429
    DefaultRelativeSizes notNil ifTrue:[
1998
efd9be2585e3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1996
diff changeset
  6430
        (builder componentAt:#mainPanel) relativeCorners:DefaultRelativeSizes first.
1980
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6431
        (builder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second.
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6432
    ].
1995
ad11533a39e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1993
diff changeset
  6433
1996
d18588052ade infoHolder handling
Claus Gittinger <cg@exept.de>
parents: 1995
diff changeset
  6434
    "/ using masters infoHolder ?
3543
06dbbe8684c7 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 3535
diff changeset
  6435
    self useAlienInfoLabel ifTrue:[
1998
efd9be2585e3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1996
diff changeset
  6436
        (builder componentAt:#mainPanel) layout bottomOffset:0.
1995
ad11533a39e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1993
diff changeset
  6437
        (builder componentAt:#infoBarSubSpec) beInvisible
ad11533a39e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1993
diff changeset
  6438
    ]
3535
e8ad4febf6f4 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 3530
diff changeset
  6439
e8ad4febf6f4 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 3530
diff changeset
  6440
    "Modified: / 20-02-2018 / 13:05:30 / stefan"
1640
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6441
!
87ce36f48fbc remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents: 1639
diff changeset
  6442
1980
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6443
open
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6444
    "after opening, gets the imageEditView"
1980
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6445
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6446
    super open.
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6447
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6448
    imageEditView := (self componentAt: #imageEditView) subViews first.
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6449
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6450
    "Modified (comment): / 05-09-2017 / 10:39:45 / cg"
1980
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6451
!
862d4036cebd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
  6452
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6453
postOpenWith:aBuilder
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6454
    "after opening, sets the masterApplication of the imageEditView to self;
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  6455
     evaluate the postOpenAction"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6456
1921
699dca2ebb51 code cleanup
Claus Gittinger <cg@exept.de>
parents: 1916
diff changeset
  6457
    postOpenAction value.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6458
1250
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  6459
    super postOpenWith:aBuilder.
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  6460
644ed357b524 reset menuBar in keyProcessor
ca
parents: 1196
diff changeset
  6461
    aBuilder keyboardProcessor menuBar:nil.
2339
a06d19fe7b32 click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents: 2308
diff changeset
  6462
    self windowGroup addPreEventHook:self.
3415
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  6463
    self colorCropTabSelectionIndexChanged.
b93299ad5142 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3413
diff changeset
  6464
3421
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  6465
    self drawingColor1Holder valueHolder:(imageEditView drawingColorHolders at:1).
f46643590cb1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3420
diff changeset
  6466
    self drawingColor2Holder valueHolder:(imageEditView drawingColorHolders at:2).
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6467
    imageEditView drawingAlpha:(self alphaHolder value).
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  6468
    self updateAfterImageChange.
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6469
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  6470
    "Modified (format): / 05-09-2017 / 10:40:10 / cg"
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  6471
    "Modified: / 27-05-2018 / 11:20:57 / Claus Gittinger"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  6472
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  6473
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  6474
!ImageEditor methodsFor:'user actions-colormap'!
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  6475
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6476
addColorToColormap
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6477
    "undoable: add black (a new color) to the map"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6478
    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6479
    self addColorToColormap:(Color black) undoable:true
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6480
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6481
    "Modified: / 31-08-2017 / 14:30:32 / cg"
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6482
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6483
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6484
addColorToColormap:newColor
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6485
    "undoable
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6486
     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
  6487
     (unless it is full).
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6488
     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
  6489
     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
  6490
     
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  6491
    |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
  6492
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6493
    img := self image.
1499
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  6494
    img isNil ifTrue:[
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  6495
        self warn:'No Image.'.
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  6496
        ^ self
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  6497
    ].
0c57ab09156b about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  6498
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6499
    depth := img depth.
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6500
    cMap := img colorMap.
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  6501
    (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
  6502
        drawingColormap isNil ifTrue:[
1916
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  6503
            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
  6504
            drawingColormap := OrderedCollection new.
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  6505
        ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6506
        drawingColormap add:newColor.
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  6507
        self listOfColors contents:drawingColormap.
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6508
        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
  6509
        "/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6510
        ^ self
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6511
    ].
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6512
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6513
    (cMap size == (1 bitShift:depth)) ifTrue:[
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6514
        depth >= 8 ifTrue:[
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6515
            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
  6516
            ^ self
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6517
        ].
1916
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  6518
        (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
  6519
        ifFalse:[
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6520
            ^ self
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6521
        ].
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6522
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6523
        imageEditView makeUndo.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6524
        img mask notNil ifTrue:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6525
            newMode := 'masked' , (depth*2) printString.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6526
        ] ifFalse:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6527
            newMode := 'depth' , (depth*2) printString.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  6528
        ].
1057
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6529
        self colorMapMode:newMode.
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6530
    ] ifFalse:[
36f9d47e1249 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6531
        imageEditView makeUndo.
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6532
    ].
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6533
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6534
    cMap := cMap asArray.
1643
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  6535
    listOfColors := self listOfColors.
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  6536
    oldCListSize := listOfColors size.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6537
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  6538
    newColorMap := cMap copyWith:newColor.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6539
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6540
    newImage := img species new
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6541
                    width:(img width) height:(img height) depth:depth
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6542
                    fromArray:img bits.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6543
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6544
    newImage colorMap:newColorMap.  
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6545
    newImage fileName:img fileName.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6546
    newImage mask:(img mask copy).
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6547
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6548
    (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
  6549
        listOfColors contents: newImage colorMap.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6550
        self findColorMapMode.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6551
        "/ 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
  6552
        listOfColors size > (oldCListSize + 1) ifTrue:[
91b7ea254a3b some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents: 1640
diff changeset
  6553
            listOfColors removeLast
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6554
        ].
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6555
        self selectedColors value:{listOfColors size}.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6556
        self updateLabelsAndHistory.
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  6557
    ]
1053
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6558
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  6559
    "Created: / 12-03-1999 / 00:20:28 / cg"
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  6560
    "Modified: / 16-02-2017 / 10:17:25 / cg"
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6561
    "Modified (comment): / 31-08-2017 / 14:28:11 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6562
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6563
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6564
addColorToColormap:newColor undoable:undoable
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6565
    "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
  6566
     (unless it is full).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6567
     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
  6568
     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
  6569
     
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6570
    |depth img cMap newColorMap newImage oldCListSize newMode listOfColors|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6571
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6572
    img := self image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6573
    img isNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6574
        self warn:'No Image.'.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6575
        ^ self
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6576
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6577
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6578
    depth := img depth.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6579
    cMap := img colorMap.
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6580
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6581
    (cMap notNil and:[cMap isMappedPalette or:[cMap isArray]]) ifTrue:[
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6582
    ] ifFalse:[
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6583
        (cMap isNil or:[cMap isFixedPalette]) ifTrue:[
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6584
            drawingColormap isNil ifTrue:[
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6585
                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
  6586
                drawingColormap := OrderedCollection new.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6587
            ].
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6588
            drawingColormap add:newColor.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6589
            self listOfColors contents:drawingColormap.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6590
            self selectedColors value:{drawingColormap size}.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6591
            "/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6592
            ^ self
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6593
        ].
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6594
    ].
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6595
    
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6596
    (cMap size == (1 bitShift:depth)) ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6597
        depth >= 8 ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6598
            self warn:'No space for more colors in colormap.'.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6599
            ^ self
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6600
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6601
        (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
  6602
        ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6603
            ^ self
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6604
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6605
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6606
        undoable ifTrue:[ imageEditView makeUndo ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6607
        img mask notNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6608
            newMode := 'masked' , (depth*2) printString.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6609
        ] ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6610
            newMode := 'depth' , (depth*2) printString.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6611
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6612
        self colorMapMode:newMode.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6613
    ] ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6614
        undoable ifTrue:[ imageEditView makeUndo ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6615
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6616
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6617
    cMap := cMap asArray.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6618
    listOfColors := self listOfColors.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6619
    oldCListSize := listOfColors size.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6620
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6621
    newColorMap := cMap copyWith:newColor.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6622
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6623
    newImage := img species new
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6624
                    width:(img width) height:(img height) depth:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6625
                    fromArray:img bits.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6626
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6627
    newImage colorMap:newColorMap.  
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6628
    newImage fileName:img fileName.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6629
    newImage mask:(img mask copy).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6630
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6631
    (imageEditView image:newImage) notNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6632
        listOfColors contents: newImage colorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6633
        self findColorMapMode.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6634
        "/ 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
  6635
        listOfColors size > (oldCListSize + 1) ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6636
            listOfColors removeLast
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6637
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6638
        self selectedColors value:{listOfColors size}.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6639
        self updateLabelsAndHistory.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6640
    ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6641
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6642
    "Created: / 31-08-2017 / 14:30:01 / cg"
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6643
    "Modified: / 08-10-2017 / 09:15:10 / cg"
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6644
!
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6645
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6646
addPastedColorToColormap
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6647
    "undoable: add the color in the clipboard to the map"
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6648
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6649
    |clipBoardColor|
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6650
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6651
    (clipBoardColor := self clipBoardColor) isNil ifTrue:[                
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6652
        ^ self
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6653
    ].
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6654
    self addColorToColormap:clipBoardColor undoable:true
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6655
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6656
    "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
  6657
!
31097504a15a fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  6658
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6659
changeHLS
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6660
    "interactive Hue/Light/Saturation editing with thumbWheels"
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6661
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6662
    |bindings hueShiftHolder lightFactorHolder saturationFactorHolder originalColormap firstChange acceptChannel 
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6663
     shiftAction originalAvgColor avgColorHolder avgColor shiftedColor shiftProcess readySema
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6664
     originalPixels p previewImage previewImageHolder originalPreviewColormap originalPreviewPixels
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6665
     anyChange |
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6666
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6667
    avgColorHolder := nil asValue.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6668
    previewImageHolder := nil asValue.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6669
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6670
    "/
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6671
    "/ 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
  6672
    "/
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6673
    readySema := Semaphore new.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6674
    [
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6675
        |image|
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6676
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6677
        image := imageEditView image.
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6678
        originalColormap := image colorMap copy.
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6679
        originalPixels := image bits.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6680
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6681
        previewImage := self image magnifiedPreservingRatioTo:100@100.
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6682
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6683
        avgColor := originalAvgColor := previewImage "image" averageColor.
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6684
        avgColorHolder value:avgColor.
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6685
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6686
        previewImageHolder value: previewImage.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6687
        originalPreviewColormap := previewImage colorMap copy.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6688
        originalPreviewPixels := previewImage bits.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6689
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6690
        readySema signal.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6691
    ] forkAt:7.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6692
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6693
    acceptChannel := TriggerValue new.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6694
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6695
    firstChange := true.
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6696
    anyChange := false.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6697
1651
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  6698
    shiftedColor := [:clr :hShift :lFactor :sFactor |
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  6699
                        Color 
577ddbd9fb26 better hls color display
Claus Gittinger <cg@exept.de>
parents: 1650
diff changeset
  6700
                                hue:((clr hue) ? 0 + hShift) 
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6701
                                light:(((clr light * (lFactor)) min:100) max:0)
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6702
                                saturation:(((clr saturation * (sFactor)) min:100) max:0)].
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6703
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6704
    shiftAction := 
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6705
        [
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6706
            |hShift lFactor sFactor|
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6707
3740
6b1e0eefb50a #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 3690
diff changeset
  6708
            "/ commented, because this leads to a recursion error
6b1e0eefb50a #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 3690
diff changeset
  6709
            "/ (holders accept - send shiftAction again - ...)
6b1e0eefb50a #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 3690
diff changeset
  6710
            "/ acceptChannel value:true.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6711
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6712
            firstChange ifTrue:[
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6713
                imageEditView makeUndo.
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6714
                firstChange := false.
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6715
                anyChange := true.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6716
            ].
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6717
            readySema notNil ifTrue:[readySema wait. readySema := nil].
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6718
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6719
            hShift := hueShiftHolder value.
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6720
            lFactor := lightFactorHolder value.
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6721
            sFactor := saturationFactorHolder value.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6722
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6723
            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
  6724
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6725
            previewImage
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6726
                colorMap:originalPreviewColormap copy;
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6727
                bits:originalPreviewPixels copy;
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6728
                release;
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6729
                colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor].
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6730
            previewImageHolder value:nil; value:previewImage.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6731
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6732
            shiftProcess notNil ifTrue:[
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6733
                shiftProcess terminate.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6734
                shiftProcess waitUntilTerminated.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6735
                shiftProcess := nil.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6736
            ].
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6737
            shiftProcess := 
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6738
                [
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6739
                    [
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  6740
                        imageEditView image 
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  6741
                            colorMap:originalColormap copy;
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6742
                            bits:originalPixels copy;
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6743
                            release;
1656
f5c0716efd78 menu labels
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
  6744
                            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
  6745
                        self updateImage.
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6746
                        self updateInfoLabel.
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6747
                        self updateImagePreView.
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6748
                    ] ensure:[ shiftProcess := nil ].    
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6749
                ] forkAt:7.
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6750
        ].
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6751
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6752
    bindings := IdentityDictionary new.
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6753
    bindings at:#hueShiftHolder put:(hueShiftHolder := 0 asValue).
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6754
    hueShiftHolder onChangeEvaluate:shiftAction.
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6755
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6756
    bindings at:#lightFactorHolder put:(lightFactorHolder := 1.0 asValue).
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6757
    lightFactorHolder onChangeEvaluate:shiftAction.
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6758
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6759
    bindings at:#saturationFactorHolder put:(saturationFactorHolder := 1.0 asValue).
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6760
    saturationFactorHolder onChangeEvaluate:shiftAction.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6761
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6762
    bindings at:#acceptChannel put:acceptChannel.
1652
d6d40619e21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1651
diff changeset
  6763
    bindings at:#hlsColor put:avgColorHolder.
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6764
    bindings at:#previewImageHolder put:previewImageHolder.
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6765
3562
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6766
    bindings at:#resetHueShift put:[hueShiftHolder value:0].
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6767
    bindings at:#resetLightFactor put:[lightFactorHolder value:1.0].
dc310a9c9b19 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3561
diff changeset
  6768
    bindings at:#resetSaturationFactor put:[saturationFactorHolder value:1.0].
3740
6b1e0eefb50a #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 3690
diff changeset
  6769
6b1e0eefb50a #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 3690
diff changeset
  6770
    [
1650
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
  6771
    (self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) 
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6772
    ifFalse:[ 
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6773
        anyChange ifTrue:[
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6774
            imageEditView undo
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6775
        ]
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6776
    ].
3740
6b1e0eefb50a #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 3690
diff changeset
  6777
    ] ensure:[self halt].
1923
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6778
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6779
    (p := shiftProcess) notNil ifTrue:[
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6780
        p waitUntilTerminated.
b73340bcc215 changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents: 1922
diff changeset
  6781
    ].
2438
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6782
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6783
    anyChange ifTrue:[
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6784
        self updateImage.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6785
        self updateImagePreView.
bbe9cdf5dac4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2424
diff changeset
  6786
    ].
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6787
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6788
    "Modified: / 28-08-2017 / 13:05:35 / cg"
3580
ab5cebe669d7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3562
diff changeset
  6789
    "Modified: / 28-07-2018 / 10:35:37 / Claus Gittinger"
1649
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6790
!
80586cf27eb8 added changeHue
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  6791
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6792
changeHLSOfColors:colorsToShift
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6793
    "interactive Hue/Light/Saturation editing"
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6794
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6795
    |bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6796
     shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6797
     originalPixels p previewImage previewImageHolder originalPreviewColormap originalPreviewPixels
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6798
     anyChange |
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6799
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6800
    avgColorHolder := nil asValue.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6801
    previewImageHolder := nil asValue.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6802
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6803
    "/
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6804
    "/ 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
  6805
    "/
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6806
    readySema := Semaphore new.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6807
    [
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6808
        |image red green blue|
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6809
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6810
        image := imageEditView image.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6811
        originalColormap := image colorMap copy.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6812
        originalPixels := image bits.
3635
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  6813
        colorsToShift size > 0 ifTrue:[
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  6814
            red := (colorsToShift collect:[:clr | clr red]) average.
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  6815
            green := (colorsToShift collect:[:clr | clr green]) average.
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  6816
            blue := (colorsToShift collect:[:clr | clr blue]) average.
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  6817
            avgColor := Color red:red green:green blue:blue.
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  6818
        ].    
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6819
        avgColorHolder value:avgColor.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6820
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6821
        previewImage := self image magnifiedPreservingRatioTo:100@100.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6822
        previewImageHolder value: previewImage.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6823
        originalPreviewColormap := previewImage colorMap copy.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6824
        originalPreviewPixels := previewImage bits.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6825
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6826
        readySema signal.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6827
    ] forkAt:7.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6828
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6829
    acceptChannel := TriggerValue new.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6830
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6831
    firstChange := true.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6832
    anyChange := false.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6833
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6834
    shiftedColor := [:clr :hShift :lFactor :sFactor |
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6835
                        Color 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6836
                                hue:((clr hue) ? 0 + hShift) 
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6837
                                light:((clr light * lFactor) min:100)
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6838
                                saturation:((clr saturation * sFactor) min:100)].
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6839
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6840
    shiftAction := 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6841
        [
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6842
            |hShift lFactor sFactor|
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6843
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6844
            acceptChannel value:true.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6845
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6846
            firstChange ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6847
                imageEditView makeUndo.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6848
                firstChange := false.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6849
                anyChange := true.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6850
            ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6851
            readySema notNil ifTrue:[readySema wait. readySema := nil].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6852
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6853
            hShift := hueShift value.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6854
            lFactor := lightValue value.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6855
            sFactor := saturationValue value.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6856
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6857
            avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor).
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6858
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6859
            previewImage
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6860
                colorMap:originalPreviewColormap copy;
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6861
                bits:originalPreviewPixels copy;
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6862
                release;
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6863
                colorMapProcessing:[:clr | 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6864
                    (colorsToShift includes:clr) ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6865
                        shiftedColor value:clr value:hShift value:lFactor value:sFactor.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6866
                    ] ifFalse:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6867
                        clr
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6868
                    ]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6869
                ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6870
            previewImageHolder value:nil; value:previewImage.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6871
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6872
            shiftProcess notNil ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6873
                shiftProcess terminate.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6874
                shiftProcess waitUntilTerminated.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6875
                shiftProcess := nil.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6876
            ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6877
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6878
            shiftProcess := 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6879
                [
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6880
                    [
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6881
                        imageEditView image 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6882
                            colorMap:originalColormap copy;
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6883
                            bits:originalPixels copy;
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6884
                            release;
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6885
                            colorMapProcessing:[:clr | 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6886
                                (colorsToShift includes:clr) ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6887
                                    shiftedColor value:clr value:hShift value:lFactor value:sFactor.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6888
                                ] ifFalse:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6889
                                    clr
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6890
                                ]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6891
                            ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6892
                        self updateImage.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6893
                        self updateInfoLabel.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6894
                        self updateImagePreView.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6895
                    ] ensure:[ shiftProcess := nil ].    
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6896
                ] forkAt:7.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6897
        ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6898
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6899
    bindings := IdentityDictionary new.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6900
    bindings at:#hueShiftAmount put:(hueShift := 0 asValue).
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6901
    hueShift onChangeEvaluate:shiftAction.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6902
3635
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  6903
    bindings at:#lightAmount put:(lightValue := 1.0 asValue).
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6904
    lightValue onChangeEvaluate:shiftAction.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6905
3635
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  6906
    bindings at:#saturationAmount put:(saturationValue := 1.0 asValue).
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6907
    saturationValue onChangeEvaluate:shiftAction.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6908
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6909
    bindings at:#acceptChannel put:acceptChannel.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6910
    bindings at:#hlsColor put:avgColorHolder.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6911
    bindings at:#previewImageHolder put:previewImageHolder.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6912
3635
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  6913
    bindings at:#resetHueShift put:[ hueShift value: 0 ].
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  6914
    bindings at:#resetLightFactor put:[ lightValue value: 1.0 ].
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  6915
    bindings at:#resetSaturationFactor put:[ saturationValue value: 1.0 ].
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  6916
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6917
    (self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6918
    ifFalse:[ 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6919
        anyChange ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6920
            imageEditView undo
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6921
        ]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6922
    ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6923
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6924
    (p := shiftProcess) notNil ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6925
        p waitUntilTerminated.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6926
    ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6927
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6928
    anyChange ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6929
        self updateImage.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6930
        self updateImagePreView.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6931
    ].
3468
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6932
2cf3a445a2f6 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3466
diff changeset
  6933
    "Modified (comment): / 28-08-2017 / 13:04:44 / cg"
3635
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  6934
    "Modified: / 14-01-2019 / 14:52:50 / Claus Gittinger"
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6935
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  6936
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6937
clearColormapEntry0AndMaskedPixels
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6938
    "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
  6939
     0 and then clear all masked pixels (to pixelValue 0).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6940
     This is required for windows icons to be really transparent"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6941
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6942
    |index colorMap| 
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6943
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6944
    self nonUndoableCompressColorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6945
    
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6946
    colorMap := self image colorMap.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6947
    (colorMap includes:(Color black)) ifFalse:[
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6948
        self addColorToColormap:(Color black) undoable:false.
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6949
        colorMap := self image colorMap.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6950
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6951
    index := colorMap indexOf:(Color black).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6952
    index == 1 ifFalse:[
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6953
        self nonUndoableSortColorMapWith:self sortBlockForColorsByRGB.
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6954
        colorMap := self image colorMap.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6955
    ].
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6956
    self nonUndoableClearMaskedPixels
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6957
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  6958
    "Modified: / 31-08-2017 / 14:30:28 / cg"
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6959
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6960
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  6961
clearMaskedPixels
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  6962
    "clear all masked pixels (to pixelValue 0)"
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  6963
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6964
    |newImage| 
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6965
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6966
    newImage := self image clearMaskedPixels.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6967
    0 to:newImage height - 1 do:[:y |
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6968
        0 to:newImage width - 1 do:[:x |
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6969
            (newImage maskAtX:x y:y) == 0 ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6970
                newImage pixelAtX:x y:y put:0
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  6971
            ]
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  6972
        ]
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6973
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6974
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6975
    (imageEditView image:newImage) notNil ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  6976
        self fetchImageData.
1403
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  6977
    ]
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  6978
!
26707fae4b93 compressColorMap
Claus Gittinger <cg@exept.de>
parents: 1398
diff changeset
  6979
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6980
clipBoardColor
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6981
    "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
  6982
     If there is none, beep (if user's settings allow it)"
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6983
     
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6984
    |clr|
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6985
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6986
    clr := imageEditView getClipboardObject.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6987
    clr isColor ifFalse:[
3526
d27e02006468 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3513
diff changeset
  6988
        self beepInEditor.
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6989
        ^ nil
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6990
    ].
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6991
    ^ clr
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6992
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6993
    "Created: / 08-10-2017 / 09:02:14 / cg"
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6994
!
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  6995
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  6996
colorMapChanged
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  6997
    |img|
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  6998
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  6999
    img := self image.
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  7000
    img release.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  7001
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  7002
    self imageEditView invalidate.
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  7003
    self imagePreView invalidate.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  7004
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  7005
"/    (imageEditView image:img) notNil ifTrue:[
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  7006
"/        self updateLabelsAndHistory.
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  7007
"/        self imagePreView image:img
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  7008
"/    ]
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  7009
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  7010
    "Created: / 7.8.1998 / 22:26:10 / cg"
960
6196f12b97f6 fixed color editing
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  7011
    "Modified: / 18.8.1998 / 17:08:55 / cg"
945
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  7012
!
cb689f3971ab allow editing of color values;
Claus Gittinger <cg@exept.de>
parents: 942
diff changeset
  7013
975
ede3746e0dea use radio buttons
tz
parents: 960
diff changeset
  7014
colorMapMode:aMode
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  7015
    "calculates a new color map for the image from aMode.
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  7016
     This might involve the computation of a colormap 
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  7017
     (if depth is smaller)"
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7018
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7019
    |depth numColors newColorMap newImage 
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7020
     oldImage image newColors realColorMap oldFileName
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7021
     usedColors useNearest usageCounts tmpBits tmpMap quest
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7022
     prevMode maskThreshold maskImage| 
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7023
3433
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  7024
    oldImage := self image.
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  7025
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  7026
    "/ rubbish; the mode is already changed
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  7027
    "/ prevMode := colorMapMode value.
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  7028
    prevMode := self colorMapModeFromImage:oldImage. 
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  7029
    prevMode == aMode ifTrue:[^ self].
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  7030
    
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7031
    self withExecuteCursorDo:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7032
        newColorMap := self class listOfColorMaps at:aMode.
3230
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  7033
        (aMode == #depth32 or:[aMode == #masked32]) ifTrue:[
2572
1c09be361688 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2571
diff changeset
  7034
            depth := 32. 
1c09be361688 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2571
diff changeset
  7035
        ] ifFalse:[
3230
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  7036
            (aMode == #depth24 or:[aMode == #masked24]) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  7037
                depth := 24. 
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  7038
            ] ifFalse:[
3370
c88532134a2b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3367
diff changeset
  7039
                (aMode == #depth16 or:[aMode == #masked16]) ifTrue:[
c88532134a2b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3367
diff changeset
  7040
                    depth := 16. 
c88532134a2b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3367
diff changeset
  7041
                ] ifFalse:[
c88532134a2b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3367
diff changeset
  7042
                    depth := (newColorMap size log:2) asInteger. 
c88532134a2b #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3367
diff changeset
  7043
                ].
3230
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  7044
            ].
2572
1c09be361688 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2571
diff changeset
  7045
        ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7046
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7047
        useNearest := false.
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7048
        depth == 1 ifTrue:[
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7049
            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
  7050
        ] ifFalse:[
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7051
            prevMode isNil ifTrue:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7052
                quest := 'Compute colormap (or use standard)'
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7053
            ] ifFalse:[
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7054
                quest := 'Keep colormap (or use standard)'
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7055
            ]
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7056
        ].
3433
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  7057
        
539da315be01 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
  7058
        "/ currently always true!!
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7059
        ((prevMode = aMode)
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  7060
          or:[depth > oldImage depth
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  7061
          or:[true "self confirm:(resources string:quest)"]]
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  7062
        ) ifTrue:[
1937
73fb270a4da9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1936
diff changeset
  7063
            (newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7064
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7065
                "/ keep the colormap
3355
47dfcea38127 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3349
diff changeset
  7066
                "/ newColorMap atAllPut:Color black.
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7067
                depth > oldImage depth ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7068
                    "/ easy - simply copy the part
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7069
                    numColors := 1 bitShift:oldImage depth.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7070
                    0 to:numColors-1 do:[:pixel |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7071
                        newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel)
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7072
                    ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7073
                ] ifFalse:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7074
                    "/ see if all used color fit the new colormap
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7075
                    usedColors := oldImage usedColorsMax:(1 bitShift:depth).
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7076
                    (usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7077
                        usedColors := oldImage realUsedColors
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7078
                    ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7079
                    (usedColors notNil and:[usedColors size <= (1 bitShift:depth)]) ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7080
                        "/ yea - just install them
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7081
                        usedColors asArray keysAndValuesDo:[:idx :clr |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7082
                            newColorMap at:idx put:clr
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7083
                        ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7084
                    ] ifFalse:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7085
                        "/ copy over those that are most often used.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7086
                        oldImage depth < 8 ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7087
                            tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height).
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7088
                            oldImage bits
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7089
                                expandPixels:(oldImage depth)
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7090
                                width:oldImage width
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7091
                                height:oldImage height 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7092
                                into:tmpBits
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7093
                                mapping:nil.
986
4361ba4dbbdc added crob operations.
Claus Gittinger <cg@exept.de>
parents: 982
diff changeset
  7094
                        ] ifFalse:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7095
                            oldImage depth == 8 ifTrue:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7096
                                tmpBits := oldImage bits
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7097
                            ] ifFalse:[
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7098
                                colorMapMode value:prevMode.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7099
                                self findColorMapMode.    
3586
87081b50bb22 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3580
diff changeset
  7100
                                self warn:'Too many used colors (%1) in image.\\You should choose one of:\\- convert the image to gray\- reduce the number of colors\- dither to depth\- choose another depth'
87081b50bb22 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3580
diff changeset
  7101
                                     with: oldImage realUsedColors size.
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7102
                                ^ self
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7103
    "/                            (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
  7104
    "/                            ifFalse:[.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7105
    "/                                ^ self
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7106
    "/                            ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7107
    "/                            self image: (Image newForDepth:depth) fromImage:oldImage.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7108
    "/                            ^ self.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7109
                            ]
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7110
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7111
                        usageCounts := tmpBits usageCounts.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7112
                        tmpMap := Array new:usageCounts size.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7113
                        oldImage colorMap asArray keysAndValuesDo:[:i :clr |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7114
                            tmpMap at:i put:clr
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7115
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7116
                        usageCounts sort:[:a :b | a > b] with:tmpMap.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7117
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7118
                        1 to:(1 bitShift:depth) do:[:idx |
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7119
                            newColorMap at:idx put:(tmpMap at:idx)
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7120
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7121
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7122
                        useNearest := Dialog 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7123
                                            confirmWithCancel:(resources 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7124
                                                                  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
  7125
                                                                  with:usedColors size
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7126
                                                                  with:(1 bitShift:depth))
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7127
                                            labels:(resources array:#('Cancel' 'First' 'Nearest')).
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7128
                        useNearest isNil ifTrue:[
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7129
                            colorMapMode value:prevMode.
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7130
                            ^ self   "/ cancel
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7131
                        ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7132
                    ]
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7133
                ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7134
            ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7135
        ] ifFalse:[
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7136
            "/ standard colormap
921
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  7137
            usedColors := oldImage usedColors.
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  7138
            (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
  7139
                useNearest := Dialog 
928
89bd2304da33 cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7140
                                    confirmWithCancel:(resources 
1916
c91c39976bef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1910
diff changeset
  7141
                                                           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
  7142
                                                       ) 
3505
a7aec486480c #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
  7143
                                    labels:(resources array:#('Cancel' 'First' 'Nearest')).
921
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  7144
                useNearest isNil ifTrue:[
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  7145
                    colorMapMode value:prevMode.
921
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  7146
                    ^ self   "/ cancel
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  7147
                ].
a5aca21ea803 also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  7148
            ].
3356
10e247f059f1 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3355
diff changeset
  7149
            newColorMap := oldImage colorMap.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7150
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7151
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7152
        imageEditView makeUndo.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7153
2260
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  7154
        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
  7155
        newImage depth:depth.
3230
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  7156
        depth >= 16 ifTrue:[
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  7157
            newImage colorMap:nil. 
3230
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  7158
            depth == 32 ifTrue:[
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  7159
                newImage samplesPerPixel:4; photometric:#rgba.
3230
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  7160
            ] ifFalse:[    
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  7161
                newImage samplesPerPixel:3; photometric:#rgb.
3230
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  7162
            ].    
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  7163
        ].   
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  7164
        "/ newImage photometric:oldImage photometric.
2260
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  7165
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7166
        oldFileName := oldImage fileName.
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7167
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7168
        Image imageErrorSignal handle:[:ex|
3227
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7169
            "/ arrive here only if not all colors can be represented;
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7170
            "/ then do a more expensive nearest color search
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7171
            Color colorErrorSignal handle:[:ex|
1542
76c2549d878f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1537
diff changeset
  7172
                colorMapMode value:prevMode.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7173
                imageEditView undo.
3586
87081b50bb22 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3580
diff changeset
  7174
                ^ self warn:('Conversion failed !!')
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7175
            ] do:[
1393
c4a11a7d407f use Image>>newForDepth:
Claus Gittinger <cg@exept.de>
parents: 1392
diff changeset
  7176
                newImage := Image newForDepth:depth.
3103
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  7177
                newImage 
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  7178
                    width:oldImage width height:oldImage height depth:depth;
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  7179
                    colorMap:newColorMap;
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  7180
                    photometric:#palette;
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  7181
                    bits:(ByteArray new:(newImage bytesPerRow * newImage height));
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  7182
                    mask:oldImage mask.
2260
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  7183
3227
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7184
                oldImage 
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7185
                    colorsFromX:0 y:0 
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7186
                    toX:(oldImage width-1) y:(oldImage height-1) 
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7187
                    do:[:x :y :clr |
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7188
                        |newColor|
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7189
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7190
                        (newColorMap includes:clr)
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7191
                            ifTrue: [newColor := clr]
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7192
                            ifFalse: [
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7193
                                newColor := clr nearestIn:newColorMap.
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7194
                                useNearest ifFalse:[
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7195
                                    (newColor deltaFrom:clr) > 0.5 ifTrue:[
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7196
                                        newColor := oldImage colorFromValue:0
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7197
                                    ]
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7198
                                ]
3227
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7199
                            ].
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7200
                        newImage colorAtX:x y:y put:newColor.
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7201
                    ].
2dbc0662a8c7 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3224
diff changeset
  7202
                
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7203
                image := newImage
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7204
            ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7205
        ] do:[ 
3461
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7206
            |newPhotometric|
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7207
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7208
            depth == 32 ifTrue:[
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7209
                newPhotometric := #rgba.
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7210
            ] ifFalse:[
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7211
                (newColorMap notNil and:[newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]]) ifTrue:[
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7212
                    newPhotometric := #palette
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7213
                ]
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7214
            ]. 
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7215
            image := newImage fromImage:oldImage photometric:newPhotometric.
bd826e508822 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3460
diff changeset
  7216
            "/ -- 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
  7217
        ].
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7218
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7219
        (aMode asString startsWith:'mask') ifTrue:[
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7220
            image mask isNil ifTrue:[
3436
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7221
                (oldImage depth == 32 and:[ oldImage photometric == #rgba ]) ifTrue:[
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7222
                    maskImage := ImageMask fromAlphaInImage:oldImage
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7223
                ] ifFalse:[    
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7224
                    false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7225
                        maskThreshold := 0.1.
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7226
                        maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). 
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7227
                    ] ifFalse:[
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7228
                        maskImage := ImageMask extent:image extent.
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7229
                        maskImage bits:(ByteArray 
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7230
                                            new:(maskImage bytesPerRow * maskImage height)
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7231
                                            withAll:16rFF).
c37d341dc7f7 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3435
diff changeset
  7232
                    ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7233
                ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7234
                image mask:maskImage.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7235
            ].
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7236
        ] ifFalse:[ 
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7237
            image mask: nil.
3317
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  7238
            oldImage mask notNil ifTrue:[
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  7239
                newImage depth == 32 ifTrue:[
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  7240
                    newImage computeAlphaValuesFromMask:oldImage mask
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  7241
                ].
88b892a4012d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3281
diff changeset
  7242
            ].
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7243
        ]. 
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7244
1937
73fb270a4da9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1936
diff changeset
  7245
        (newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[
1935
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7246
            realColorMap := OrderedCollection new.
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7247
            image realColorMap do:[:clr|
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7248
                (realColorMap includes: clr) ifFalse: [realColorMap add: clr]
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7249
            ].
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7250
            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
  7251
            newColorMap do:[:clr|
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7252
                ((newColors size < newColorMap size) and: [(newColors includes: clr) not]) 
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7253
                ifTrue:[      
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7254
                    newColors add: clr
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7255
                ]
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7256
            ].                  
27b19cd0274b more 24-bit image editing
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7257
            image colorMap: newColors.   
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7258
        ].
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7259
        image fileName: oldFileName.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7260
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  7261
        (imageEditView image: image) notNil ifTrue:[
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7262
            self fetchImageData.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7263
        ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7264
    ]
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7265
3506
86a5f1bf58fe #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3505
diff changeset
  7266
    "Modified: / 28-11-2017 / 16:39:03 / cg"
3586
87081b50bb22 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3580
diff changeset
  7267
    "Modified: / 09-08-2018 / 15:59:31 / Claus Gittinger"
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7268
!
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7269
2192
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7270
colorize
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7271
    "interactive Hue editing"
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7272
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7273
    |bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7274
     shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7275
     originalPixels p|
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7276
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7277
    "/ compute the averageColor in the background (while asking user)
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7278
    readySema := Semaphore new.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7279
    [
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7280
        |image|
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7281
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7282
        image := imageEditView image.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7283
        originalColormap := image colorMap copy.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7284
        avgColor := image averageColor.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7285
        originalPixels := image bits.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7286
        readySema signal.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7287
    ] forkAt:7.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7288
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7289
    acceptChannel := TriggerValue new.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7290
    avgColorHolder := avgColor asValue.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7291
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7292
    firstChange := true.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7293
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7294
    shiftedColor := [:clr :hShift :lFactor :sFactor |
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7295
                        Color 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7296
                                hue:((clr hue) ? 0 + hShift) 
3173
801e6bfe2581 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3172
diff changeset
  7297
                                light:((clr light * lFactor / 100) min:100)
801e6bfe2581 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3172
diff changeset
  7298
                                saturation:(((clr saturation max:20) * sFactor / 100) min:100)].
2192
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7299
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7300
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7301
    shiftAction := 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7302
        [
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7303
            |hShift lFactor sFactor|
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7304
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7305
            acceptChannel value:true.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7306
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7307
            firstChange ifTrue:[
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7308
                imageEditView makeUndo.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7309
                firstChange := false.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7310
            ].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7311
            readySema notNil ifTrue:[readySema wait. readySema := nil].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7312
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7313
            hShift := hueShift value.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7314
            lFactor := lightValue value.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7315
            sFactor := saturationValue value.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7316
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7317
            avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor).
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7318
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7319
            shiftProcess notNil ifTrue:[
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7320
                shiftProcess terminate.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7321
                shiftProcess waitUntilTerminated.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7322
                shiftProcess := nil.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7323
            ].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7324
            shiftProcess := 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7325
                [
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7326
                    [
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7327
                        imageEditView image 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7328
                            colorMap:originalColormap copy;
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7329
                            bits:originalPixels copy;
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7330
                            release;
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7331
                            colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7332
                        self updateImage.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7333
                        self updateInfoLabel.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7334
                        self updateImagePreView.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7335
                    ] ensure:[ shiftProcess := nil ].    
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7336
                ] forkAt:7.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7337
        ].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7338
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7339
    bindings := IdentityDictionary new.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7340
    bindings at:#hueShiftAmount put:(hueShift := 0 asValue).
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7341
    hueShift onChangeEvaluate:shiftAction.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7342
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7343
    bindings at:#lightAmount put:(lightValue := 100 asValue).
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7344
    lightValue onChangeEvaluate:shiftAction.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7345
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7346
    bindings at:#saturationAmount put:(saturationValue := 100 asValue).
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7347
    saturationValue onChangeEvaluate:shiftAction.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7348
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7349
    bindings at:#acceptChannel put:acceptChannel.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7350
    bindings at:#hlsColor put:avgColorHolder.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7351
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7352
    (self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7353
    ifFalse:[ 
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7354
        firstChange ~~ true ifTrue:[
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7355
            imageEditView undo
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7356
        ]
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7357
    ].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7358
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7359
    (p := shiftProcess) notNil ifTrue:[
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7360
        p waitUntilTerminated.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7361
    ].
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7362
    self updateImage.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7363
    self updateImagePreView.
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7364
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7365
    "Created: / 01-11-2007 / 23:27:37 / cg"
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7366
!
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  7367
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7368
compressColorMap
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7369
    "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
  7370
2893
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  7371
    |newImage| 
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  7372
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  7373
    newImage := self image.
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  7374
    newImage compressColorMap.
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7375
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7376
    (imageEditView image:newImage) notNil ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7377
        self fetchImageData.
919
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  7378
    ]
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7379
!
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7380
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7381
copyColorFromColormap
1871
42729969c032 set selection interface changed
ca
parents: 1859
diff changeset
  7382
    imageEditView setClipboardObject:(self selectedColorOrNil)
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7383
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7384
2174
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  7385
doubleClickOnColor:aColorIndex
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  7386
    self editSelectedColor.
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  7387
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  7388
    "Created: / 22-07-2007 / 13:14:37 / cg"
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  7389
!
7beca4d9c93a color-double-click
Claus Gittinger <cg@exept.de>
parents: 2155
diff changeset
  7390
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7391
editSelectedColor
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7392
    self processSelectedColorWith:[:clr | 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7393
        |editor|
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7394
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7395
        editor := ColorEditDialog new.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7396
        editor color:clr.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7397
        editor open.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7398
        editor accepted ifFalse:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7399
            AbortOperationRequest raise.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7400
        ].
3180
9ee8f0e74b96 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3173
diff changeset
  7401
        editor color
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7402
    ]
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7403
!
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7404
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7405
fetchImageData
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  7406
    |image|
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  7407
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  7408
    (image := imageEditView image) notNil ifTrue:[
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  7409
        self findColorMapMode.
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  7410
        self updateLabelsAndHistory.
3463
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7411
        self updateInfoLabel.
1460
89549732a2c8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1459
diff changeset
  7412
    ]
3463
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7413
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7414
    "Modified: / 24-08-2017 / 18:20:37 / cg"
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7415
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7416
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  7417
inspectColor
2573
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7418
    |clrIndex clr|
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7419
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7420
    self hasColormap ifFalse:[
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7421
        clr := self selectedColorOrNil
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7422
    ] ifTrue:[
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7423
        clrIndex := self selectedColorIndexOrNil.
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7424
        clrIndex isNil ifTrue:[
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7425
            ^ self
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7426
        ].
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7427
        clr := self image colorFromValue:clrIndex-1
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  7428
    ].
2573
c18db441c6ab changed #inspectColor
Claus Gittinger <cg@exept.de>
parents: 2572
diff changeset
  7429
    clr inspect
1544
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  7430
!
1048b548abfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1542
diff changeset
  7431
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7432
inspectColormap
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7433
    self hasColormap ifTrue:[
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7434
        self image colorMap inspect
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7435
    ].
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7436
!
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7437
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  7438
makeBrighter
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7439
    self updateImageAfterDoing:#makeBrighter.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7440
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7441
    "Modified: / 31-08-2017 / 12:16:30 / cg"
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  7442
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  7443
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  7444
makeDarker
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7445
    self updateImageAfterDoing:#makeDarker.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7446
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7447
    "Modified: / 31-08-2017 / 12:16:24 / cg"
1598
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  7448
!
d748419672a3 more colormap operations
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  7449
1926
b3d2dab90f9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1925
diff changeset
  7450
makeGrayScaleImage
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7451
    self updateImageAfterDoing:#makeGrayScaleImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7452
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7453
    "Modified: / 31-08-2017 / 12:16:15 / cg"
1436
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  7454
!
180804d7c28f added make grayScale
Claus Gittinger <cg@exept.de>
parents: 1435
diff changeset
  7455
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7456
makeSelectedColorBrighter
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7457
    self processSelectedColorsWith:[:clr | clr lightened]
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7458
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7459
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7460
makeSelectedColorDarker
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7461
    self processSelectedColorsWith:[:clr | clr darkened]
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7462
!
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7463
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  7464
makeSelectedColorGray
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7465
    self processSelectedColorsWith:[:clr | Color brightness:(clr brightness)]
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7466
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7467
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7468
makeSelectedColorShifted
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7469
    "shift the selected color (in the colormap)
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7470
     using the hls/rgb shifting slider dialog"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7471
     
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7472
    |cMap colors cmapOffset|
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7473
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7474
    cMap := self image colorMap.
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7475
    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7476
    "/ 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
  7477
    cmapOffset := self hasTransparentColorInColorList ifTrue:[1] ifFalse:[0].
3635
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  7478
    colors := self selectedColors value 
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  7479
                select:[:idx | idx > cmapOffset]
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  7480
                thenCollect:[:idx | cMap at:idx-cmapOffset].
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7481
    self changeHLSOfColors:colors.
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7482
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  7483
    "Modified: / 05-09-2017 / 09:03:47 / cg"
3635
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  7484
    "Modified: / 14-01-2019 / 14:46:51 / Claus Gittinger"
1884
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  7485
!
2c4d13ecd7ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1883
diff changeset
  7486
3592
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  7487
makeSelectedColorSlightlyBrighter
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  7488
    self processSelectedColorsWith:[:clr | clr slightlyLightened]
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  7489
!
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  7490
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  7491
makeSelectedColorSlightlyDarker
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  7492
    self processSelectedColorsWith:[:clr | clr slightlyDarkened]
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  7493
!
149f58a2a522 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3586
diff changeset
  7494
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7495
makeSlightlyBrighter
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7496
    self updateImageAfterDoing:#makeSlightlyBrighter.
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7497
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7498
    "Created: / 24-11-2010 / 11:06:11 / cg"
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7499
    "Modified: / 31-08-2017 / 12:16:01 / cg"
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7500
!
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7501
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7502
makeSlightlyDarker
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7503
    self updateImageAfterDoing:#makeSlightlyDarker.
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7504
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7505
    "Created: / 24-11-2010 / 11:06:23 / cg"
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7506
    "Modified: / 31-08-2017 / 12:15:55 / cg"
2826
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7507
!
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7508
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7509
menu_clearColormapEntry0AndMaskedPixels
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7510
    "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
  7511
     0 and then clear all masked pixels (to pixelValue 0)"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7512
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7513
    imageEditView makeUndo.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7514
    self withExecuteCursorDo:[
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7515
        self nonUndoableClearColormapEntry0AndMaskedPixels
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7516
    ]
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7517
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7518
    "Modified: / 31-08-2017 / 14:31:21 / cg"
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7519
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7520
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7521
menu_clearMaskedPixels
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7522
    "clear all masked pixels (to pixelValue 0)"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7523
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7524
    imageEditView makeUndo.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7525
    self withExecuteCursorDo:[
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7526
        self nonUndoableClearMaskedPixels
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7527
    ]
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7528
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7529
    "Modified: / 31-08-2017 / 14:23:20 / cg"
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7530
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7531
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7532
menu_compressColorMap
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7533
    "calculates a new color map for the image, using only used colors"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7534
2893
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  7535
    |depth oldImage usedColors colorMap| 
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7536
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7537
    oldImage := self image.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7538
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7539
    oldImage photometric ~~ #palette ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7540
        self information:'Compress colorMap: Only palette images have colormaps.'.
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7541
        ^ self
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7542
    ].
2893
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  7543
    depth := oldImage depth.
3103
690eff6e417e class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3100
diff changeset
  7544
    colorMap := oldImage colorMap asArray.
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7545
    usedColors := oldImage realUsedColors.
2893
feb4eeba44ad changed:
Stefan Vogel <sv@exept.de>
parents: 2884
diff changeset
  7546
    usedColors size == colorMap size ifTrue:[
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7547
        self information:'Compress colorMap: Colormap already compressed - no compression.'.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7548
        ^ self
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7549
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7550
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7551
    imageEditView makeUndo.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7552
    self withExecuteCursorDo:[
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7553
        self nonUndoableCompressColorMap
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7554
    ]
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7555
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7556
    "Modified: / 31-08-2017 / 14:22:19 / cg"
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7557
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7558
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7559
menu_copyMask
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7560
    |mask|
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7561
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7562
    mask := self image mask.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7563
    MaskClipboard := mask subImageIn: (0@0 extent:mask extent).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7564
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7565
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7566
menu_pasteMask
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  7567
    "paste a mask from the clipboard"
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  7568
    
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7569
    |img mask|
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7570
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7571
    imageEditView makeUndo.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7572
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7573
    img := self image.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7574
    mask := img mask.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7575
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7576
    mask 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7577
         copyFrom:MaskClipboard
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7578
         x:0 y:0
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7579
         toX:0 y:0 
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7580
         width:(mask width min:MaskClipboard width)
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7581
         height:(mask height min:MaskClipboard height).
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7582
    img mask:mask.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7583
    (imageEditView image:img copy) notNil ifTrue:[
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7584
        self fetchImageData.
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7585
    ]
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  7586
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  7587
    "Modified (comment): / 27-05-2018 / 11:11:54 / Claus Gittinger"
1480
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7588
!
43c18932d2e8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1479
diff changeset
  7589
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7590
menu_sortColorMap
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7591
    "calculates a new color map for the image, sorting colors"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7592
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7593
    self menu_sortColorMapWith:self sortBlockForColors
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7594
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7595
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7596
menu_sortColorMapWith:sortBlock
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7597
    "calculates a new color map for the image, sorting colors"
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7598
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7599
    self image photometric ~~ #palette ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7600
        self information:'Compress colorMap: Only palette images have colormaps.'.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7601
        ^ self
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7602
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7603
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7604
    imageEditView makeUndo.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7605
    self withExecuteCursorDo:[
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7606
        self nonUndoableSortColorMapWith:sortBlock
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7607
    ]
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7608
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7609
    "Created: / 30-09-1998 / 23:51:23 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7610
    "Modified: / 31-08-2017 / 14:20:14 / cg"
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7611
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7612
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7613
pasteColorIntoColormap
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7614
    |clipBoardColor cmap|
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7615
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7616
    (clipBoardColor := self clipBoardColor) isNil ifTrue:[                
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7617
        ^ self
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7618
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7619
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7620
    cmap := self image colorMap.
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7621
    (cmap isNil or:[cmap isMappedPalette or:[cmap isFixedPalette]]) ifTrue:[
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7622
        drawingColormap isNil ifTrue:[
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7623
            drawingColormap := #()
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7624
        ].
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7625
        drawingColormap := drawingColormap copyWith:clipBoardColor.
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7626
        self selectedColors value:drawingColormap size.
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7627
        ^ self.
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7628
    ].
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7629
    
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7630
    self processSelectedColorWith:[:clr | clipBoardColor]
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7631
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7632
    "Modified (format): / 08-10-2017 / 09:03:59 / cg"
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7633
!
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  7634
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7635
pickAndAddColorToColormap
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7636
    self addColorToColormap:(Color fromUser) undoable:true
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7637
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7638
    "Modified: / 31-08-2017 / 14:30:22 / cg"
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7639
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7640
1933
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  7641
pickAndPasteColor
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  7642
    self pickColor.
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  7643
    self pasteColorIntoColormap.
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  7644
!
2fe701f721ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  7645
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7646
pickColor
1871
42729969c032 set selection interface changed
ca
parents: 1859
diff changeset
  7647
    imageEditView setClipboardObject:(Color fromUser)
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7648
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7649
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7650
processSelectedColorWith:aBlock
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7651
    "undoable color processing: 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7652
     the selected color will be replaced by the value of aBlock"
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7653
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7654
    self processSelectedColorsWith:aBlock.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7655
!
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7656
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7657
processSelectedColorsWith:aBlock
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7658
    "undoable color processing:
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7659
     the selected colors will be replaced by the value of aBlock
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7660
     (which gets a color vector and must return a color vector)"
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7661
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7662
    |img cMap modifiedColormap oldColors newImage selectedColorIndices newColors maskOffset processingSubset|
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7663
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7664
    selectedColorIndices := self selectedColors value.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7665
    selectedColorIndices isEmptyOrNil ifTrue:[^ self].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7666
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7667
    img := self image.
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  7668
    self hasTransparentColorInColorList ifTrue:[
3281
15b8e734190a #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 3253
diff changeset
  7669
        maskOffset := 1.
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7670
    ] ifFalse:[
3281
15b8e734190a #OTHER by stefan
Stefan Vogel <sv@exept.de>
parents: 3253
diff changeset
  7671
        maskOffset := 0.
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7672
    ].
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7673
    cMap := img colorMap.
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  7674
    (cMap isNil) ifTrue:[
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7675
        oldColors := drawingColormap.
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7676
        processingSubset := false.
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7677
    ] ifFalse:[
3561
b309d1d1b45c #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
  7678
        ("cMap isMappedPalette or:["cMap isFixedPalette"]") ifTrue:[
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7679
            oldColors := cMap asArray.
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7680
            processingSubset := false.
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7681
        ] ifFalse:[
3635
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  7682
            selectedColorIndices := selectedColorIndices select:[:idx | idx > maskOffset].
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  7683
            selectedColorIndices isEmpty ifTrue:[
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  7684
                Dialog warn:'Please select any non-mask color'.
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  7685
                ^ self.
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  7686
            ].        
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  7687
            oldColors := selectedColorIndices collect:[:idx | cMap at:idx-maskOffset].
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7688
            processingSubset := true.
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  7689
        ].
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7690
    ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7691
    imageEditView makeUndo.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7692
2992
a970017936e7 Refactor:
Stefan Vogel <sv@exept.de>
parents: 2945
diff changeset
  7693
    modifiedColormap := cMap asNewArray.
3635
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  7694
    (selectedColorIndices max - maskOffset) > modifiedColormap size ifTrue:[
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7695
        |t|
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7696
        t := Array new:(selectedColorIndices max - maskOffset).
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7697
        t replaceFrom:1 with:modifiedColormap.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7698
        modifiedColormap := t.
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7699
    ].
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7700
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7701
    newColors := oldColors collect:aBlock.
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7702
    processingSubset ifTrue:[
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7703
        selectedColorIndices with:newColors do:[:idx :newColor |
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7704
            modifiedColormap at:idx-maskOffset put:newColor.
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7705
        ].
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7706
    ] ifFalse:[
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7707
        selectedColorIndices do:[:idx |
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7708
            modifiedColormap at:idx-maskOffset put:(newColors at:idx-maskOffset ifAbsent:[self halt.Color black])
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7709
        ].
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7710
     ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7711
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7712
    newImage := img species new
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7713
                    width:img width
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7714
                    height:img height
1843
771731481a20 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1842
diff changeset
  7715
                    depth:img depth
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7716
                    fromArray:img bits.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7717
3418
8d56341c2706 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3417
diff changeset
  7718
    (cMap isNil) ifTrue:[
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7719
        "/ only a dummy...
3546
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7720
    ] ifFalse:[
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7721
        newImage colorMap:modifiedColormap.
4ee729a8a483 #BUGFIX by mawalch
mawalch
parents: 3543
diff changeset
  7722
        newImage photometric:#palette.
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7723
    ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7724
    newImage fileName:img fileName.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7725
    newImage mask:(img mask copy).
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7726
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7727
    (imageEditView image:newImage) notNil ifTrue:[
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7728
        self fetchImageData.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7729
    ].
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7730
    self selectedColors value:selectedColorIndices.
3393
1cffdeb837af #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3380
diff changeset
  7731
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  7732
    "Modified: / 08-10-2017 / 09:20:13 / cg"
3635
74101a749a34 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3625
diff changeset
  7733
    "Modified: / 14-01-2019 / 14:56:49 / Claus Gittinger"
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7734
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7735
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7736
reduceNumberOfColors
3464
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  7737
    "reduce by masking off r/g/b bits"
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  7738
1727
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  7739
    |s n anyChange img usedColors|
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7740
2817
Claus Gittinger <cg@exept.de>
parents: 2814
diff changeset
  7741
    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
  7742
    s size == 0 ifTrue:[^ self].
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7743
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7744
    n := Integer readFrom:s onError:0.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7745
    (n between:1 and:7) ifFalse:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7746
        Dialog warn:'Image unchanged'.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7747
        ^ self
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7748
    ].
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7749
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7750
    self withExecuteCursorDo:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7751
        anyChange := imageEditView reduceColorResolutionBy:n.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7752
        anyChange ifFalse:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7753
            Dialog warn:'Image unchanged'.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7754
        ] ifTrue:[
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7755
            img := imageEditView image.
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7756
            imageEditView image:img.
1446
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7757
6f2344ca1e92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1443
diff changeset
  7758
            self fetchImageData.
1727
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  7759
            usedColors := img usedColorsMax:10000.
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  7760
            usedColors size == 10000 ifTrue:[
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  7761
                Dialog information:('>= ' , usedColors size printString , ' colors used.')
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  7762
            ] ifFalse:[
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  7763
                Dialog information:(usedColors size printString , ' colors used.')
8c626d784494 color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents: 1716
diff changeset
  7764
            ]
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7765
        ]
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7766
    ].
2817
Claus Gittinger <cg@exept.de>
parents: 2814
diff changeset
  7767
Claus Gittinger <cg@exept.de>
parents: 2814
diff changeset
  7768
    "Modified: / 29-10-2010 / 18:08:01 / cg"
3464
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  7769
    "Modified (comment): / 24-08-2017 / 20:50:28 / cg"
1124
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7770
!
2392df0934bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1123
diff changeset
  7771
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7772
reduceNumberOfColors2
3464
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  7773
    "reduce by rounding r/g/b channel values"
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  7774
    
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7775
    |s rndR rndG rndB usedColors image newImage|
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7776
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7777
    s := Dialog request:'Rounding Interval red (2..) ?' initialAnswer:4.
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7778
    s size == 0 ifTrue:[^ self].
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7779
    rndR := Integer readFrom:s onError:0.
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  7780
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7781
    s := Dialog request:'Rounding Interval green (2..) ?' initialAnswer:2.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7782
    s size == 0 ifTrue:[^ self].
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7783
    rndG := Integer readFrom:s onError:0.
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  7784
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7785
    s := Dialog request:'Rounding Interval blue (2..) ?' initialAnswer:10.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7786
    s size == 0 ifTrue:[^ self].
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7787
    rndB := Integer readFrom:s onError:0.
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  7788
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  7789
    ((rndR > 1) or:[(rndG > 1) or:[(rndB > 1)]]) ifFalse:[
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7790
        Dialog warn:'Image unchanged'.
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7791
        ^ self
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7792
    ].
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7793
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7794
    self withExecuteCursorDo:[
3463
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7795
        |reduceColor nUsed|
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7796
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7797
        reduceColor :=
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7798
            [:clr |
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7799
                |r g b nr ng nb|
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7800
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7801
                r := clr redByte.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7802
                g := clr greenByte.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7803
                b := clr blueByte. 
1938
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7804
                nr := (r roundTo:rndR) min:255.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7805
                ng := (g roundTo:rndG) min:255.
99d611caf3bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  7806
                nb := (b roundTo:rndB) min:255. 
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7807
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7808
                Color redByte:nr greenByte:ng blueByte:nb.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7809
            ].
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7810
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7811
        image := self image.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7812
        "/ usedColors := image usedColorsMax:4096.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7813
        imageEditView makeUndo.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7814
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7815
        newImage := image copy.
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7816
        newImage photometric == #palette ifTrue:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7817
            newImage colorMap:(image colorMap collect:reduceColor).
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7818
        ] ifFalse:[
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7819
            image
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7820
                colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) 
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7821
                do:[:x :y :clr |
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7822
                    newImage colorAtX:x y:y put:(reduceColor value:clr)
2260
9a6345ae1c56 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
  7823
                ].
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7824
        ].
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7825
        imageEditView image:newImage.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7826
        imageEditView setModified.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7827
        self updateImage.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7828
        self updateImagePreView.
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7829
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7830
        self fetchImageData.
3463
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7831
        
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7832
        usedColors := newImage usedColorsMax:10000.
3463
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7833
        nUsed := usedColors size.
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7834
        nUsed == 10000 ifTrue:[
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7835
            Dialog information:('>= ' , nUsed printString , ' colors used.')
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7836
        ] ifFalse:[
3463
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7837
            Dialog information:(nUsed printString , ' colors used.')
1934
294d0e102881 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1933
diff changeset
  7838
        ]
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7839
    ].
2054
56352366d94a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2044
diff changeset
  7840
3463
7f00ae87ae6c #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3462
diff changeset
  7841
    "Modified: / 24-08-2017 / 18:25:04 / cg"
3464
9e3d52c9cca3 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3463
diff changeset
  7842
    "Modified (comment): / 24-08-2017 / 20:50:14 / cg"
1930
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7843
!
7b5ec69e6526 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1929
diff changeset
  7844
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7845
selectColor:aColor
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7846
    |idx img cMap|
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7847
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7848
    aColor isNil ifTrue:[
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7849
        idx := nil.
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7850
    ] ifFalse:[
2791
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7851
        img := self image.
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7852
        img notNil ifTrue: [
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7853
            aColor == Color noColor ifTrue:[
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7854
                (img mask notNil) ifTrue:[
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7855
                    idx := 1.
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7856
                ]
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7857
            ] ifFalse:[
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7858
                (cMap := self listOfColors) notNil ifTrue:[
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7859
                    idx := cMap indexOf:aColor ifAbsent:nil.
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7860
                ].
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7861
                idx isNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7862
                    "/ should not happen...
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7863
                    (cMap := img colorMap) notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7864
                        idx := cMap indexOf:aColor ifAbsent:nil.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7865
                        idx notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7866
                            img mask notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7867
                                idx := idx + 1.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7868
                            ].
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7869
                        ]
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7870
                    ].
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7871
                ].
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7872
            ].
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7873
        ].
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7874
    ].
3195
32e373ae50fa class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  7875
    self selectedColors value:{idx}.
2790
2c90a15a0011 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2771
diff changeset
  7876
2791
7d01ac3a20e7 changed: #selectColor:
Claus Gittinger <cg@exept.de>
parents: 2790
diff changeset
  7877
    "Modified: / 02-07-2010 / 12:06:07 / cg"
2446
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7878
!
862717a7ca0f color selection when undoing
Claus Gittinger <cg@exept.de>
parents: 2438
diff changeset
  7879
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7880
selectedColorIndexOrNil
2651
270672891645 changed: #colorMapMenu
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7881
    |img clrIndex|
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7882
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7883
    img := self image.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7884
    img isNil ifTrue:[
2764
30ba284f0818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2761
diff changeset
  7885
        "/ self warn:'No Image.'.
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7886
        ^ nil
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7887
    ].
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7888
    clrIndex := self selectionOfColor value.
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  7889
    self hasTransparentColorInColorList ifTrue: [ 
2449
5ef668d71314 changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents: 2447
diff changeset
  7890
        (clrIndex isInteger and:[clrIndex > 1]) ifTrue:[
5ef668d71314 changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents: 2447
diff changeset
  7891
            ^ clrIndex - 1 
5ef668d71314 changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents: 2447
diff changeset
  7892
        ].
5ef668d71314 changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents: 2447
diff changeset
  7893
        ^ nil
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  7894
    ].
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7895
    ^ clrIndex
3487
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  7896
f54ee88a464d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3479
diff changeset
  7897
    "Modified: / 05-09-2017 / 09:04:05 / cg"
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7898
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  7899
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7900
selectedColorOrNil
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7901
    |cmapIndex img cMap colorList|
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  7902
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  7903
    cmapIndex := self selectedColorIndexOrNil.
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  7904
    cmapIndex isNil ifTrue:[^ nil].
2556
736533777318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2546
diff changeset
  7905
    cmapIndex == 0 ifTrue:[^ nil].
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7906
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7907
    img := self image.
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7908
    cMap := img colorMap.
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7909
    cMap isNil ifTrue:[
2447
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7910
        "/ 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
  7911
        colorList := self listOfColors.
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7912
        colorList notNil ifTrue:[
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7913
            ^ colorList at:cmapIndex ifAbsent:nil
017ac2e500f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  7914
        ].
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  7915
        ^ nil
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7916
    ].
1896
ab2b45d8ccc8 colorMap fixes
penk
parents: 1889
diff changeset
  7917
    ^ cMap at:cmapIndex.
1852
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7918
!
c40abf408dc4 pick, copy & paste color
Claus Gittinger <cg@exept.de>
parents: 1847
diff changeset
  7919
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7920
sortColorMap
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7921
    "calculates a new color map for the image, sorting colors"
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  7922
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7923
    self nonUndoableSortColorMapWith:self sortBlockForColorsByRGB
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7924
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7925
    "Modified: / 31-08-2017 / 14:20:07 / cg"
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  7926
!
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  7927
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  7928
sortColorMapWith:sortBlock
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7929
    "warning: not undoable
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7930
     calculates a new color map for the image, sorting colors"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7931
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7932
    |depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7933
     expectedSize w h| 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7934
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7935
    oldImage := self image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7936
    depth := oldImage depth.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7937
    w := oldImage width.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7938
    h := oldImage height.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7939
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7940
    usedColors := oldImage realColorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7941
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7942
    "/ translation table
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7943
    oldToNew := ByteArray new:(1 bitShift:depth).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7944
    newColorMap := usedColors asArray.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7945
    newColorMap sort:sortBlock.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7946
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7947
    oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7948
        |newPixel|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7949
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7950
        (usedColors includes:clr) ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7951
            newPixel := newColorMap indexOf:clr.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7952
            oldToNew at:oldIdx put:newPixel-1.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7953
        ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7954
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7955
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7956
    oldBits := oldImage bits.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7957
    "/ sanity check...
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7958
    expectedSize := ((w * h * depth + 7) // 8).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7959
    (oldBits size < expectedSize) ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7960
        self halt:'incorrect pixeldata size'.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7961
        oldBits := (ByteArray new:expectedSize) replaceFrom:1 with:oldBits; yourself.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7962
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7963
    newBits := ByteArray new:(oldBits size).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7964
    depth ~~ 8 ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7965
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7966
        "/ expand/compress can only handle 8bits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7967
        tmpBits := ByteArray uninitializedNew:(w*h).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7968
        oldBits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7969
            expandPixels:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7970
            width:w height:h 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7971
            into:tmpBits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7972
            mapping:oldToNew.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7973
        tmpBits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7974
            compressPixels:depth 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7975
            width:w height:h 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7976
            into:newBits 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7977
            mapping:nil
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7978
    ] ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7979
        oldBits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7980
            expandPixels:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7981
            width:w height:h 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7982
            into:newBits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7983
            mapping:oldToNew.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7984
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7985
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7986
    newImage := oldImage species new
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7987
                    width:w height:h depth:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7988
                    fromArray:newBits.
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
    newImage colorMap:newColorMap.  
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7991
    newImage fileName:oldImage fileName.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7992
    newImage mask:(oldImage mask copy).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7993
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7994
    (imageEditView image:newImage) notNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7995
        self fetchImageData.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7996
    ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7997
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7998
    "Modified: / 15-09-1998 / 17:53:32 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  7999
    "Created: / 30-09-1998 / 23:51:23 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8000
    "Modified (comment): / 31-08-2017 / 14:19:21 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8001
!
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
updateImageAfterDoing:aBlockOrSelector
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8004
    self withExecuteCursorDo:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8005
        aBlockOrSelector value:imageEditView.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8006
        self updateImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8007
    ].
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
    "Created: / 31-08-2017 / 12:14:39 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8010
! !
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8011
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8012
!ImageEditor methodsFor:'user actions-colormap-basic'!
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
nonUndoableClearColormapEntry0AndMaskedPixels
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8015
    "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
  8016
     0 and then clear all masked pixels (to pixelValue 0).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8017
     This is required for windows icons to be really transparent"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8018
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8019
    |index colorMap| 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8020
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8021
    self nonUndoableCompressColorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8022
    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8023
    colorMap := self image colorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8024
    (colorMap includes:(Color black)) ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8025
        self addColorToColormap:(Color black) undoable:false.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8026
        colorMap := self image colorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8027
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8028
    index := colorMap indexOf:(Color black).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8029
    index == 1 ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8030
        self nonUndoableSortColorMapWith:self sortBlockForColorsByRGB.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8031
        colorMap := self image colorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8032
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8033
    self nonUndoableClearMaskedPixels
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8034
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8035
    "Created: / 31-08-2017 / 14:31:09 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8036
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8037
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8038
nonUndoableClearMaskedPixels
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8039
    "clear all masked pixels (to pixelValue 0)"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8040
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8041
    |newImage| 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8042
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8043
    newImage := self image clearMaskedPixels.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8044
    0 to:newImage height - 1 do:[:y |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8045
        0 to:newImage width - 1 do:[:x |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8046
            (newImage maskAtX:x y:y) == 0 ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8047
                newImage pixelAtX:x y:y put:0
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8048
            ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8049
        ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8050
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8051
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8052
    (imageEditView image:newImage) notNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8053
        self fetchImageData.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8054
    ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8055
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8056
    "Created: / 31-08-2017 / 14:22:58 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8057
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8058
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8059
nonUndoableCompressColorMap
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8060
    "not undoable
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8061
     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
  8062
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8063
    |newImage| 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8064
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8065
    newImage := self image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8066
    newImage compressColorMap.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8067
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8068
    (imageEditView image:newImage) notNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8069
        self fetchImageData.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8070
    ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8071
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8072
    "Created: / 31-08-2017 / 14:21:51 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8073
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8074
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8075
nonUndoableSortColorMapWith:sortBlock
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8076
    "not undoable
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8077
     calculates a new color map for the image, sorting colors"
1939
1ea7c8639468 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1938
diff changeset
  8078
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8079
    |depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8080
     expectedSize w h| 
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  8081
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  8082
    oldImage := self image.
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  8083
    depth := oldImage depth.
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8084
    w := oldImage width.
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8085
    h := oldImage height.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  8086
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8087
    usedColors := oldImage realColorMap.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8088
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8089
    "/ translation table
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8090
    oldToNew := ByteArray new:(1 bitShift:depth).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8091
    newColorMap := usedColors asArray.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8092
    newColorMap sort:sortBlock.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8093
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8094
    oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr |
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8095
        |newPixel|
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8096
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8097
        (usedColors includes:clr) ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8098
            newPixel := newColorMap indexOf:clr.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8099
            oldToNew at:oldIdx put:newPixel-1.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8100
        ]
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  8101
    ].
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  8102
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8103
    oldBits := oldImage bits.
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8104
    "/ sanity check...
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8105
    expectedSize := ((w * h * depth + 7) // 8).
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8106
    (oldBits size < expectedSize) ifTrue:[
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8107
        self halt:'incorrect pixeldata size'.
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8108
        oldBits := (ByteArray new:expectedSize) replaceFrom:1 with:oldBits; yourself.
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8109
    ].
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8110
    newBits := ByteArray new:(oldBits size).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8111
    depth ~~ 8 ifTrue:[
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8112
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8113
        "/ expand/compress can only handle 8bits
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8114
        tmpBits := ByteArray uninitializedNew:(w*h).
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8115
        oldBits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8116
            expandPixels:depth
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8117
            width:w height:h 
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8118
            into:tmpBits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8119
            mapping:oldToNew.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8120
        tmpBits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8121
            compressPixels:depth 
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8122
            width:w height:h 
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8123
            into:newBits 
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8124
            mapping:nil
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8125
    ] ifFalse:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8126
        oldBits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8127
            expandPixels:depth
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8128
            width:w height:h 
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8129
            into:newBits
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8130
            mapping:oldToNew.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8131
    ].
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8132
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8133
    newImage := oldImage species new
3224
98a659b6bd10 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3200
diff changeset
  8134
                    width:w height:h depth:depth
2652
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8135
                    fromArray:newBits.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8136
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8137
    newImage colorMap:newColorMap.  
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8138
    newImage fileName:oldImage fileName.
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8139
    newImage mask:(oldImage mask copy).
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8140
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8141
    (imageEditView image:newImage) notNil ifTrue:[
1583e5525196 menu order
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  8142
        self fetchImageData.
1008
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  8143
    ]
327f93d57c7b fixed d24 -> d8 conversion;
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  8144
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8145
    "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
  8146
! !
4e50c3164625 more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  8147
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  8148
!ImageEditor methodsFor:'user actions-editing'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  8149
3417
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8150
autoCropAll
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8151
    "find all borders and cut them off"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8152
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8153
    imageEditView autoCropLeft:true right:true top:true bottom:true.   
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8154
    self updateInfoLabel
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8155
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8156
    "Created: / 20-02-2017 / 18:05:38 / cg"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8157
!
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8158
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8159
autoCropBottom
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8160
    "find a bottom border and cut it off"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8161
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8162
    imageEditView autoCropLeft:false right:false top:false bottom:true.   
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8163
    self updateInfoLabel
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8164
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8165
    "Created: / 20-02-2017 / 18:05:45 / cg"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8166
!
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8167
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8168
autoCropLeft
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8169
    "find a left border and cut it off"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8170
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8171
    imageEditView autoCropLeft:true right:false top:false bottom:false.   
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8172
    self updateInfoLabel
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8173
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8174
    "Created: / 20-02-2017 / 18:05:52 / cg"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8175
!
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8176
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8177
autoCropRight
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8178
    "find a right border and cut it off"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8179
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8180
    imageEditView autoCropLeft:false right:true top:false bottom:false.   
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8181
    self updateInfoLabel
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8182
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8183
    "Created: / 20-02-2017 / 18:04:20 / cg"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8184
!
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8185
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8186
autoCropTop
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8187
    "find a top border and cut it off"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8188
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8189
    imageEditView autoCropLeft:false right:false top:true bottom:false.   
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8190
    self updateInfoLabel
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8191
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8192
    "Created: / 20-02-2017 / 18:06:03 / cg"
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8193
!
4960f19dca36 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  8194
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8195
ditherGrayToDepth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8196
    self askForDepthThenDo:[:depth |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8197
        self ditherGrayToDepth:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8198
    ].
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
    "Created: / 24-08-2017 / 17:49:42 / cg"
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
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8203
ditherGrayToDepth:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8204
    self withExecuteCursorDo:[
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8205
        |image newImage|
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8206
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8207
        image := self image.
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8208
        depth == 1 ifTrue:[
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8209
            newImage := image asErrorDitheredMonochromeImage
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8210
        ] ifFalse:[
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8211
            newImage := image asGrayImageDepth:depth dither:#floydSteinberg.
3476
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
        imageEditView newImageWithUndo:newImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8214
    ].
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
    "Created: / 24-08-2017 / 17:51:07 / cg"
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8217
    "Modified: / 23-10-2017 / 10:58:18 / cg"
3476
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
ditherToDepth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8221
    self askForDepthThenDo:[:depth |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8222
        self convertToDepth:depth dither:true
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8223
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8224
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8225
    "Created: / 07-07-2006 / 13:22:10 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8226
    "Modified: / 30-08-2017 / 00:34:42 / cg"
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
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8229
ditherToNumberOfGrayColors
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8230
    |oldDepth numGrayColors suggestion grayImage userInput grayColors|
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8231
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8232
    oldDepth := self image depth.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8233
    grayImage := self image asGrayImageDepth:8.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8234
    
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8235
    suggestion := LastNumThresholdGrayColors notNil ifTrue:[
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8236
                    LastNumThresholdGrayColors
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8237
                  ] ifFalse:[
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8238
                    oldDepth > 8 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8239
                        ifTrue:[256] 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8240
                        ifFalse:[2 raisedTo:((oldDepth // 2 - 1) nextPowerOf2)]
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8241
                  ].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8242
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8243
    Dialog modifyingBoxWith:[:box |
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8244
        |preview slider update thresholdValue|
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8245
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8246
        thresholdValue := suggestion asValue.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8247
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8248
        box enterField 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8249
            converter:(PrintConverter new initForNumber);
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8250
            model:thresholdValue.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8251
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8252
        box verticalPanel extent:1.0 @ 300.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8253
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8254
        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
  8255
        slider model:thresholdValue.
3690
79c13fe7d6bc #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  8256
        slider width:1.0; leftInset:4 rightInset:4.
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8257
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8258
        box verticalPanel add:(preview := ImageView new).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8259
        preview extent:300 @300.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8260
        preview level:-1.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8261
        box verticalPanel horizontalLayout:#fitSpace.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8262
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8263
        update := 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8264
            [
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8265
                |numGrayColors depth s t tImage|
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8266
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8267
                numGrayColors := thresholdValue value clampBetween:2 and:256.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8268
                grayColors := Color grayColorVector:numGrayColors.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8269
                tImage := grayImage asDitheredImageUsing:grayColors depth:(grayImage depth).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8270
                
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8271
                preview image:(tImage magnifiedPreservingRatioTo:preview extent).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8272
            ].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8273
        update value.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8274
        box enterField acceptOnLostFocus:true.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8275
        box enterField acceptOnLeave:true.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8276
        thresholdValue onChangeEvaluate:update.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8277
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8278
    ] do:[
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8279
        userInput := Dialog request:'Number of Gray Colors ?' initialAnswer:suggestion asString.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8280
    ].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8281
    userInput isEmptyOrNil ifTrue:[^ self].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8282
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8283
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8284
    numGrayColors := Number readFrom:userInput onError:nil.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8285
    numGrayColors isNil ifTrue:[^ self].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8286
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8287
    grayColors := Color grayColorVector:numGrayColors.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8288
    imageEditView newImageWithUndo:(grayImage asDitheredImageUsing:grayColors depth:(grayImage depth)).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8289
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8290
    "Created: / 23-10-2017 / 11:17:44 / cg"
3690
79c13fe7d6bc #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  8291
    "Modified: / 16-07-2019 / 16:37:46 / Claus Gittinger"
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8292
!
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8293
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8294
do3DProjection
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8295
    "make a naive 3D projection;
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8296
     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
  8297
     
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8298
    |box dx1 dx2 image|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8299
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8300
    image := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8301
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8302
    box := EnterBox new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8303
    box title:(resources string:'dX1 (0 < dx < 0.5):').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8304
    box okText:(resources string:'OK').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8305
    box abortText:(resources string:'Cancel').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8306
    box initialText:'0.1'.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8307
    box showAtPointer.
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
    (box accepted 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8310
    and: [(dx1 := Number readFrom:(box contents) onError:nil) notNil])
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8311
    ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8312
        box title:(resources string:'dX2 (0 < dx < 0.5):').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8313
        box initialText:(dx1 printString).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8314
        box showAtPointer.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8315
        (box accepted 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8316
        and: [(dx2 := Number readFrom:(box contents) onError:nil) notNil])
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8317
        ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8318
            imageEditView threeDProjection:dx1 and:dx2.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8319
        ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8320
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8321
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8322
    self updateInfoLabel
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8323
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8324
    "Modified (comment): / 31-08-2017 / 13:58:03 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8325
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8326
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8327
doBrightenImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8328
    imageEditView brightenImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8329
    self listOfColors removeAll.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8330
    self findColorMapMode.     
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8331
    "/ imageEditView removelastUndo
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8332
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8333
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8334
doBrowseClass
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8335
    "opens a System Browser on the resourceClass and the resourceSelector"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8336
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8337
    |cls|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8338
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8339
    cls := imageEditView resourceClass.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8340
    cls isNil ifTrue:[^ self warn:'No Class specified'].
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
    cls browserClass
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8343
        openInClass:cls class 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8344
        selector:(imageEditView resourceSelector)
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8345
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8346
    "Modified: / 31.7.1998 / 02:01:15 / cg"
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
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8349
doCopyImageToClipboard
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8350
    imageEditView copyImageToClipboard.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8351
!
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
doCropManual
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8354
    "let user specify borders and cut them off"
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
    |bindings left top right bottom img firstChange cropAction acceptChannel|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8357
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8358
    acceptChannel := TriggerValue new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8359
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8360
    firstChange := true.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8361
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8362
    cropAction := 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8363
        [:lV :rV :tV :bV | |l r t b|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8364
            acceptChannel value:true.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8365
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8366
            l := lV value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8367
            r := rV value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8368
            t := tV value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8369
            b := bV value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8370
            (l + r + t + b) == 0 ifTrue:[
3526
d27e02006468 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3513
diff changeset
  8371
                self window beepInEditor
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8372
            ] ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8373
                img := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8374
                firstChange ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8375
                    imageEditView makeUndo.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8376
                    firstChange := false.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8377
                ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8378
                imageEditView
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8379
                    makeSubImageX:l y:t 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8380
                    width:(img width - l - r)
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8381
                    height:(img height - t - b).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8382
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8383
                self updateImagePreView.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8384
                self updateInfoLabel
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8385
            ].
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
    bindings := IdentityDictionary new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8389
    bindings at:#cropLeftAmount put:(left := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8390
    bindings at:#cropRightAmount put:(right := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8391
    bindings at:#cropTopAmount put:(top := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8392
    bindings at:#cropBottomAmount put:(bottom := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8393
    bindings at:#acceptChannel put:acceptChannel.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8394
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8395
    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
  8396
    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
  8397
    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
  8398
    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
  8399
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8400
    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
  8401
    bindings at:#cropBoxIsDialog   put:true.
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
    (self openDialogInterface:#cropSpec withBindings:bindings) 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8404
    ifFalse:[ 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8405
        firstChange ~~ true ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8406
            imageEditView undo.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8407
            self updateImagePreView.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8408
        ]
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
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8411
    "Created: / 07-09-1998 / 18:16:07 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8412
    "Modified: / 19-02-2017 / 15:43:50 / cg"
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
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8415
doDarkenImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8416
    imageEditView darkenImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8417
    self listOfColors removeAll.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8418
    self findColorMapMode.     
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8419
    "/ imageEditView removelastUndo
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8420
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8421
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8422
doEditMask
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8423
    |mask|
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
    (mask := self image mask) notNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8426
        mask edit
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8427
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8428
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8429
    "Modified: / 18-02-2017 / 00:38:51 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8430
!
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
doFlipHorizontal
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8433
    "flips horizontally current image"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8434
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8435
    imageEditView flipHorizontal
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8436
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8437
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8438
doFlipVertical
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8439
    "flips vertically current image"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8440
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8441
    imageEditView flipVertical
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8442
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8443
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8444
doInsertTextFromUser
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8445
    |text tempForm tempImage maskImage font w h paintColor|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8446
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8447
    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
  8448
    text isEmptyOrNil ifTrue:[^ self ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8449
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8450
    font := Font family:'arial' size:20.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8451
    font := font onDevice:Screen current.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8452
    w := font widthOf:text.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8453
    h := font heightOf:text.
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
    tempForm := Form extent:(w@h) depth:1 onDevice:(Screen current).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8456
    tempForm clear.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8457
    tempForm font:font.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8458
    tempForm paint:(Color colorId:1).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8459
    tempForm displayString:text at:(0@font ascent).
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
    tempImage := tempForm asImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8462
    maskImage := tempForm asImage.
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
    paintColor := imageEditView selectedColor.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8465
    paintColor  colorId == 0 ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8466
        paintColor := Color black
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8467
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8468
    tempImage   
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8469
        photometric:#palette;
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8470
        colorMap:(Array 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8471
                    with:Color white 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8472
                    with:paintColor);
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8473
        mask:maskImage.
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 copyImageToClipboard:tempImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8476
    self editMode value:#paste.
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
    "Modified: / 11-11-2007 / 12:32:55 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8479
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8480
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8481
doInspectImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8482
    "opens a System Browser on the resourceClass and the resourceSelector"
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
    self image inspect
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8485
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8486
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8487
doInvertedBitsImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8488
    "inverts the pixels"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8489
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8490
    self withExecuteCursorDo:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8491
        imageEditView makeInvertedBits.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8492
        self updateImage.
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
"/    imageEditView negativeImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8496
"/    self listOfColors removeAll.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8497
"/    self findColorMapMode.     
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8498
"/    "/ imageEditView removelastUndo
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
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8502
    "Created: / 31-08-2017 / 12:49:13 / cg"
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
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8505
doMagnifyDown
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8506
    "magnifies the current image one step down"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8507
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8508
    |magHolder mag|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8509
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8510
    magHolder := self magnificationHolder.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8511
    (mag := magHolder value) > 1 ifTrue: [
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8512
        magHolder value: mag - 1
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8513
    ]
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8514
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8515
    "Modified: / 26.7.1998 / 20:24:08 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8516
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8517
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8518
doMagnifyImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8519
    "magnifies the current image to a new size"
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
    |box newSize image antiAliased|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8522
3550
b31b44c04a3e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3546
diff changeset
  8523
    antiAliased := (LastMagnifySmoothing ? false) asValue.
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8524
    image := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8525
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8526
    box := EnterBox new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8527
    box title:(resources string:'Images new size:').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8528
    box okText:(resources string:'OK').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8529
    box abortText:(resources string:'Cancel').
3550
b31b44c04a3e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3546
diff changeset
  8530
    box initialText:(LastMagnifyTo ? image extent) printString.
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8531
    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
  8532
    box showAtPointer.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8533
    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8534
    (box accepted 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8535
    and: [(newSize := self pointFromString:(box contents)) notNil])
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8536
    ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8537
        newSize isPoint ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8538
            self warn:'Please enter the new size as ''x @ y''.'.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8539
            ^ self.    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8540
        ].
3550
b31b44c04a3e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3546
diff changeset
  8541
        LastMagnifyTo := newSize.
b31b44c04a3e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3546
diff changeset
  8542
        LastMagnifySmoothing := antiAliased value.
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8543
        antiAliased value ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8544
            ((newSize x < image width) or:[(newSize y < image height)]) ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8545
                imageEditView magnifySmoothingTo:newSize.    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8546
            ] ifFalse:[    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8547
                imageEditView magnifyAntiAliasedImageTo:newSize.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8548
            ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8549
        ] ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8550
            imageEditView magnifyImageTo:newSize.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8551
        ].
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
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8554
    self updateInfoLabel
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8555
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8556
    "Modified: / 30-08-2017 / 15:46:02 / cg"
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
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8559
doMagnifyImageBy
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8560
    "magnifies the current image (by a scale)"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8561
3550
b31b44c04a3e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3546
diff changeset
  8562
    |oldSize newSize scaleString scale image smoothing|
3476
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
    image := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8565
    oldSize := image extent.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8566
3550
b31b44c04a3e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3546
diff changeset
  8567
    smoothing := (LastMagnifySmoothing ? false) asValue.
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8568
    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8569
    Dialog modifyingBoxWith:[:box |
3550
b31b44c04a3e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3546
diff changeset
  8570
        box verticalPanel add:(CheckBox label:(resources string:'Antialias/Smooth') model:smoothing).
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8571
        "/ box verticalPanel add:(CheckBox label:(resources string:'Smoothing') model:smoothing).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8572
    ] do:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8573
        scaleString := Dialog 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8574
                   request:(resources string:'Scale factor (<1 to shrink; >1 to magnify):') 
3550
b31b44c04a3e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3546
diff changeset
  8575
                   initialAnswer:(LastMagnifyBy ? 1) printString
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8576
                   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
  8577
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8578
    scaleString isNil ifTrue:[^ self].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8579
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8580
    scale := Object readFromString:scaleString onError:nil.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8581
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8582
    scale notNil ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8583
        scale isNumber ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8584
            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
  8585
            ^ self.    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8586
        ].
3550
b31b44c04a3e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3546
diff changeset
  8587
b31b44c04a3e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3546
diff changeset
  8588
        LastMagnifyBy := scale.
b31b44c04a3e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3546
diff changeset
  8589
        LastMagnifySmoothing := smoothing value.
b31b44c04a3e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3546
diff changeset
  8590
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8591
        newSize := oldSize * scale.
3550
b31b44c04a3e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3546
diff changeset
  8592
        smoothing value ifTrue:[
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8593
            scale < 1 ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8594
                imageEditView magnifySmoothingBy:scale.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8595
            ] ifFalse:[    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8596
                imageEditView magnifyAntiAliasedImageTo:newSize.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8597
            ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8598
        ] ifFalse:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8599
            imageEditView magnifyImageTo:newSize.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8600
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8601
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8602
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8603
    self updateInfoLabel
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
    "Modified: / 30-08-2017 / 15:34:56 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8606
!
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
doMagnifyUp
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8609
    "magnifies the current image one step up"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8610
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8611
    |magHolder mag|
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
    magHolder := self magnificationHolder.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8614
    (mag := magHolder value) < 63 ifTrue: [
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8615
        magHolder value: mag + 1
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
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8618
    "Modified: / 26.7.1998 / 20:23:52 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8619
!
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
doResizeImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8622
    "resizes the current image"
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
    |box newSize image|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8625
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8626
    image := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8627
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8628
    box := EnterBox new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8629
    box title:(resources string:'Images new size:').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8630
    box okText:(resources string:'OK').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8631
    box abortText:(resources string:'Cancel').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8632
    box initialText:image extent printString.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8633
    box showAtPointer.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8634
    (box accepted 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8635
    and: [(newSize := self pointFromString:(box contents)) notNil])
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8636
    ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8637
        imageEditView resizeImageTo:newSize.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8638
    ].
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
doRotateImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8642
    "rotates current image"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8643
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8644
    |rotationString box rotation|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8645
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8646
    rotationString := Dialog 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8647
                        request:(resources string:'Rotate by (degrees, clockwise):')
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8648
                        list:#( '-90' '90' '180' '45' '-45'  '135' '-135' ) 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8649
                        initialAnswer:90.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8650
    rotationString isEmptyOrNil ifTrue:[^ self].    "/ canceled
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8651
    rotation := Number readFrom:rotationString onError:[nil].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8652
    rotation isNil ifTrue:[^ self].   
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8653
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8654
"/    box := EnterBox new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8655
"/    box title:(resources string:'Rotate by (degrees, clockwise):').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8656
"/    box okText:(resources string:'OK').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8657
"/    box abortText:(resources string:'Cancel').
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8658
"/    box initialText: '0'.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8659
"/    box showAtPointer.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8660
"/    (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
  8661
"/    ifFalse:[ ^ self ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8662
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8663
    imageEditView rotateImageBy:rotation.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8664
    self updateInfoLabel.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8665
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8666
    "Modified: / 18-03-2012 / 14:41:14 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8667
    "Modified (comment): / 24-08-2017 / 15:02:57 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8668
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8669
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8670
doShiftManual
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8671
    "let user specify amount and shift"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8672
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8673
    |bindings amount img firstChange shiftAction acceptChannel wrapHolder|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8674
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8675
    acceptChannel := TriggerValue new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8676
    wrapHolder := (lastShiftUsedWrap ? true) asValue.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8677
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8678
    firstChange := true.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8679
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8680
    shiftAction := 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8681
        [:shiftH :shiftV | 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8682
            acceptChannel value:true.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8683
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8684
            img := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8685
            firstChange ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8686
                imageEditView makeUndo.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8687
                firstChange := false.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8688
            ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8689
            imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8690
            self updateInfoLabel
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8691
        ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8692
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8693
    bindings := IdentityDictionary new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8694
    bindings at:#shiftAmount put:(amount := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8695
    bindings at:#wrap put:wrapHolder.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8696
    bindings at:#acceptChannel put:acceptChannel.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8697
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8698
    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
  8699
    bindings at:#shiftRightNow  put:[ shiftAction value:amount value value:0 ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8700
    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
  8701
    bindings at:#shiftDownNow   put:[ shiftAction value:0 value:amount value ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8702
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8703
    (self openDialogInterface:#shiftDialogSpec withBindings:bindings) 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8704
    ifFalse:[ 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8705
        firstChange ~~ true ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8706
          imageEditView undo
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
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8709
    lastShiftUsedWrap := wrapHolder value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8710
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8711
    "Created: / 7.9.1998 / 18:16:07 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8712
    "Modified: / 7.9.1998 / 18:20:42 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8713
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8714
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8715
doUnCropManual
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8716
    "let user specify borders and add them"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8717
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8718
    |bindings leftAmount topAmount rightAmount bottomAmount img|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8719
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8720
    bindings := IdentityDictionary new.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8721
    bindings at:#cropLeftAmount put:(leftAmount := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8722
    bindings at:#cropRightAmount put:(rightAmount := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8723
    bindings at:#cropTopAmount put:(topAmount := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8724
    bindings at:#cropBottomAmount  put:(bottomAmount := 1 asValue).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8725
    bindings at:#cropBoxIsDialog   put:true.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8726
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8727
    (self openDialogInterface:#uncropSpec withBindings:bindings)
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8728
    ifTrue:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8729
        leftAmount := leftAmount value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8730
        rightAmount := rightAmount value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8731
        topAmount := topAmount value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8732
        bottomAmount := bottomAmount value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8733
        img := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8734
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8735
        imageEditView
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8736
            makeBorderedImageX:leftAmount y:topAmount 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8737
            width:(img width + leftAmount + rightAmount)
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8738
            height:(img height + topAmount + bottomAmount).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8739
        self updateInfoLabel
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8740
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8741
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8742
    "Created: / 07-09-1998 / 18:16:07 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8743
    "Modified: / 19-02-2017 / 15:31:00 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8744
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8745
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8746
doUndo
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8747
    "reverses last edit action"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8748
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8749
    imageEditView undo.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8750
    self updateImagePreView
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8751
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8752
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8753
makeInverse
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8754
    "inverts the pixels - for palettes, this leads to funny results"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8755
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8756
    self updateImageAfterDoing:#makeInverse.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8757
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8758
    "Modified: / 31-08-2017 / 12:16:07 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8759
    "Modified (comment): / 31-08-2017 / 13:51:28 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8760
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8761
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8762
makeMonochromeImage
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8763
    "let user choose a threshold, then convert to monochrome"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8764
    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8765
    |image userInput thresholdBrighness|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8766
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8767
    image := imageEditView image.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8768
    
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8769
    Dialog modifyingBoxWith:[:box |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8770
        |preview slider update thresholdValue|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8771
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8772
        thresholdValue := 0.5 asValue.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8773
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8774
        box enterField 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8775
            converter:(PrintConverter new initForNumber);
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8776
            model:thresholdValue.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8777
            
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8778
        box verticalPanel extent:1.0 @ 300.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8779
        
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8780
        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
  8781
        slider model:thresholdValue.
3690
79c13fe7d6bc #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  8782
        slider width:1.0; leftInset:4 rightInset:4.
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8783
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8784
        box verticalPanel add:(preview := ImageView new).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8785
        preview extent:300 @300.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8786
        preview level:-1.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8787
        box verticalPanel horizontalLayout:#fitSpace.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8788
        
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8789
        update := 
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8790
            [
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8791
                |s t|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8792
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8793
                t := thresholdValue value clampBetween:0 and:1.   
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8794
                preview image:((image asThresholdMonochromeImage:t)
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8795
                            magnifiedPreservingRatioTo:preview extent).
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8796
            ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8797
        update value.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8798
        box enterField acceptOnLostFocus:true.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8799
        box enterField acceptOnLeave:true.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8800
        thresholdValue onChangeEvaluate:update.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8801
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8802
    ] do:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8803
        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
  8804
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8805
    userInput isEmptyOrNil ifTrue:[^ self].
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8806
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8807
    thresholdBrighness := Number readFrom:userInput onError:nil.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8808
    thresholdBrighness isNil ifTrue:[^ self].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8809
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8810
    thresholdBrighness := thresholdBrighness clampBetween:0 and:1.
3478
1b4386fd1953 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3477
diff changeset
  8811
    
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8812
    imageEditView newImageWithUndo:(image asThresholdMonochromeImage:thresholdBrighness)
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8813
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8814
    "Created: / 24-08-2017 / 15:26:44 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8815
    "Modified: / 24-08-2017 / 17:54:21 / cg"
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8816
    "Modified (format): / 23-10-2017 / 10:42:52 / cg"
3690
79c13fe7d6bc #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  8817
    "Modified: / 16-07-2019 / 16:37:50 / Claus Gittinger"
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8818
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8819
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8820
makeNegative
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8821
    "negates current image by negating the color map"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8822
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8823
    self withExecuteCursorDo:[
3477
52202af265c2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3476
diff changeset
  8824
        imageEditView makeNegative.
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8825
        self updateImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8826
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8827
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8828
    "Created: / 31-08-2017 / 13:49:47 / cg"
3477
52202af265c2 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3476
diff changeset
  8829
    "Modified (comment): / 01-09-2017 / 10:27:37 / cg"
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8830
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8831
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8832
thresholdGrayToDepth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8833
    self askForDepthThenDo:[:depth |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8834
        self thresholdGrayToDepth:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8835
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8836
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8837
    "Created: / 24-08-2017 / 17:49:23 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8838
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8839
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8840
thresholdGrayToDepth:depth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8841
    self withExecuteCursorDo:[
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8842
        |newImage|
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8843
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8844
        newImage := self image asThresholdGrayImageDepth:depth.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8845
        imageEditView newImageWithUndo:newImage.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8846
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8847
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8848
    "Created: / 24-08-2017 / 17:49:30 / cg"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8849
!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8850
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8851
thresholdToDepth
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8852
    self askForDepthThenDo:[:depth |
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8853
        self convertToDepth:depth dither:false
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8854
    ].
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8855
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8856
    "Created: / 30-08-2017 / 00:31:33 / cg"
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8857
!
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8858
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8859
thresholdToNumberOfGrayColors
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8860
    |oldDepth numGrayColors suggestion grayImage userInput grayColors|
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8861
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8862
    oldDepth := self image depth.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8863
    grayImage := self image asGrayImageDepth:8.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8864
    
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8865
    suggestion := LastNumThresholdGrayColors notNil ifTrue:[
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8866
                    LastNumThresholdGrayColors
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8867
                  ] ifFalse:[
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8868
                    oldDepth > 8 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8869
                        ifTrue:[256] 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8870
                        ifFalse:[2 raisedTo:((oldDepth // 2 - 1) nextPowerOf2)]
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8871
                  ].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8872
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8873
    Dialog modifyingBoxWith:[:box |
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8874
        |preview slider update thresholdValue|
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8875
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8876
        thresholdValue := suggestion asValue.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8877
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8878
        box enterField 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8879
            converter:(PrintConverter new initForNumber);
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8880
            model:thresholdValue.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8881
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8882
        box verticalPanel extent:1.0 @ 300.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8883
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8884
        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
  8885
        slider model:thresholdValue.
3690
79c13fe7d6bc #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  8886
        slider width:1.0; leftInset:4 rightInset:4.
3497
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8887
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8888
        box verticalPanel add:(preview := ImageView new).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8889
        preview extent:300 @300.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8890
        preview level:-1.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8891
        box verticalPanel horizontalLayout:#fitSpace.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8892
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8893
        update := 
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8894
            [
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8895
                |numGrayColors depth s t tImage|
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8896
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8897
                numGrayColors := thresholdValue value clampBetween:2 and:256.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8898
                grayColors := Color grayColorVector:numGrayColors.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8899
                tImage := grayImage asNearestPaintImageDepth:(grayImage depth) colors:grayColors.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8900
                
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8901
                preview image:(tImage magnifiedPreservingRatioTo:preview extent).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8902
            ].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8903
        update value.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8904
        box enterField acceptOnLostFocus:true.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8905
        box enterField acceptOnLeave:true.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8906
        thresholdValue onChangeEvaluate:update.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8907
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8908
    ] do:[
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8909
        userInput := Dialog request:'Number of Gray Colors ?' initialAnswer:suggestion asString.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8910
    ].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8911
    userInput isEmptyOrNil ifTrue:[^ self].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8912
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8913
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8914
    numGrayColors := Number readFrom:userInput onError:nil.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8915
    numGrayColors isNil ifTrue:[^ self].
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8916
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8917
    grayColors := Color grayColorVector:numGrayColors.
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8918
    imageEditView newImageWithUndo:(grayImage asNearestPaintImageDepth:(grayImage depth) colors:grayColors).
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8919
632e25674f39 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3496
diff changeset
  8920
    "Created: / 23-10-2017 / 10:55:15 / cg"
3690
79c13fe7d6bc #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  8921
    "Modified: / 16-07-2019 / 16:37:54 / Claus Gittinger"
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8922
! !
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8923
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8924
!ImageEditor methodsFor:'user actions-editing-colors'!
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  8925
3471
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8926
convertToDepth:depth dither:doDither
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8927
    |answer labels values 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8928
     ditherColors fixColors
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8929
     nGrey greyColorsAlready moreColors d|
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8930
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8931
    "/ no colormap above 12 bits!!
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8932
    depth > 12 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8933
        answer := #TrueColor.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8934
    ] ifFalse:[    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8935
        doDither ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8936
            (depth >= 8) ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8937
                labels := #('Cancel' 'Use Browser Palette' 'Use Standard' 'Compute' 'TrueColor').
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8938
                values := #(nil UseBrowserPalette UseStandard Compute TrueColor).
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8939
            ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8940
                depth == 1 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8941
                    answer := #UseStandard
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8942
                ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8943
                    labels := #('Cancel' 'Use Standard' 'Compute' 'TrueColor').
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8944
                    values := #(nil UseStandard Compute TrueColor). 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8945
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8946
            ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8947
        ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8948
            (depth >= 8) ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8949
                labels := #('Cancel' 'Use Browser Palette' 'Use Standard' 'TrueColor').
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8950
                values := #(nil UseBrowserPalette UseStandard TrueColor).
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8951
            ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8952
                answer := #UseStandard
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8953
            ].    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8954
        ].    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8955
    ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8956
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8957
    answer isNil ifTrue:[    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8958
        answer := OptionBox
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8959
                  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
  8960
                  label:(resources string:'Dither how')
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8961
                  image:(YesNoBox iconBitmap)
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8962
                  buttonLabels:(resources array:labels)
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8963
                  values:values
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8964
                  default:#UseStandard
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8965
                  onCancel:nil.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8966
        answer isNil ifTrue:[^ self].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8967
    ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8968
    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8969
    (answer == #Compute) ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8970
        ditherColors :=
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8971
            Color
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8972
                best:(1 bitShift:depth) 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8973
                ditherColorsForImage:self image
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8974
    ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8975
        (answer == #UseBrowserPalette) ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8976
            ditherColors := Color colorCubeWithRed:6 green:6 blue:6. 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8977
        ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8978
            answer == #TrueColor ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8979
                depth == 6 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8980
                    fixColors := FixedPalette 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8981
                                    redShift:4 redMask:3
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8982
                                    greenShift:2 greenMask:3
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8983
                                    blueShift:0 blueMask:3
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8984
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8985
                depth == 9 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8986
                    fixColors := FixedPalette 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8987
                                    redShift:6 redMask:7
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8988
                                    greenShift:3 greenMask:7
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8989
                                    blueShift:0 blueMask:7
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8990
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8991
                depth == 12 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8992
                    fixColors := FixedPalette 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8993
                                    redShift:8 redMask:16r0F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8994
                                    greenShift:4 greenMask:16r0F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8995
                                    blueShift:0 blueMask:16r0F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8996
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8997
                depth == 15 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8998
                    fixColors := FixedPalette 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  8999
                                    redShift:10 redMask:16r1F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9000
                                    greenShift:5 greenMask:16r1F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9001
                                    blueShift:0 blueMask:16r1F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9002
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9003
                depth == 16 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9004
                    fixColors := FixedPalette 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9005
                                    redShift:11 redMask:16r1F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9006
                                    greenShift:5 greenMask:16r3F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9007
                                    blueShift:0 blueMask:16r1F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9008
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9009
                depth == 18 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9010
                    fixColors := FixedPalette 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9011
                                    redShift:12 redMask:16r3F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9012
                                    greenShift:6 greenMask:16r3F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9013
                                    blueShift:0 blueMask:16r3F
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9014
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9015
            ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9016
                depth == 1 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9017
                    ditherColors := { Color black . Color white }.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9018
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9019
                depth == 2 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9020
                    ditherColors := { Color black . Color darkGray  .Color lightGray . Color white }.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9021
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9022
                depth = 3 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9023
                    ditherColors := Color colorCubeWithRed:2 green:2 blue:2. 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9024
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9025
                depth = 4 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9026
                    ditherColors := Color vgaColors. 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9027
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9028
                depth = 5 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9029
                    ditherColors := Color colorCubeWithRed:3 green:4 blue:2.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9030
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9031
                depth = 6 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9032
                    ditherColors := Color colorCubeWithRed:4 green:4 blue:3.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9033
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9034
                depth = 7 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9035
                    ditherColors := Color colorCubeWithRed:5 green:5 blue:4. 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9036
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9037
                depth == 8 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9038
                    ditherColors := Color standardDitherColorsForDepth8. 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9039
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9040
                depth == 9 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9041
                    ditherColors := Color colorCubeWithRed:8 green:8 blue:8. 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9042
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9043
                ditherColors isNil ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9044
                    self error:'unsupported depth'.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9045
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9046
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9047
                "/ add as many gray colors as possible.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9048
                nGrey := (2 raisedTo:depth) - ditherColors size.  
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9049
                nGrey > 0 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9050
                    nGrey := nGrey min:100.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9051
                    greyColorsAlready := ditherColors select:[:clr | clr isGreyColor].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9052
                    d := 1 / nGrey.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9053
                    moreColors := (1 to:nGrey-1) 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9054
                                    collect:[:i | Color brightness:(d * i)] 
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9055
                                    thenReject:[:clr | greyColorsAlready includes:clr ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9056
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9057
                    ditherColors := ditherColors , moreColors.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9058
                ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9059
            ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9060
        ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9061
    ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9062
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9063
    self withExecuteCursorDo:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9064
        |newImage|
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9065
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9066
        doDither ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9067
            depth == 1 ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9068
                newImage := self image asErrorDitheredMonochromeImage
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9069
            ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9070
                answer == #TrueColor ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9071
                    newImage := self image asDitheredImageUsing:fixColors depth:depth.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9072
                ] ifFalse:[    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9073
                    newImage := self image asDitheredImageUsing:ditherColors depth:depth.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9074
                ]
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9075
            ]
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9076
        ] ifFalse:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9077
            answer == #TrueColor ifTrue:[
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9078
                self halt.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9079
            ] ifFalse:[    
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9080
                newImage := self image asNearestPaintImageDepth:depth colors:ditherColors
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9081
            ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9082
        ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9083
        imageEditView newImageWithUndo:newImage.
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9084
    ].
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9085
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9086
    "Created: / 30-08-2017 / 00:33:55 / cg"
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9087
    "Modified: / 30-08-2017 / 02:13:03 / cg"
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9088
!
95c973cafdc1 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  9089
3598
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9090
exchangeGreenBlueChannels
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9091
    self updateImageAfterDoing:#exchangeGreenBlueChannels.
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9092
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9093
    "Created: / 31-08-2017 / 13:51:10 / cg"
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9094
!
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9095
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9096
exchangeRedBlueChannels
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9097
    self updateImageAfterDoing:#exchangeRedBlueChannels.
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9098
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9099
    "Created: / 31-08-2017 / 13:51:10 / cg"
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9100
!
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9101
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9102
exchangeRedGreenChannels
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9103
    self updateImageAfterDoing:#exchangeRedGreenChannels.
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9104
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9105
    "Created: / 31-08-2017 / 13:51:10 / cg"
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9106
!
76dd8e2f2fd8 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  9107
3476
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  9108
makeInvertedBits
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  9109
    "inverts the pixels - for palettes, this leads to funny results.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  9110
     For others, this is the same as negating"
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  9111
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  9112
    self updateImageAfterDoing:#makeInvertedBits.
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  9113
2854769b212a #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3475
diff changeset
  9114
    "Created: / 31-08-2017 / 13:51:10 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9115
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  9116
2812
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9117
!ImageEditor methodsFor:'user actions-image sequences'!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9118
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9119
editEachImageFromSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9120
    |seq|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9121
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9122
    self checkModified ifFalse:[ ^ self ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9123
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9124
    imageEditView releaseUndos.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9125
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9126
    seq := self image imageSequence.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9127
    seq size > 10 ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9128
        (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
  9129
            ifFalse:[^ self].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9130
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9131
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9132
    seq do:[:eachFrame |
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9133
        ImageEditor openOnImage:eachFrame image
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9134
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9135
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9136
    "Modified: / 21-10-2010 / 15:01:25 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9137
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9138
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9139
gotoImageInSequence:index
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9140
    "display the next image in the image sequence"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9141
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9142
    |img seq frame listOfColors|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9143
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9144
    imageEditView releaseUndos.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9145
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9146
    seq := self image imageSequence.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9147
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9148
    imageSeqNr := index.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9149
    frame := seq at:imageSeqNr.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9150
    imageEditView image:(frame image).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9151
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9152
    (img := self image) notNil ifTrue:[          
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9153
        listOfColors := self listOfColors.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9154
        img colorMap notNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9155
            listOfColors contents:(img usedColors asSet asOrderedCollection).
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9156
        ] ifFalse:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9157
            listOfColors removeAll.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9158
        ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9159
        self findColorMapMode.     
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9160
        self updateLabelsAndHistory.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9161
        img := img onDevice:device.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9162
        imageEditView image:img.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9163
    ] ifFalse:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9164
        self updateForNoImage
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9165
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9166
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9167
    "Created: / 21-10-2010 / 14:22:11 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9168
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9169
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9170
nextImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9171
    "display the next image in the image sequence"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9172
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9173
    |seq index|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9174
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9175
    seq := self image imageSequence.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9176
    (index := imageSeqNr) isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9177
        index := 1.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9178
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9179
    index := index + 1.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9180
    index > seq size ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9181
        self information:'Back to first image in sequence'.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9182
        index := 1.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9183
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9184
    self gotoImageInSequence:index.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9185
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9186
    "Modified: / 21-10-2010 / 14:24:11 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9187
!
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9188
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9189
previousImageInSequence
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9190
    "display the previous image in the image sequence"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9191
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9192
    |seq index|
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9193
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9194
    seq := self image imageSequence.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9195
    (index := imageSeqNr) isNil ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9196
        index := 1.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9197
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9198
    index := index - 1.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9199
    index < 1 ifTrue:[
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9200
        self information:'Wrap to last image in sequence'.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9201
        index := seq size.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9202
    ].
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9203
    self gotoImageInSequence:index.
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9204
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9205
    "Created: / 21-10-2010 / 14:25:03 / cg"
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9206
! !
371a8522bbd5 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2807
diff changeset
  9207
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  9208
!ImageEditor methodsFor:'user actions-loading'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9209
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9210
doLoadFromClass
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9211
    "opens a dialog for loading an image from class and a (resource-) selector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9212
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  9213
    |img|
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  9214
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9215
    self checkModified ifFalse:[ ^ self ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9216
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  9217
    (imageEditView loadFromClass) notNil ifTrue:[
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  9218
        imageSeqNr := nil.
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  9219
        (img := self image) notNil ifTrue: [
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  9220
            self updateColorsFromImage:img.
574
8d82e8f101c1 undo disabling
tz
parents: 573
diff changeset
  9221
            self findColorMapMode.
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  9222
            self updateLabelsAndHistory.
1054
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  9223
        ] ifFalse: [
ef98bc11d1fd addColor
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  9224
            self updateForNoImage
1376
ce3cf26e201e change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents: 1353
diff changeset
  9225
        ].
449
dac8dc1f9dc8 if none image found for loading clear all
tz
parents: 444
diff changeset
  9226
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9227
!
228524287573 intitial checkin
tz
parents:
diff changeset
  9228
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9229
doLoadFromFile
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9230
    "opens a dialog for loading an image from a file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9231
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9232
    |img file filters title|
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9233
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9234
    self checkModified ifFalse:[ ^ self ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9235
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  9236
    imageSeqNr := nil.
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9237
    img := self image.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9238
    img notNil ifTrue: [
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9239
        file := img fileName
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9240
    ].
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9241
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  9242
    title := (resources string:'Load Image from File:').
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9243
3066
a8e197ceebed Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 3050
diff changeset
  9244
    (UserPreferences current useNativeFileDialog
3100
d2310ff3cbab class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3080
diff changeset
  9245
     and:[Screen current isWindowsPlatform]) ifTrue:[
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9246
        self withWaitCursorDo:[
3623
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9247
            file isNil ifTrue:[
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9248
                file := LastDirectory.
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9249
                file notNil ifTrue:[
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9250
                    file := file asFilename / 'image.png'.
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9251
                ].
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9252
            ].
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9253
3066
a8e197ceebed Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 3050
diff changeset
  9254
            file := Screen current
3623
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9255
                nativeFileDialogWithTitle:title
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9256
                defaultFilename:file
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9257
                owningTopView:self window topView
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9258
                filter:{
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9259
                    {(resources string:'Image Files'). '*.tif;*.png;*.gif;*.bmp;*.jpg'}.
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9260
                    {(resources string:'All Files').   '*.*'} 
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9261
                }
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9262
                filterIndex:nil
3624
2b1381d671fc #REFACTORING by sr
sr
parents: 3623
diff changeset
  9263
                trueForSave:false
3625
b05e45a69b82 #REFACTORING by sr
sr
parents: 3624
diff changeset
  9264
                trueForMultiSelect:false
3624
2b1381d671fc #REFACTORING by sr
sr
parents: 3623
diff changeset
  9265
                trueForPromptOverwrite:false.
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9266
        ].
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9267
    ] ifFalse:[    
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9268
        filters := FileSelectionBrowser loadImageFileNameFilters.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9269
        file notNil ifTrue:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9270
            file := FileSelectionBrowser
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9271
                        request:title
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9272
                        fileName:file
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9273
                        withFileFilters:filters.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9274
        ] ifFalse:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9275
            file := FileSelectionBrowser
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9276
                        request:title
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9277
                        inDirectory:LastDirectory
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9278
                        withFileFilters:filters.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9279
        ].
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9280
    ].
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9281
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9282
    file notNil ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9283
        LastDirectory := file asFilename directoryName.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9284
        self loadFromFile:file
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9285
    ]
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9286
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  9287
    "Modified: / 16-02-2017 / 10:53:41 / cg"
3625
b05e45a69b82 #REFACTORING by sr
sr
parents: 3624
diff changeset
  9288
    "Modified: / 25-10-2018 / 10:55:54 / sr"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9289
!
228524287573 intitial checkin
tz
parents:
diff changeset
  9290
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9291
doLoadFromURL
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9292
    "opens a dialog for loading an image from a URL"
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9293
2866
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9294
    |tempFile url response|
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9295
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9296
    self checkModified ifFalse:[ ^ self ].
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9297
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9298
    url := Dialog 
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  9299
                request:(resources string:'Load Image from URL:')
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9300
                initialAnswer:LastURL.
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9301
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9302
    url notEmptyOrNil ifTrue:[
3050
238571e2a33b class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3027
diff changeset
  9303
        HTTPInterface isNil ifTrue:[ Smalltalk loadPackage:'stx:goodies/communication'].
238571e2a33b class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3027
diff changeset
  9304
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9305
        LastURL := url.
3027
50657c666fdc class: ImageEditor
Stefan Vogel <sv@exept.de>
parents: 3022
diff changeset
  9306
        tempFile := FileStream newTemporary close fileName.
2866
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9307
        self withWaitCursorDo:[
3492
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9308
            |newURL|
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9309
            
2866
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9310
            response := HTTPInterface get:url destinationFile:tempFile.
3492
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9311
            response isMovedResponse ifTrue:[
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9312
                newURL  := response location.
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9313
                newURL ~= url ifTrue:[
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9314
                    response := HTTPInterface get:newURL destinationFile:tempFile.
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9315
                ].    
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9316
            ].    
2866
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9317
        ].
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9318
        response isErrorResponse ifTrue:[
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9319
            Dialog warn:(resources string:'Could not load image ("%1")' with:response responseText).
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9320
        ] ifFalse:[
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9321
            self loadFromFile:tempFile.
10f8ee0f23fe changed: #doLoadFromURL
Claus Gittinger <cg@exept.de>
parents: 2841
diff changeset
  9322
        ].
3552
2a1e3a914c9a #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3550
diff changeset
  9323
        tempFile remove
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9324
    ]
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9325
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9326
    "Created: / 20-09-2010 / 11:30:59 / cg"
3492
f212578d1276 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3489
diff changeset
  9327
    "Modified: / 13-09-2017 / 17:00:28 / cg"
2796
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9328
!
f589f0efbaaf +loadFromURL
Claus Gittinger <cg@exept.de>
parents: 2792
diff changeset
  9329
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9330
doNewImage
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9331
    "opens a dialog with choices of size and color map for creating a new image"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9332
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9333
    |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
  9334
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9335
    self checkModified ifFalse:[ ^ self ].
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9336
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9337
    defaultSize := (self class listOfDefaultSizes includes:'32x32') 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9338
                        ifTrue:['32x32'] 
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9339
                        ifFalse:[self class listOfDefaultSizes first].
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9340
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9341
    dialogAspects  := IdentityDictionary new
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9342
        at:#listOfSizes         put: self class listOfDefaultSizes asValue;
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9343
        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
  9344
        at:#selectionOfSize     put: (LastSizeString ? defaultSize) asValue;
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9345
        at:#selectionOfColorMap put: (LastColormapMode ? self class namesOfColorMaps values asSortedCollection first) asValue;
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9346
        yourself.
228524287573 intitial checkin
tz
parents:
diff changeset
  9347
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9348
    (self openDialogInterface:#dialogSpecForNewImage withBindings:dialogAspects)
1383
179597c2abed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1381
diff changeset
  9349
    ifTrue:[
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9350
        szString := (dialogAspects at:#selectionOfSize) value.
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  9351
        ext := self pointFromString:szString.
1962
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  9352
        ext isNil ifTrue:[
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  9353
            width := height := 32
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  9354
        ] ifFalse:[
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  9355
            width := ext x.
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  9356
            height := ext y.
9166ba3ce7c3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1961
diff changeset
  9357
        ].
1960
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  9358
"/        width  := "128 min: "(Integer readFromString: (szString upTo: $x) onError:[32]).
62c7258f3c31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1952
diff changeset
  9359
"/        height := "128 min: " (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[32]).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9360
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9361
        cMapString := (dialogAspects at:#selectionOfColorMap) value.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9362
        cMapMode   := self class namesOfColorMaps keyAtEqualValue:cMapString.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9363
        cMap       := self class listOfColorMaps at:cMapMode.
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9364
        depth := (cMapMode startsWith:'depth') 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9365
                    ifTrue:[ Integer readFrom:(cMapMode copyFrom:'depth' size + 1) ]
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9366
                    ifFalse:[ 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9367
                        (cMapMode startsWith:'masked') 
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9368
                            ifTrue:[ Integer readFrom:(cMapMode copyFrom:'masked' size + 1) ]
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9369
                            ifFalse:[ cMap size highBit-1 ]].
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9370
        imageClass := Image implementorForDepth:depth.
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9371
        image      := imageClass width: width height: height.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9372
        image bits:(ByteArray new:(image bytesPerRow*height)).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9373
1637
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  9374
        LastSizeString := szString.
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  9375
        LastColormapMode := cMapString.
2b0f24d74f8e new ui-layout
Claus Gittinger <cg@exept.de>
parents: 1613
diff changeset
  9376
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9377
        (cMapMode startsWith:'mask') ifTrue:[
3125
9d5624af77ab Sending of Image>>#clearMaskedPixels moved to Image >> #asFormOnDevice:
Stefan Vogel <sv@exept.de>
parents: 3122
diff changeset
  9378
            image mask: (ImageMask width: width height: height depth: 1 fromArray: (ByteArray new: width*height)).
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9379
        ].
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9380
        depth == 32 ifTrue:[
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9381
            image photometric:#rgba
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9382
        ] ifFalse:[    
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9383
            image colorMap: cMap.
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9384
        ].
1847
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9385
        (imageEditView image: image) notNil ifTrue:[
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9386
            self updateListOfColorsAndColormapMode.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9387
            self updateLabelsAndHistory.
d7e8ec4f3696 partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents: 1843
diff changeset
  9388
        ].
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9389
        image fillRectangleX:0 y:0 width:width height:height with:Color white.
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9390
    ]
3494
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9391
50e94e3563fa #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3493
diff changeset
  9392
    "Modified: / 13-09-2017 / 23:57:52 / cg"
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  9393
!
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  9394
2058
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9395
doNewImageEditor
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9396
    "opens a new image editor"
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9397
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9398
    ImageEditor open
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9399
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9400
    "Created: / 17-08-2006 / 09:03:14 / cg"
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9401
!
584f6f6bb171 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
  9402
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9403
doNewImageFromClipboard
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9404
    |image|
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9405
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9406
    self checkModified ifFalse:[ ^ self ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9407
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  9408
    image := imageEditView clipBoardImage.
3164
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  9409
    image isImageOrForm ifFalse:[
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  9410
        image := Image readFrom:(image asString) onError:nil.
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  9411
        image isNil ifTrue:[
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  9412
            Dialog warn:'Clipboard does not contain an image I can use/understand'.
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  9413
            ^ self.
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  9414
        ].
890b62a044be class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3157
diff changeset
  9415
    ].
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  9416
    
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9417
    imageEditView image:image.
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9418
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9419
    image notNil ifTrue:[
1900
41ba86fb1087 cleanup
Claus Gittinger <cg@exept.de>
parents: 1899
diff changeset
  9420
        self updateColorsFromImage:image.
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9421
        self findColorMapMode.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9422
        self updateLabelsAndHistory.
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9423
    ]
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  9424
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  9425
    "Modified (format): / 08-10-2017 / 08:58:03 / cg"
1682
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9426
!
f1b2491c9dc2 color: make darker/brighter
Claus Gittinger <cg@exept.de>
parents: 1656
diff changeset
  9427
3200
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9428
doNewMaskFromClipboard
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9429
    |mask image newImage|
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9430
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9431
    self checkModified ifFalse:[ ^ self ].
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9432
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  9433
    mask := imageEditView clipBoardImage.
3200
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9434
    mask isImageOrForm ifFalse:[
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9435
        mask := Image readFrom:(mask asString) onError:nil.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9436
        mask isNil ifTrue:[
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9437
            Dialog warn:'Clipboard does not contain an image I can use/understand'.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9438
            ^ self.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9439
        ].
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9440
    ].
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  9441
    
3200
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9442
    (image:= imageEditView image) isNil ifTrue:[
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9443
        image := mask.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9444
    ].
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9445
    mask extent ~= image extent ifTrue:[
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9446
        mask := imageEditView resizedImage:mask to:image extent.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9447
    ].
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9448
    newImage := image copy.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9449
    newImage mask:mask.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9450
    imageEditView newImageWithUndo:newImage.
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9451
    self updateAfterImageChange.
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  9452
3496
83bb01ebff3b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3494
diff changeset
  9453
    "Modified (format): / 08-10-2017 / 08:57:58 / cg"
3200
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9454
!
eae3e88c5cb1 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  9455
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9456
grabFullScreenImage
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9457
    "grab all for editing"
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9458
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9459
    self grabScreenImageUsing:[ 
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9460
        Image fromScreen
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9461
    ].
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9462
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9463
    "Created: / 25-02-2017 / 12:41:29 / cg"
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9464
!
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9465
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  9466
grabScreenImage
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9467
    "let user choose an area and grab that area for editing"
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  9468
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9469
    self grabScreenImageUsing:[ 
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9470
        |r|
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9471
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9472
        [Screen current leftButtonPressed] whileTrue:[Delay waitForSeconds:0.05].
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9473
        r := Rectangle fromUser.
2708
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9474
        (r width == 0 or:[r height == 0]) ifTrue:[
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9475
            nil
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9476
        ] ifFalse:[
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9477
            lastGrabbedScreenArea := r.
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9478
            Image fromScreen:r
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9479
        ]
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9480
    ].
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9481
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9482
    "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
  9483
!
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9484
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9485
grabScreenImageFromLastArea
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9486
    "grab again from the previous area for editing"
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9487
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9488
    self grabScreenImageUsing:[ 
2708
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9489
        Image fromScreen:lastGrabbedScreenArea
2707
6610854318eb remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents: 2704
diff changeset
  9490
    ].
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9491
!
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9492
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9493
grabScreenImageUsing:aBlock
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9494
    "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
  9495
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9496
    self checkModified ifFalse:[ ^ self ].
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9497
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  9498
    Processor 
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  9499
        addTimedBlock:[
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  9500
            |image d8image img|
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  9501
1380
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  9502
            imageSeqNr := nil.
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9503
            image := aBlock value.
2708
c180af16b1b3 changed:
Claus Gittinger <cg@exept.de>
parents: 2707
diff changeset
  9504
            image notNil ifTrue:[
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9505
                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
  9506
false ifTrue:[
1687
f4543a556b89 Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents: 1682
diff changeset
  9507
                    Error handle:[:ex | |sig|
2996
a1090695cfbc class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 2992
diff changeset
  9508
                        (sig := ex creator) == HaltInterrupt ifTrue:[ex reject].
1122
66e895f34b9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1121
diff changeset
  9509
                        sig == Signal noHandlerSignal ifTrue:[ex reject].
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9510
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9511
                        self warn:'Could not convert to depth8 image (too many colors)'.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9512
                        d8image := nil.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9513
                    ] do:[
2420
14678b9fea60 grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents: 2375
diff changeset
  9514
                        d8image := Depth8Image fromImage:image photometric:#palette.
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9515
                    ].
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9516
                    d8image notNil ifTrue:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9517
                        image := d8image
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9518
                    ]
2420
14678b9fea60 grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents: 2375
diff changeset
  9519
].
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  9520
                ].
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9521
                (imageEditView image:image) notNil ifTrue:[
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9522
                    self listOfColors contents:(image colorMap).
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9523
                    self findColorMapMode.
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9524
                    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
  9525
                ]
1121
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9526
             ] 
9ceac76e1c8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  9527
        ] 
990
4303f0064410 delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  9528
        afterSeconds:1
929
7be532d91b87 help spec.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  9529
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9530
    "Created: / 29-07-1998 / 21:24:42 / cg"
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9531
    "Modified: / 16-11-2001 / 16:21:19 / cg"
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9532
    "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
  9533
!
9787c42843c2 allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents: 1377
diff changeset
  9534
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9535
grabWindowImage
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9536
    "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
  9537
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9538
    self grabScreenImageUsing:[
3188
351c645c0921 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3180
diff changeset
  9539
        |v topView|
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9540
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9541
        (v := Screen current viewFromUser) notNil ifTrue:[
3188
351c645c0921 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3180
diff changeset
  9542
            topView := v topView.
351c645c0921 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3180
diff changeset
  9543
            topView raise; makeFullyVisible.
2704
0791984eef02 changed: #grabWindowImage
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
  9544
            Delay waitForSeconds:0.5.   "/ give view a chance to redraw itself.
3188
351c645c0921 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3180
diff changeset
  9545
            Image fromView:topView
2701
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9546
        ].
5abe05ebb370 added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents: 2663
diff changeset
  9547
    ].
3422
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9548
005c4ce2070d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3421
diff changeset
  9549
    "Modified (comment): / 25-02-2017 / 12:41:20 / cg"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9550
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  9551
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  9552
!ImageEditor methodsFor:'user actions-saving'!
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9553
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9554
doPrint
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9555
    "prints current image on the current printer"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9556
1734
98ebea4111f9 waitCursor while printing
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  9557
    self withWaitCursorDo:[
98ebea4111f9 waitCursor while printing
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  9558
        imageEditView print
98ebea4111f9 waitCursor while printing
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  9559
    ]
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9560
!
228524287573 intitial checkin
tz
parents:
diff changeset
  9561
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  9562
doSaveButtonImageToFileAs
3375
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  9563
    "opens a dialog for saving current image to a file.
d2a64b772792 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3374
diff changeset
  9564
     Saved as a button image (i.e. with a frame around)"
1613
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  9565
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  9566
    imageEditView saveButtonImageToFileAs.
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  9567
    self updateLabelsAndHistory.
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  9568
!
1d4f11252d3b saveAsButtonImage added
ca
parents: 1611
diff changeset
  9569
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9570
doSaveImageFile
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9571
    "saves current image to current file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9572
1481
32f1fd9d0f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
  9573
    imageEditView save.
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  9574
    self clearModifiedAndRememberImageSaved.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9575
!
228524287573 intitial checkin
tz
parents:
diff changeset
  9576
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9577
doSaveImageFileAs
1922
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9578
    "opens a dialog for saving an image to a file"
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9579
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9580
    |img file filters|
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9581
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9582
    img := self image.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9583
    img notNil ifTrue: [
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9584
        file := img fileName
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9585
    ].
3426
6d0987492205 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3425
diff changeset
  9586
    
2595
e1eeda9d1639 changed: #doSaveImageFileAs
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  9587
    filters := FileSelectionBrowser saveImageFileNameFilters.
1922
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9588
3066
a8e197ceebed Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 3050
diff changeset
  9589
    (UserPreferences current useNativeFileDialog
3100
d2310ff3cbab class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3080
diff changeset
  9590
     and:[Screen current isWindowsPlatform]) ifTrue:[
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9591
        self withWaitCursorDo:[
3623
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9592
            file isNil ifTrue:[
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9593
                file := LastDirectory.
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9594
                file notNil ifTrue:[
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9595
                    file := file asFilename / 'image.png'.
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9596
                ].
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9597
            ].    
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9598
3066
a8e197ceebed Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents: 3050
diff changeset
  9599
            file := Screen current
3623
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9600
                nativeFileDialogWithTitle:(resources string:'Save Image in File')
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9601
                defaultFilename:file 
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9602
                owningTopView:self window topView
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9603
                filter:{
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9604
                    {(resources string:'Image Files'). '*.tif;*.png;*.gif;*.bmp'}.
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9605
                    {(resources string:'All Files').   '*.*'} 
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9606
                }
861c9acf54ed #FEATURE by sr
sr
parents: 3598
diff changeset
  9607
                filterIndex:nil
3625
b05e45a69b82 #REFACTORING by sr
sr
parents: 3624
diff changeset
  9608
                trueForSave:true    
b05e45a69b82 #REFACTORING by sr
sr
parents: 3624
diff changeset
  9609
                trueForMultiSelect:false
3624
2b1381d671fc #REFACTORING by sr
sr
parents: 3623
diff changeset
  9610
                trueForPromptOverwrite:true.    
2807
b89a09017a97 changed: #doSaveImageFileAs
Claus Gittinger <cg@exept.de>
parents: 2796
diff changeset
  9611
        ].
3425
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  9612
    ] ifFalse:[ 
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  9613
        img fileName isNil ifTrue:[
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  9614
            LastDirectory notNil ifTrue:[
3426
6d0987492205 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3425
diff changeset
  9615
                file isNil ifTrue:[
6d0987492205 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3425
diff changeset
  9616
                    file := 'image.png'.
6d0987492205 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3425
diff changeset
  9617
                ].
3425
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  9618
                file := LastDirectory asFilename construct:(file asFilename baseName).
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  9619
            ].    
0bf8a902d844 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
  9620
        ].    
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9621
        (FileSelectionBrowser isNil or:[DirectoryView isNil]) ifTrue:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9622
            file notNil ifTrue:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9623
                file := Dialog requestFileName:'Save Image To'
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9624
                            default:file
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9625
                            pattern:(filters first).
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9626
            ] ifFalse:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9627
                file := Dialog
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9628
                            requestFileName:'Save Image To'
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9629
                            default:'image.png'
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9630
                            pattern:(filters first)
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9631
                            fromDirectory:LastDirectory.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9632
            ].
2807
b89a09017a97 changed: #doSaveImageFileAs
Claus Gittinger <cg@exept.de>
parents: 2796
diff changeset
  9633
        ] ifFalse:[
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9634
            file notNil ifTrue:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9635
                file := FileSelectionBrowser
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9636
                            request:'Save Image To'
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9637
                            fileName:file
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9638
                            withFileFilters:filters.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9639
            ] ifFalse:[
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9640
                file := FileSelectionBrowser
3405
02c67d9a5e65 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3404
diff changeset
  9641
                            request:'Save Image in File:'
2820
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9642
                            inDirectory:LastDirectory
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9643
                            withFileFilters:filters.
301557d950e6 changed:
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9644
            ].
2807
b89a09017a97 changed: #doSaveImageFileAs
Claus Gittinger <cg@exept.de>
parents: 2796
diff changeset
  9645
        ].
1922
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9646
    ].
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9647
    file notNil ifTrue:[
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9648
        imageEditView saveImageFileAs:file.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9649
        LastDirectory := file asFilename directoryName.
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9650
        self updateLabelsAndHistory.
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  9651
        self clearModifiedAndRememberImageSavedAsFile:file.
1922
a693dc9af82f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1921
diff changeset
  9652
    ]
2807
b89a09017a97 changed: #doSaveImageFileAs
Claus Gittinger <cg@exept.de>
parents: 2796
diff changeset
  9653
3426
6d0987492205 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3425
diff changeset
  9654
    "Modified: / 27-02-2017 / 01:26:05 / cg"
3625
b05e45a69b82 #REFACTORING by sr
sr
parents: 3624
diff changeset
  9655
    "Modified: / 25-10-2018 / 10:56:01 / sr"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9656
!
228524287573 intitial checkin
tz
parents:
diff changeset
  9657
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9658
doSaveImageMaskFileAs
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9659
    "opens a dialog for saving mask of current image to a file"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9660
1481
32f1fd9d0f15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
  9661
    imageEditView saveImageMaskFileAs.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9662
!
228524287573 intitial checkin
tz
parents:
diff changeset
  9663
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9664
doSaveMethod
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9665
    "saves the image in current class and selector"
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9666
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9667
    imageEditView saveMethod ifTrue:[
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  9668
        self updateLabelsAndHistory.
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  9669
        self clearModifiedAndRememberImageSaved.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9670
    ]
228524287573 intitial checkin
tz
parents:
diff changeset
  9671
!
228524287573 intitial checkin
tz
parents:
diff changeset
  9672
767
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9673
doSaveMethodAs
ed96f735dab1 comments added
tz
parents: 763
diff changeset
  9674
    "opens a dialog for saving current image on a class and a selector"
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9675
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9676
    imageEditView saveMethodAs ifTrue:[
2006
ae6fe65e9f33 embedding as special editors
Claus Gittinger <cg@exept.de>
parents: 1998
diff changeset
  9677
        self updateLabelsAndHistory.
3379
407c5d5ec14d #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 3378
diff changeset
  9678
        self clearModifiedAndRememberImageSaved.
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9679
    ]
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9680
!
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9681
3022
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9682
doShowPixelArrayLiteralString
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9683
    "opens a dialog showing a literal array-like storeString
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9684
     (sometimes useful to embed an image into source code)"
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9685
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9686
    |img|
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9687
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9688
    img := imageEditView image.
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9689
    TextBox openOn:img bits storeString
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9690
!
4cdf177f5976 class: ImageEditor
Claus Gittinger <cg@exept.de>
parents: 3020
diff changeset
  9691
1309
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9692
doShowStoreString
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9693
    "opens a dialog showing the storeString
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9694
     (sometimes useful to embed an image into source code)"
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9695
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9696
    |img|
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9697
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9698
    img := imageEditView image.
0a45ef81b47e added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents: 1250
diff changeset
  9699
    TextBox openOn:img storeString
1975
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9700
!
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9701
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9702
save
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9703
    "saves current image on current class and selector"
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9704
14b7babca4f5 code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
  9705
    self doSaveMethod
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9706
! !
228524287573 intitial checkin
tz
parents:
diff changeset
  9707
1715
9eebdb3802aa method category rename
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  9708
!ImageEditor methodsFor:'user actions-settings'!
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9709
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9710
doChangeGridMagnification
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9711
    "change grid magnification"
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9712
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9713
    |box oldGridLimit newGridLimit|
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9714
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9715
    oldGridLimit := imageEditView class gridMagnificationLimit asPoint.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9716
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9717
    box := EnterBox new.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9718
    box title:(resources string:'Grid Magnification Limit:').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9719
    box okText:(resources string:'OK').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9720
    box abortText:(resources string:'Cancel').
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9721
    box initialText:(oldGridLimit x printString).
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9722
    box showAtPointer.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9723
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9724
    (box accepted 
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9725
    and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil]
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9726
    ) ifTrue:[
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9727
        newGridLimit := (99 min: (2 max:newGridLimit)) asPoint.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9728
        imageEditView class gridMagnificationLimit:newGridLimit.
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9729
        imageEditView invalidate
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9730
    ]
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9731
2192
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  9732
!
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  9733
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  9734
penWidth:n
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  9735
    imageEditView penWidth:n
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  9736
398c9aba6588 pen width
Claus Gittinger <cg@exept.de>
parents: 2190
diff changeset
  9737
    "Created: / 01-11-2007 / 23:47:48 / cg"
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9738
!
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9739
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9740
penWidthHolderChanged
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9741
    imageEditView penWidth:(self penWidthHolder value)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9742
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9743
    "Created: / 15-02-2012 / 22:32:00 / cg"
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9744
!
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9745
2375
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9746
spraySpot:n
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9747
    imageEditView spraySpot:n
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9748
c775c95566b9 +spray and circle
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9749
    "Created: / 01-11-2007 / 23:47:48 / cg"
2881
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9750
!
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9751
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9752
spraySpotHolderChanged
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9753
    imageEditView spraySpot:(self spraySpotHolder value)
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9754
67e99e350ee0 added:6 methods
Claus Gittinger <cg@exept.de>
parents: 2877
diff changeset
  9755
    "Created: / 15-02-2012 / 22:37:08 / cg"
1353
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9756
! !
701e41f8ff9f code cleanup
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9757
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9758
!ImageEditor class methodsFor:'documentation'!
228524287573 intitial checkin
tz
parents:
diff changeset
  9759
228524287573 intitial checkin
tz
parents:
diff changeset
  9760
version
228524287573 intitial checkin
tz
parents:
diff changeset
  9761
    ^ '$Header$'
2590
9f2cb061d07f changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
  9762
!
9f2cb061d07f changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
  9763
9f2cb061d07f changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
  9764
version_CVS
9f2cb061d07f changed: #menuToolbar
Claus Gittinger <cg@exept.de>
parents: 2585
diff changeset
  9765
    ^ '$Header$'
400
228524287573 intitial checkin
tz
parents:
diff changeset
  9766
! !
2945
facf3c7b0e31 changed: #processEvent:
Claus Gittinger <cg@exept.de>
parents: 2932
diff changeset
  9767