#UI_ENHANCEMENT by exept
authorClaus Gittinger <cg@exept.de>
Sun, 19 Jan 2020 00:44:19 +0100
changeset 3838403172bbe664
parent 3837 a1b6dd87aba4
child 3839 b37f9731ec27
#UI_ENHANCEMENT by exept
class: ImageEditor class
changed: #windowSpec
ImageEditor.st
     1.1 --- a/ImageEditor.st	Sat Jan 18 21:15:14 2020 +0100
     1.2 +++ b/ImageEditor.st	Sun Jan 19 00:44:19 2020 +0100
     1.3 @@ -14,16 +14,16 @@
     1.4  "{ NameSpace: Smalltalk }"
     1.5  
     1.6  ResourceSpecEditor subclass:#ImageEditor
     1.7 -        instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode
     1.8 -                selectedColorIndex postOpenAction imageSeqNr drawingColormap
     1.9 -                lastShiftUsedWrap lastGrabbedScreenArea
    1.10 -                allowedToChangeImageDimensionAndDepth savedImage savedFile'
    1.11 -        classVariableNames:'DefaultRelativeSizes LastColormapMode LastDirectory
    1.12 -                LastSizeString LastURL MaskClipboard LastDepth
    1.13 -                LastNumThresholdGrayColors LastMagnifyTo LastMagnifyBy
    1.14 -                LastMagnifySmoothing'
    1.15 -        poolDictionaries:''
    1.16 -        category:'Interface-UIPainter'
    1.17 +	instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode
    1.18 +		selectedColorIndex postOpenAction imageSeqNr drawingColormap
    1.19 +		lastShiftUsedWrap lastGrabbedScreenArea
    1.20 +		allowedToChangeImageDimensionAndDepth savedImage savedFile'
    1.21 +	classVariableNames:'DefaultRelativeSizes LastColormapMode LastDirectory
    1.22 +		LastSizeString LastURL MaskClipboard LastDepth
    1.23 +		LastNumThresholdGrayColors LastMagnifyTo LastMagnifyBy
    1.24 +		LastMagnifySmoothing'
    1.25 +	poolDictionaries:''
    1.26 +	category:'Interface-UIPainter'
    1.27  !
    1.28  
    1.29  !ImageEditor class methodsFor:'documentation'!
    1.30 @@ -2490,31 +2490,25 @@
    1.31      ^ 
    1.32      #(FullSpec
    1.33         name: windowSpec
    1.34 -       uuid: 'ea3a8340-1e4a-11b2-83b1-485b39758412'
    1.35 +       uuid: '8aeadbb6-3a4a-11ea-a4b6-10ddb1cc5928'
    1.36         window: 
    1.37        (WindowSpec
    1.38           label: 'Image Editor'
    1.39           name: 'Image Editor'
    1.40           uuid: 'ea3a8bec-1e4a-11b2-83b1-485b39758412'
    1.41 -         min: (Point 800 400)
    1.42 -         bounds: (Rectangle 0 0 800 446)
    1.43 -         menu: menu
    1.44 +         min: (Point 100 100) bounds: (Rectangle 0 0 800 446) menu: menu
    1.45           icon: defaultIcon
    1.46 -       )
    1.47 -       component: 
    1.48 +      ) component: 
    1.49        (SpecCollection
    1.50           collection: (
    1.51            (MenuPanelSpec
    1.52               name: 'menuToolbarView'
    1.53 -             layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0)
    1.54 -             style: (FontDescription helvetica medium roman 10 #'iso10646-1' nil nil)
    1.55 -             uuid: 'ea3a98c6-1e4a-11b2-83b1-485b39758412'
    1.56 +             layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) style: (FontDescription helvetica medium roman 10 #'iso10646-1' nil nil) uuid: 'ea3a98c6-1e4a-11b2-83b1-485b39758412'
    1.57               menu: menuToolbar
    1.58 -           )
    1.59 +          )
    1.60            (VariableHorizontalPanelSpec
    1.61               name: 'mainPanel'
    1.62 -             layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
    1.63 -             uuid: 'ea3a9eca-1e4a-11b2-83b1-485b39758412'
    1.64 +             layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) uuid: 'ea3a9eca-1e4a-11b2-83b1-485b39758412'
    1.65               snapMode: both
    1.66               barLevel: 0
    1.67               component: 
    1.68 @@ -2529,8 +2523,7 @@
    1.69                       collection: (
    1.70                        (VariableVerticalPanelSpec
    1.71                           name: 'verticalPanel'
    1.72 -                         layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
    1.73 -                         uuid: 'ea3aa672-1e4a-11b2-83b1-485b39758412'
    1.74 +                         layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) uuid: 'ea3aa672-1e4a-11b2-83b1-485b39758412'
    1.75                           level: 0
    1.76                           snapMode: both
    1.77                           component: 
    1.78 @@ -2544,42 +2537,37 @@
    1.79                                   collection: (
    1.80                                    (TabViewSpec
    1.81                                       name: 'TabHeader1'
    1.82 -                                     layout: (LayoutFrame 0 0 0 0 0 1 36 0)
    1.83 -                                     uuid: 'ea3aab9a-1e4a-11b2-83b1-485b39758412'
    1.84 +                                     layout: (LayoutFrame 0 0 0 0 0 1 36 0) uuid: 'ea3aab9a-1e4a-11b2-83b1-485b39758412'
    1.85                                       model: colorCropTabSelectionIndexHolder
    1.86                                       menu: colorCropTabLabelList
    1.87                                       useIndex: true
    1.88                                       translateLabel: true
    1.89 -                                   )
    1.90 +                                  )
    1.91                                    (ViewSpec
    1.92                                       name: 'ColorBox'
    1.93 -                                     layout: (LayoutFrame 0 0 36 0 0 1 0 1)
    1.94 -                                     uuid: 'ea3ab0ae-1e4a-11b2-83b1-485b39758412'
    1.95 +                                     layout: (LayoutFrame 0 0 36 0 0 1 0 1) uuid: 'ea3ab0ae-1e4a-11b2-83b1-485b39758412'
    1.96                                       visibilityChannel: colorBoxVisibleHolder
    1.97                                       component: 
    1.98                                      (SpecCollection
    1.99                                         collection: (
   1.100                                          (MenuPanelSpec
   1.101                                             name: 'MouseButtonColorToolBar'
   1.102 -                                           layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0)
   1.103 -                                           uuid: 'ea3ab2d4-1e4a-11b2-83b1-485b39758412'
   1.104 +                                           layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0) uuid: 'ea3ab2d4-1e4a-11b2-83b1-485b39758412'
   1.105                                             level: 0
   1.106                                             menu: menuMouseButtonColors
   1.107 -                                         )
   1.108 +                                        )
   1.109                                          (LabelSpec
   1.110                                             label: 'Label'
   1.111                                             name: 'Label1'
   1.112 -                                           layout: (LayoutFrame -160 1 0 0 -104 1 22 0)
   1.113 -                                           activeHelpKey: drawingAlpha
   1.114 +                                           layout: (LayoutFrame -160 1 0 0 -104 1 22 0) activeHelpKey: drawingAlpha
   1.115                                             uuid: 'ea3ab590-1e4a-11b2-83b1-485b39758412'
   1.116                                             visibilityChannel: alphaVisibleHolder
   1.117                                             translateLabel: true
   1.118                                             labelChannel: alphaText
   1.119 -                                         )
   1.120 +                                        )
   1.121                                          (InputFieldSpec
   1.122                                             name: 'EntryField1'
   1.123 -                                           layout: (LayoutFrame -106 1 2 0 -56 1 22 0)
   1.124 -                                           activeHelpKey: drawingAlpha
   1.125 +                                           layout: (LayoutFrame -106 1 2 0 -56 1 22 0) activeHelpKey: drawingAlpha
   1.126                                             uuid: 'ea3aba90-1e4a-11b2-83b1-485b39758412'
   1.127                                             visibilityChannel: alphaVisibleHolder
   1.128                                             model: alphaHolder
   1.129 @@ -2590,29 +2578,25 @@
   1.130                                             minValue: 0
   1.131                                             maxValue: 100
   1.132                                             acceptOnPointerLeave: true
   1.133 -                                         )
   1.134 +                                        )
   1.135                                          (ViewSpec
   1.136                                             name: 'Box1'
   1.137 -                                           layout: (LayoutFrame -40 1.0 4 0 -26 1.0 18 0)
   1.138 -                                           activeHelpKey: drawingColor1
   1.139 +                                           layout: (LayoutFrame -40 1.0 4 0 -26 1.0 18 0) activeHelpKey: drawingColor1
   1.140                                             uuid: 'ea3ac1c0-1e4a-11b2-83b1-485b39758412'
   1.141                                             level: -1
   1.142                                             backgroundChannel: drawingColor1Holder
   1.143 -                                         )
   1.144 +                                        )
   1.145                                          (ViewSpec
   1.146                                             name: 'Box2'
   1.147 -                                           layout: (LayoutFrame -25 1.0 4 0 -11 1.0 18 0)
   1.148 -                                           activeHelpKey: drawingColor2
   1.149 +                                           layout: (LayoutFrame -25 1.0 4 0 -11 1.0 18 0) activeHelpKey: drawingColor2
   1.150                                             uuid: 'ea3ac418-1e4a-11b2-83b1-485b39758412'
   1.151                                             level: -1
   1.152                                             backgroundChannel: drawingColor2Holder
   1.153 -                                         )
   1.154 +                                        )
   1.155                                          (DataSetSpec
   1.156                                             name: 'colorDataSetView'
   1.157 -                                           layout: (LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0)
   1.158 -                                           activeHelpKey: colorMapTable
   1.159 -                                           style: (FontDescription helvetica medium roman 10 #'iso10646-1' nil nil)
   1.160 -                                           uuid: 'ea3ac652-1e4a-11b2-83b1-485b39758412'
   1.161 +                                           layout: (LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0) activeHelpKey: colorMapTable
   1.162 +                                           style: (FontDescription helvetica medium roman 10 #'iso10646-1' nil nil) uuid: 'ea3ac652-1e4a-11b2-83b1-485b39758412'
   1.163                                             model: selectedColors
   1.164                                             menu: colorMapMenuHolder
   1.165                                             hasHorizontalScrollBar: true
   1.166 @@ -2626,51 +2610,43 @@
   1.167                                             multipleSelectOk: true
   1.168                                             verticalSpacing: 1
   1.169                                             columnAdaptor: colorColumnAdaptor
   1.170 -                                         )
   1.171                                          )
   1.172 -                                      
   1.173 -                                     )
   1.174 -                                   )
   1.175 +                                      )
   1.176 +                                    )
   1.177 +                                  )
   1.178                                    (ViewSpec
   1.179                                       name: 'FloodFillBox'
   1.180 -                                     layout: (LayoutFrame 0 0 36 0 0 1 0 1)
   1.181 -                                     uuid: 'ea3acfda-1e4a-11b2-83b1-485b39758412'
   1.182 +                                     layout: (LayoutFrame 0 0 36 0 0 1 0 1) uuid: 'ea3acfda-1e4a-11b2-83b1-485b39758412'
   1.183                                       visibilityChannel: floodFillBoxVisibleHolder
   1.184                                       component: 
   1.185                                      (SpecCollection
   1.186                                         collection: (
   1.187                                          (UISubSpecification
   1.188                                             name: 'SubSpecification2'
   1.189 -                                           layout: (LayoutFrame 0 0 0 0 0 1 0 1)
   1.190 -                                           uuid: 'ea3ad21e-1e4a-11b2-83b1-485b39758412'
   1.191 +                                           layout: (LayoutFrame 0 0 0 0 0 1 0 1) uuid: 'ea3ad21e-1e4a-11b2-83b1-485b39758412'
   1.192                                             minorKey: floodFillToleranceSpec
   1.193 -                                         )
   1.194                                          )
   1.195 -                                      
   1.196 -                                     )
   1.197 -                                   )
   1.198 +                                      )
   1.199 +                                    )
   1.200 +                                  )
   1.201                                    (ViewSpec
   1.202                                       name: 'CropBox'
   1.203 -                                     layout: (LayoutFrame 0 0 36 0 0 1 0 1)
   1.204 -                                     uuid: 'ea3ad552-1e4a-11b2-83b1-485b39758412'
   1.205 +                                     layout: (LayoutFrame 0 0 36 0 0 1 0 1) uuid: 'ea3ad552-1e4a-11b2-83b1-485b39758412'
   1.206                                       visibilityChannel: cropBoxVisibleHolder
   1.207                                       component: 
   1.208                                      (SpecCollection
   1.209                                         collection: (
   1.210                                          (UISubSpecification
   1.211                                             name: 'SubSpecification1'
   1.212 -                                           layout: (LayoutFrame 0 0 0 0 0 1 0 1)
   1.213 -                                           uuid: 'ea3ad76e-1e4a-11b2-83b1-485b39758412'
   1.214 +                                           layout: (LayoutFrame 0 0 0 0 0 1 0 1) uuid: 'ea3ad76e-1e4a-11b2-83b1-485b39758412'
   1.215                                             minorKey: cropSpec
   1.216 -                                         )
   1.217                                          )
   1.218 -                                      
   1.219 -                                     )
   1.220 -                                   )
   1.221 +                                      )
   1.222 +                                    )
   1.223                                    )
   1.224 -                                
   1.225 -                               )
   1.226 -                             )
   1.227 +                                )
   1.228 +                              )
   1.229 +                            )
   1.230                              (ArbitraryComponentSpec
   1.231                                 name: 'imagePreView'
   1.232                                 activeHelpKey: previewView
   1.233 @@ -2682,16 +2658,13 @@
   1.234                                 miniScrollerVertical: false
   1.235                                 hasBorder: false
   1.236                                 component: ImageView
   1.237 -                             )
   1.238                              )
   1.239 -                          
   1.240 -                         )
   1.241 -                         handles: (Any 0.5 1.0)
   1.242 -                       )
   1.243 +                          )
   1.244 +                        ) handles: (Any 0.5 1.0)
   1.245                        )
   1.246 -                    
   1.247 -                   )
   1.248 -                 )
   1.249 +                    )
   1.250 +                  )
   1.251 +                )
   1.252                  (ViewSpec
   1.253                     name: 'rightView'
   1.254                     uuid: 'ea3ade8a-1e4a-11b2-83b1-485b39758412'
   1.255 @@ -2700,45 +2673,40 @@
   1.256                       collection: (
   1.257                        (MenuPanelSpec
   1.258                           name: 'ToolBar1'
   1.259 -                         layout: (LayoutFrame 0 0 0 0.0 28 0 0 1.0)
   1.260 -                         uuid: 'ea3ae0b0-1e4a-11b2-83b1-485b39758412'
   1.261 +                         layout: (LayoutFrame 0 0 0 0.0 28 0 0 1.0) uuid: 'ea3ae0b0-1e4a-11b2-83b1-485b39758412'
   1.262                           level: 1
   1.263                           menu: toolsMenuToolbar
   1.264                           verticalLayout: true
   1.265                           centerItems: true
   1.266                           textDefault: true
   1.267 -                       )
   1.268 +                      )
   1.269                        (ViewSpec
   1.270                           name: 'editingView'
   1.271 -                         layout: (LayoutFrame 28 0.0 0 0.0 0 1.0 0 1.0)
   1.272 -                         uuid: 'ea3ae3bc-1e4a-11b2-83b1-485b39758412'
   1.273 +                         layout: (LayoutFrame 28 0.0 0 0.0 0 1.0 0 1.0) uuid: 'ea3ae3bc-1e4a-11b2-83b1-485b39758412'
   1.274                           level: 1
   1.275                           component: 
   1.276                          (SpecCollection
   1.277                             collection: (
   1.278                              (ArbitraryComponentSpec
   1.279                                 name: 'imageEditView'
   1.280 -                               layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0)
   1.281 -                               uuid: 'ea3ae5ec-1e4a-11b2-83b1-485b39758412'
   1.282 +                               layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0) uuid: 'ea3ae5ec-1e4a-11b2-83b1-485b39758412'
   1.283                                 hasHorizontalScrollBar: true
   1.284                                 hasVerticalScrollBar: true
   1.285                                 hasBorder: false
   1.286                                 component: ImageEditView
   1.287 -                             )
   1.288 +                            )
   1.289                              (LabelSpec
   1.290                                 name: 'coordLabel'
   1.291 -                               layout: (LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0)
   1.292 -                               uuid: 'ea3ae8da-1e4a-11b2-83b1-485b39758412'
   1.293 +                               layout: (LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0) uuid: 'ea3ae8da-1e4a-11b2-83b1-485b39758412'
   1.294                                 level: -1
   1.295                                 translateLabel: true
   1.296                                 labelChannel: imageInfoHolder
   1.297                                 resizeForLabel: false
   1.298                                 adjust: left
   1.299 -                             )
   1.300 +                            )
   1.301                              (ArrowButtonSpec
   1.302                                 name: 'magnifyDownButton'
   1.303 -                               layout: (LayoutFrame -80 1 -22 1 -58 1 0 1)
   1.304 -                               activeHelpKey: magnifyImageDown
   1.305 +                               layout: (LayoutFrame -80 1 -22 1 -58 1 0 1) activeHelpKey: magnifyImageDown
   1.306                                 uuid: 'ea3aebd2-1e4a-11b2-83b1-485b39758412'
   1.307                                 translateLabel: true
   1.308                                 model: doMagnifyDown
   1.309 @@ -2746,11 +2714,10 @@
   1.310                                 isTriggerOnDown: true
   1.311                                 autoRepeat: true
   1.312                                 direction: left
   1.313 -                             )
   1.314 +                            )
   1.315                              (ArrowButtonSpec
   1.316                                 name: 'magnifyUpButton'
   1.317 -                               layout: (LayoutFrame -24 1 -22 1 -2 1 0 1)
   1.318 -                               activeHelpKey: magnifyImageUp
   1.319 +                               layout: (LayoutFrame -24 1 -22 1 -2 1 0 1) activeHelpKey: magnifyImageUp
   1.320                                 uuid: 'ea3af26c-1e4a-11b2-83b1-485b39758412'
   1.321                                 translateLabel: true
   1.322                                 model: doMagnifyUp
   1.323 @@ -2758,11 +2725,10 @@
   1.324                                 isTriggerOnDown: true
   1.325                                 autoRepeat: true
   1.326                                 direction: right
   1.327 -                             )
   1.328 +                            )
   1.329                              (InputFieldSpec
   1.330                                 name: 'magnificationInputField'
   1.331 -                               layout: (LayoutFrame -57 1 -22 1 -26 1 0 1)
   1.332 -                               activeHelpKey: magnificationNumber
   1.333 +                               layout: (LayoutFrame -57 1 -22 1 -26 1 0 1) activeHelpKey: magnificationNumber
   1.334                                 uuid: 'ea3af62c-1e4a-11b2-83b1-485b39758412'
   1.335                                 enableChannel: imageIsLoadedHolder
   1.336                                 model: magnificationHolder
   1.337 @@ -2773,31 +2739,25 @@
   1.338                                 minValue: 1
   1.339                                 maxValue: 99
   1.340                                 acceptOnPointerLeave: true
   1.341 -                             )
   1.342                              )
   1.343 -                          
   1.344 -                         )
   1.345 -                       )
   1.346 +                          )
   1.347 +                        )
   1.348                        )
   1.349 -                    
   1.350 -                   )
   1.351 -                 )
   1.352 -                )
   1.353 -              
   1.354 -             )
   1.355 -             handles: (Any 0.47999999999999998 1.0)
   1.356 -           )
   1.357 +                    )
   1.358 +                  )
   1.359 +                )
   1.360 +              )
   1.361 +            ) handles: (Any 0.47999999999999998 1.0)
   1.362 +          )
   1.363            (UISubSpecification
   1.364               name: 'infoBarSubSpec'
   1.365 -             layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
   1.366 -             uuid: 'ea3afaf0-1e4a-11b2-83b1-485b39758412'
   1.367 +             layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) uuid: 'ea3afaf0-1e4a-11b2-83b1-485b39758412'
   1.368               majorKey: ToolApplicationModel
   1.369               minorKey: windowSpecForInfoBar
   1.370 -           )
   1.371 -          )
   1.372 -        
   1.373 -       )
   1.374 -     )
   1.375 +          )
   1.376 +        )
   1.377 +      )
   1.378 +    )
   1.379  ! !
   1.380  
   1.381  !ImageEditor class methodsFor:'menu specs'!