added:6 methods
changed:
#menuSettings
#specialIcon
#toolsMenuToolbar
--- a/ImageEditor.st Tue Feb 14 09:18:23 2012 +0100
+++ b/ImageEditor.st Thu Feb 16 13:16:04 2012 +0100
@@ -849,6 +849,26 @@
ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@JJE@@B"!!P@@((T@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b') ; yourself); yourself]
!
+specialCircleIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self specialCircleIcon inspect
+ ImageEditor openOnClass:self andSelector:#specialCircleIcon
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:'ImageEditor class specialCircleIcon'
+ ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@L@@@!!BDB@ D4@HP@!!@BD@HHA@PHP!!@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@-@D2@''$D^HQ8!!G"DLHH1@PH@-@@0@@@@@a') ; yourself); yourself]
+!
+
specialIcon
"This resource specification was automatically generated
by the ImageEditor of ST/X."
@@ -866,7 +886,7 @@
^Icon
constantNamed:'ImageEditor class specialIcon'
- ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@L@@@@B@@@@@0@@@@@@@@@@@@@@@P@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@L@@0@G @^@A8@G @L@@0@@@@L@@0@@@@@a') ; yourself); yourself]
+ ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@L@@G!!:P@!!@B4@HP@!!@BD@HP@!!@BW!!8@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@G-8P0!!G"D^HQ8!!G"DLHP0!!@BG-8@0@@@@@a') ; yourself); yourself]
!
sprayIcon
@@ -2746,6 +2766,7 @@
"Do not manually edit this!! If it is corrupted,
the MenuEditor may not be able to read the specification."
+
"
MenuEditor new openOnClass:ImageEditor andSelector:#menuSettings
(Menu new fromLiteralArrayEncoding:(ImageEditor menuSettings)) startUp
@@ -2770,21 +2791,21 @@
(
(MenuItem
label: '1'
- itemValue: penWidth:
translateLabel: true
- argument: 1
+ choice: penWidthHolder
+ choiceValue: 1
)
(MenuItem
label: '5'
- itemValue: penWidth:
translateLabel: true
- argument: 5
+ choice: penWidthHolder
+ choiceValue: 5
)
(MenuItem
label: '10'
- itemValue: penWidth:
translateLabel: true
- argument: 10
+ choice: penWidthHolder
+ choiceValue: 10
)
)
nil
@@ -2799,27 +2820,27 @@
(
(MenuItem
label: '4'
- itemValue: spraySpot:
translateLabel: true
- argument: 4
+ choice: spraySpotHolder
+ choiceValue: 4
)
(MenuItem
label: '8'
- itemValue: spraySpot:
translateLabel: true
- argument: 8
+ choice: spraySpotHolder
+ choiceValue: 8
)
(MenuItem
label: '16'
- itemValue: spraySpot:
translateLabel: true
- argument: 16
+ choice: spraySpotHolder
+ choiceValue: 16
)
(MenuItem
label: '32'
- itemValue: spraySpot:
translateLabel: true
- argument: 32
+ choice: spraySpotHolder
+ choiceValue: 32
)
)
nil
@@ -3174,6 +3195,7 @@
"Do not manually edit this!! If it is corrupted,
the MenuEditor may not be able to read the specification."
+
"
MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar
(Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp
@@ -3182,124 +3204,122 @@
<resource: #menu>
^
- #(#Menu
- #(
- #(#MenuItem
- #activeHelpKey: #drawModePoint
- #enabled: #imageIsLoadedHolder
- #label: 'Point'
- #translateLabel: true
- #isButton: true
- #labelImage: #(#ResourceRetriever #ImageEditor #pointIcon)
- #choice: #editMode
- #choiceValue: #point
+ #(Menu
+ (
+ (MenuItem
+ activeHelpKey: drawModePoint
+ enabled: imageIsLoadedHolder
+ label: 'Point'
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever ImageEditor pointIcon)
+ choice: editMode
+ choiceValue: point
)
- #(#MenuItem
- #activeHelpKey: #drawModeSpray
- #enabled: #imageIsLoadedHolder
- #label: 'Spray'
- #translateLabel: true
- #isButton: true
- #labelImage: #(#ResourceRetriever #ImageEditor #sprayIcon)
- #choice: #editMode
- #choiceValue: #spray
+ (MenuItem
+ activeHelpKey: drawModeSpray
+ enabled: imageIsLoadedHolder
+ label: 'Spray'
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever ImageEditor sprayIcon)
+ choice: editMode
+ choiceValue: spray
)
- #(#MenuItem
- #activeHelpKey: #drawModeBox
- #enabled: #imageIsLoadedHolder
- #label: 'Rect'
- #translateLabel: true
- #isButton: true
- #labelImage: #(#ResourceRetriever #ImageEditor #rectIcon)
- #choice: #editMode
- #choiceValue: #box
+ (MenuItem
+ activeHelpKey: drawModeBox
+ enabled: imageIsLoadedHolder
+ label: 'Rect'
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever ImageEditor rectIcon)
+ choice: editMode
+ choiceValue: box
)
- #(#MenuItem
- #activeHelpKey: #drawModeFilledBox
- #enabled: #imageIsLoadedHolder
- #label: 'FillRect'
- #translateLabel: true
- #isButton: true
- #labelImage: #(#ResourceRetriever #ImageEditor #fillRectIcon)
- #choice: #editMode
- #choiceValue: #filledBox
+ (MenuItem
+ activeHelpKey: drawModeFilledBox
+ enabled: imageIsLoadedHolder
+ label: 'FillRect'
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever ImageEditor fillRectIcon)
+ choice: editMode
+ choiceValue: filledBox
)
- #(#MenuItem
- #activeHelpKey: #drawModeCircle
- #enabled: #imageIsLoadedHolder
- #label: 'Circle'
- #translateLabel: true
- #isButton: true
- #labelImage: #(#ResourceRetriever #ImageEditor #circleIcon)
- #choice: #editMode
- #choiceValue: #circle
+ (MenuItem
+ activeHelpKey: drawModeCircle
+ enabled: imageIsLoadedHolder
+ label: 'Circle'
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever ImageEditor circleIcon)
+ choice: editMode
+ choiceValue: circle
)
- #(#MenuItem
- #activeHelpKey: #drawModeFill
- #enabled: #imageIsLoadedHolder
- #label: 'Fill'
- #translateLabel: true
- #isButton: true
- #labelImage: #(#ResourceRetriever #ImageEditor #fillIcon)
- #choice: #editMode
- #choiceValue: #fill
+ (MenuItem
+ activeHelpKey: drawModeFill
+ enabled: imageIsLoadedHolder
+ label: 'Fill'
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever ImageEditor fillIcon)
+ choice: editMode
+ choiceValue: fill
)
- #(#MenuItem
- #activeHelpKey: #drawModeCopy
- #enabled: #imageIsLoadedHolder
- #label: 'Copy'
- #translateLabel: true
- #isButton: true
- #labelImage: #(#ResourceRetriever #ImageEditor #copyIcon)
- #choice: #editMode
- #choiceValue: #copy
+ (MenuItem
+ activeHelpKey: drawModeCopy
+ enabled: imageIsLoadedHolder
+ label: 'Copy'
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever ImageEditor copyIcon)
+ choice: editMode
+ choiceValue: copy
)
- #(#MenuItem
- #activeHelpKey: #drawModePaste
- #enabled: #imageIsLoadedHolder
- #label: 'Paste'
- #translateLabel: true
- #isButton: true
- #labelImage: #(#ResourceRetriever #ImageEditor #pasteIcon)
- #choice: #editMode
- #choiceValue: #paste
+ (MenuItem
+ activeHelpKey: drawModePasteWithMask
+ enabled: imageIsLoadedHolder
+ label: 'Paste With Mask'
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon)
+ choice: editMode
+ choiceValue: pasteWithMask
)
- #(#MenuItem
- #activeHelpKey: #drawModePasteUnder
- #enabled: #imageIsLoadedHolder
- #label: 'Paste Under'
- #translateLabel: true
- #isButton: true
- #labelImage: #(#ResourceRetriever #ImageEditor #pasteUnderIcon)
- #choice: #editMode
- #choiceValue: #pasteUnder
+ (MenuItem
+ activeHelpKey: drawModePaste
+ enabled: imageIsLoadedHolder
+ label: 'Paste'
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever ImageEditor pasteIcon)
+ choice: editMode
+ choiceValue: paste
)
- #(#MenuItem
- #activeHelpKey: #drawModePasteWithMask
- #enabled: #imageIsLoadedHolder
- #label: 'Paste With Mask'
- #translateLabel: true
- #isButton: true
- #labelImage: #(#ResourceRetriever #ImageEditor #pasteWithMaskIcon)
- #choice: #editMode
- #choiceValue: #pasteWithMask
+ (MenuItem
+ activeHelpKey: drawModePasteUnder
+ enabled: imageIsLoadedHolder
+ label: 'Paste Under'
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever ImageEditor pasteUnderIcon)
+ choice: editMode
+ choiceValue: pasteUnder
)
- #(#MenuItem
- #activeHelpKey: #drawModeSpecial
- #enabled: #imageIsLoadedHolder
- #label: 'Special'
- #translateLabel: true
- #isButton: true
- #labelImage: #(#ResourceRetriever #ImageEditor #specialIcon)
- #choice: #editMode
- #choiceValue: #specialOperation
+ (MenuItem
+ activeHelpKey: drawModeSpecial
+ enabled: imageIsLoadedHolder
+ label: 'Special'
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever ImageEditor specialIcon)
+ choice: editMode
+ choiceValue: specialOperation
)
)
nil
nil
)
-
- "Modified: / 04-07-2010 / 10:18:24 / cg"
! !
!ImageEditor class methodsFor:'tableColumns specs'!
@@ -3619,6 +3639,18 @@
^ holder
!
+penWidthHolder
+ |holder|
+
+ (holder := builder bindingAt:#penWidthHolder) isNil ifTrue:[
+ builder aspectAt:#penWidthHolder put:(holder := imageEditView penWidth asValue).
+ holder onChangeSend:#penWidthHolderChanged to:self.
+ ].
+ ^ holder
+
+ "Created: / 15-02-2012 / 22:30:58 / cg"
+!
+
previewBackgroundColorHolder
|holder|
@@ -3644,6 +3676,18 @@
^ holder
!
+spraySpotHolder
+ |holder|
+
+ (holder := builder bindingAt:#spraySpotHolder) isNil ifTrue:[
+ builder aspectAt:#spraySpotHolder put:(holder := imageEditView spraySpot asValue).
+ holder onChangeSend:#spraySpotHolderChanged to:self.
+ ].
+ ^ holder
+
+ "Created: / 15-02-2012 / 22:36:38 / cg"
+!
+
tileModeHolder
|holder|
@@ -6743,10 +6787,22 @@
"Created: / 01-11-2007 / 23:47:48 / cg"
!
+penWidthHolderChanged
+ imageEditView penWidth:(self penWidthHolder value)
+
+ "Created: / 15-02-2012 / 22:32:00 / cg"
+!
+
spraySpot:n
imageEditView spraySpot:n
"Created: / 01-11-2007 / 23:47:48 / cg"
+!
+
+spraySpotHolderChanged
+ imageEditView spraySpot:(self spraySpotHolder value)
+
+ "Created: / 15-02-2012 / 22:37:08 / cg"
! !
!ImageEditor class methodsFor:'documentation'!