ImageEditor.st
changeset 2006 ae6fe65e9f33
parent 1998 efd9be2585e3
child 2016 62843f7d07b7
equal deleted inserted replaced
2005:1ee7fa2d8f05 2006:ae6fe65e9f33
  3376 
  3376 
  3377     (aClass isNil or:[aSelector]) isNil ifTrue:[
  3377     (aClass isNil or:[aSelector]) isNil ifTrue:[
  3378         imageEditView resourceClass:aClass.
  3378         imageEditView resourceClass:aClass.
  3379         imageEditView resourceSelector:aSelector.
  3379         imageEditView resourceSelector:aSelector.
  3380         imageEditView image:nil.
  3380         imageEditView image:nil.
       
  3381         self clearModified.
  3381         ^ self.
  3382         ^ self.
  3382     ].
  3383     ].
  3383 
  3384 
  3384     (imageEditView resourceClass == aClass
  3385 "/    (imageEditView resourceClass == aClass
  3385     and:[ imageEditView resourceSelector == aSelector ]) ifTrue:[
  3386 "/    and:[ imageEditView resourceSelector == aSelector ]) ifTrue:[
  3386         imageEditView modified ifFalse:[
  3387 "/        imageEditView modified ifFalse:[
  3387             ^ self.
  3388 "/            ^ self.
  3388         ].
  3389 "/        ].
  3389     ].
  3390 "/    ].
  3390 
  3391 
  3391     (imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue:[
  3392     (imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue:[
  3392         self updateAfterImageChange.
  3393         self updateAfterImageChange.
       
  3394         self clearModified.
  3393     ]
  3395     ]
  3394 
  3396 
  3395     "Modified: / 16.3.1999 / 21:44:41 / cg"
  3397     "Modified: / 16.3.1999 / 21:44:41 / cg"
  3396 !
  3398 !
  3397 
  3399 
  3570     "Created: / 18.8.1998 / 17:17:38 / cg"
  3572     "Created: / 18.8.1998 / 17:17:38 / cg"
  3571 !
  3573 !
  3572 
  3574 
  3573 modified
  3575 modified
  3574     ^ imageEditView modified
  3576     ^ imageEditView modified
       
  3577 !
       
  3578 
       
  3579 modified:aBoolean
       
  3580     super modified:aBoolean.
       
  3581     imageEditView modified:aBoolean
  3575 !
  3582 !
  3576 
  3583 
  3577 preferredExtent
  3584 preferredExtent
  3578     "returns the preferred extent"
  3585     "returns the preferred extent"
  3579 
  3586 
  5207 
  5214 
  5208 doSaveImageFile
  5215 doSaveImageFile
  5209     "saves current image to current file"
  5216     "saves current image to current file"
  5210 
  5217 
  5211     imageEditView save.
  5218     imageEditView save.
       
  5219     self clearModified.
  5212 !
  5220 !
  5213 
  5221 
  5214 doSaveImageFileAs
  5222 doSaveImageFileAs
  5215     "opens a dialog for saving an image to a file"
  5223     "opens a dialog for saving an image to a file"
  5216 
  5224 
  5236     ].
  5244     ].
  5237     file notNil ifTrue:[
  5245     file notNil ifTrue:[
  5238         imageEditView saveImageFileAs:file.
  5246         imageEditView saveImageFileAs:file.
  5239         LastDirectory := file asFilename directoryName.
  5247         LastDirectory := file asFilename directoryName.
  5240         self updateLabelsAndHistory.
  5248         self updateLabelsAndHistory.
       
  5249         self clearModified.
  5241     ]
  5250     ]
  5242 !
  5251 !
  5243 
  5252 
  5244 doSaveImageMaskFileAs
  5253 doSaveImageMaskFileAs
  5245     "opens a dialog for saving mask of current image to a file"
  5254     "opens a dialog for saving mask of current image to a file"
  5249 
  5258 
  5250 doSaveMethod
  5259 doSaveMethod
  5251     "saves the image in current class and selector"
  5260     "saves the image in current class and selector"
  5252 
  5261 
  5253     imageEditView saveMethod ifTrue:[
  5262     imageEditView saveMethod ifTrue:[
  5254         self updateLabelsAndHistory
  5263         self updateLabelsAndHistory.
       
  5264         self clearModified.
  5255     ]
  5265     ]
  5256 !
  5266 !
  5257 
  5267 
  5258 doSaveMethodAs
  5268 doSaveMethodAs
  5259     "opens a dialog for saving current image on a class and a selector"
  5269     "opens a dialog for saving current image on a class and a selector"
  5260 
  5270 
  5261     imageEditView saveMethodAs ifTrue:[
  5271     imageEditView saveMethodAs ifTrue:[
  5262         self updateLabelsAndHistory
  5272         self updateLabelsAndHistory.
       
  5273         self clearModified.
  5263     ]
  5274     ]
  5264 !
  5275 !
  5265 
  5276 
  5266 doShowStoreString
  5277 doShowStoreString
  5267     "opens a dialog showing the storeString
  5278     "opens a dialog showing the storeString