# HG changeset patch # User Claus Gittinger # Date 1488901117 -3600 # Node ID 4c2297e8a454a26eb61ae7000f8052dc06ecd03d # Parent 6d0987492205d3a26717c51856def8c685e05b6c #REFACTORING by cg class: ImageEditor added: #openOnClass:andSelector:modal: #openOnFile:modal: comment/format in: #openLoadingImageWith:modal: changed: #openModalOnFile: #openOnClass:andSelector: #openOnFile: #openOnImage: diff -r 6d0987492205 -r 4c2297e8a454 ImageEditor.st --- a/ImageEditor.st Mon Feb 27 02:05:41 2017 +0100 +++ b/ImageEditor.st Tue Mar 07 16:38:37 2017 +0100 @@ -63,7 +63,7 @@ openLoadingImageWith:aBlock modal:modalBoolean "opens an Image Editor on anImage. - returns the editor (to access its attributes)" + Returns the editor (to access its attributes)" |editor| @@ -76,6 +76,8 @@ editor openWindow. ]. ^ editor + + "Modified (comment): / 07-03-2017 / 16:36:16 / cg" ! openModalOnClass: aClass andSelector: aSelector @@ -108,19 +110,16 @@ ! openModalOnFile:aFileName - "opens an Image Editor on aFileName" - - self - openLoadingImageWith:[:editor | - editor loadFromFile:aFileName. - ] - modal:true. + "opens an Image Editor on aFileName. + Returns the editor (to access its attributes)" + + ^ self openOnFile:aFileName modal:true " self openModalOnFile: '../../goodies/bitmaps/gifImages/back.gif' " - "Modified (format): / 18-02-2017 / 00:17:52 / cg" + "Modified: / 07-03-2017 / 16:36:32 / cg" ! openModalOnImage:anImage @@ -142,40 +141,73 @@ ! openOnClass:aClass andSelector:aSelector - "opens an Image Editor on aClass and aSelector" - - self - openLoadingImageWith:[:editor | - editor loadFromClass:aClass theNonMetaclass andSelector:aSelector - ] - modal:false. + "opens an Image Editor on aClass and aSelector. + Returns the editor (to access its attributes)" + + ^ self openOnClass:aClass andSelector:aSelector modal:false " self openOnClass:self andSelector:#leftMouseKeyIcon self openOnClass:self andSelector:nil " - "Modified: / 16.3.1999 / 21:33:49 / cg" + "Modified: / 07-03-2017 / 16:36:58 / cg" +! + +openOnClass:aClass andSelector:aSelector modal:modal + "opens an Image Editor on aClass and aSelector. + Returns the editor (to access its attributes)" + + ^ self + openLoadingImageWith:[:editor | + editor loadFromClass:(aClass theNonMetaclass) andSelector:aSelector + ] + modal:modal. + + " + self openOnClass:self andSelector:#leftMouseKeyIcon modal:true + self openOnClass:self andSelector:nil + " + + "Created: / 07-03-2017 / 16:34:36 / cg" ! openOnFile:aFileName - "opens an Image Editor on aFileName" - - self - openLoadingImageWith:[:editor | editor loadFromFile:aFileName ] - modal:false. + "opens an Image Editor on aFileName. + Returns the editor (to access its attributes)" + + ^ self openOnFile:aFileName modal:false " self openOnFile: '../../goodies/bitmaps/gifImages/back.gif' " - "Modified: / 16.3.1999 / 21:33:25 / cg" + "Modified: / 07-03-2017 / 16:37:33 / cg" +! + +openOnFile:aFileName modal:modal + "opens an Image Editor on aFileName. + Returns the editor (to access its attributes)" + + ^ self + openLoadingImageWith:[:editor | + editor loadFromFile:aFileName. + ] + modal:modal. + + " + self openOnFile: '../../goodies/bitmaps/gifImages/back.gif' modal:false + self openOnFile: '../../goodies/bitmaps/gifImages/back.gif' modal:true + " + + "Created: / 07-03-2017 / 16:33:12 / cg" ! openOnImage:anImage - "opens an Image Editor on anImage" - - self + "opens an Image Editor on anImage. + Returns the editor (to access its attributes)" + + ^ self openLoadingImageWith:[:editor | editor loadFromImage: anImage ] modal:false @@ -183,7 +215,7 @@ self openOnImage: Icon startIcon " - "Modified: / 11.3.1999 / 16:18:33 / cg" + "Modified: / 07-03-2017 / 16:37:57 / cg" ! ! !ImageEditor class methodsFor:'accessing'!