--- a/UIPainter.st Tue Jun 17 12:53:08 2008 +0200
+++ b/UIPainter.st Fri Jun 20 11:38:28 2008 +0200
@@ -125,7 +125,8 @@
flyByHelpSpec
<resource: #help>
- ^super flyByHelpSpec addPairsFrom:#(
+ ^super flyByHelpSpec
+ addPairsFrom:#(
#fileSave
'Save Spec'
@@ -163,7 +164,8 @@
useDefaultColorToggle
'Toggle between default and explicit color'
-)
+);
+ declareAllFrom:self helpSpec
!
helpSpec
@@ -187,6 +189,9 @@
#alignSelectionBottom
'Aligns the selected widgets bottom edges with the bottom of the dominant widget.'
+#alignResizeSelectionBottom
+'Resize the selected widgets bottom edges to align them with the bottom of the dominant widget.'
+
#alignSelectionCenterHor
'Aligns the selected widgets centers vertically with the center of the dominant widget.'
@@ -196,15 +201,24 @@
#alignSelectionLeft
'Aligns the selected widgets left edges with the left edge of the dominant widget.'
+#alignResizeSelectionLeft
+'Resize the selected widgets left edges to align them with the left edge of the dominant widget.'
+
#alignSelectionLeftAndRight
'Aligns the selected widgets left & right edges with the dominant widget.'
#alignSelectionRight
'Aligns the selected widgets right edges with the right edge of the dominant widget.'
+#alignResizeSelectionRight
+'Resize the selected widgets right edges to align them with the right edge of the dominant widget.'
+
#alignSelectionTop
'Aligns the selected widgets top edgegs with the top edge of the dominant widget.'
+#alignResizeSelectionTop
+'Resize the selected widgets top edgegs to align them with the top edge of the dominant widget.'
+
#alignSelectionTopAndBottom
'Aligns the selected widgets top and bottom edges with the dominant widget.'
@@ -870,6 +884,138 @@
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@UUUT@@@@???4@@@@@@@@@@@@@*(@@@@@JB@@@@@@JB@@@@@@JB@@@@@@J*(@@@@@@@@@@@@@UUUT@@@@???4@@@@@@@@@@@@J*(@@@@@JB@@@@
@@JB@@@@@@@B@@@@@@@*(@@@@@@@@@@@@@UUUT@@@@???4@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A??@A??@A??CA??@@G0@@A@@@A@@@A@@@G0CA??@A??@A??@A??@@G0C@A@@@A@@@A@@@G0AA??AA??@A??@A??B') ; yourself); yourself]
+!
+
+iconResizeB
+ "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 iconResizeB inspect
+ ImageEditor openOnClass:self andSelector:#iconResizeB
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:'UIPainter class iconResizeB'
+ ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@M@@@@@@@M@@@@@@@M@M@@@@@M@M@@@@@M@M@@@@@M@M@@@M@M@M@@@M@M@M@@@M@M@M@@@M@M@M@@@@@@@M@@
+@@@@@E@@@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@G A@G @@G'' @G'' @G''#@G'' G''''"G'''' G''''!!G'''' G'''' O?7 G'''' CCG O??0O??0@@@A@@@@@@@@') ; yourself); yourself]
+!
+
+iconResizeL
+ "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 iconResizeL inspect
+ ImageEditor openOnClass:self andSelector:#iconResizeL
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:'UIPainter class iconResizeL'
+ ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+@@@@@@@@@@@@@@@@@(@@@@@@@(@@@@@@@(UUUP@I@(_??0@@@(@@@@@@@(@@@@@@@(@@@@@@@(@@@@@@@(AUUU@@@(C???@@@(@@@@@E@(@@@@@@@(@@@@@@
+@(@@@@@@@(AU@@@@@(C?@@@@@(@@@@@@@(@@@@@@@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@@@G?>@G?>@G?>@G?>@F@@@FP@@F?? G?? G?? F?? FP@@FP@@F? @G? @G? @F? @FP@@@@@@@@@@') ; yourself); yourself]
+!
+
+iconResizeLR
+ "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 iconResizeLR inspect
+ ImageEditor openOnClass:self andSelector:#iconResizeLR
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:'UIPainter class iconResizeLR'
+ ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+@@@@@@@@@@@@@@@@@(@@@B @@(@@@B @@(UUUR I@(???2 @@(@@@B @@(@@@B @@(@@@B @@(@@@B @@(AUTB @@(C?<B @@(@@@B E@(@@@B @@(@@@B @
+@(@@@B @@(AUTB @@(C?<B @@(@@@B @@(@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@A G?? G?? G?? G?? F@A FPI F?= G?? G?? F?= FPI FPI F?= G?? G?? F?= FPI @@@@@@@@') ; yourself); yourself]
+!
+
+iconResizeR
+ "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 iconResizeR inspect
+ ImageEditor openOnClass:self andSelector:#iconResizeR
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:'UIPainter class iconResizeR'
+ ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+@@@@@@@@@@@@@@@@@@@@@B @@@@@@B @@@UUUR I@@???R @@@@@@B @@@@@@B @@@@@@B @@@@@@B @@EUUTB @@O??<B @@@@@@B E@@@@@B @@@@@@B @
+@@@@@B @@@@ETB @@@@O<B @@@@@@B @@@@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@A A?? A?? A?? A?? @@A @@I G?= G?? G?? G?= @@I @@I @G= @G? @G? @G= @@I @@@@@@@@') ; yourself); yourself]
+!
+
+iconResizeT
+ "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 iconResizeT inspect
+ ImageEditor openOnClass:self andSelector:#iconResizeT
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:'UIPainter class iconResizeT'
+ ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+@@@@@@@@@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@E@@@@@@@M@@@M@M@M@@@M@M@M@@@M@M@M@@@M@M@M@@@@@M@M@@@@@M@M@@@@@M@M@@
+@@@M@M@@@@@M@@@@@@@M@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@AO??0O??0CCG G'''' O?7 G'''' G'''' G''''!!G'''' G''''"@G'' @G''#@G'' @G'' @G @@G A@@@@@@@@@@@@') ; yourself); yourself]
+!
+
+iconResizeTB
+ "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 iconResizeTB inspect
+ ImageEditor openOnClass:self andSelector:#iconResizeTB
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:'UIPainter class iconResizeTB'
+ ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+@@@@@@@@@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@G@@@@@@@G@@@@@@@G@G@G@@@G@G@G@@@G@G@G@@@G@G@G@@@G@G@G@@@G@G@G@@@G@@@@@@
+@G@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@B@@@@@@@BO??0O??2G#C@G'''' G/?0G''''#G'''' G'''' G'''' G'''' G''''"G/?0G'''' G#C@O??1O??0@@@A@@@B@@@@') ; yourself); yourself]
! !
!UIPainter class methodsFor:'initialize'!
@@ -1609,14 +1755,6 @@
labelImage: (ResourceRetriever UIPainter iconAlignR 'Right')
)
(MenuItem
- activeHelpKey: alignSelectionLeftAndRight
- enabled: canMoveOrAlignSelection
- label: 'Left && Right'
- itemValue: alignSelectionLeftAndRight
- translateLabel: true
- labelImage: (ResourceRetriever UIPainter iconAlignLR 'Left & Right')
- )
- (MenuItem
activeHelpKey: alignSelectionTop
enabled: canMoveOrAlignSelection
label: 'Top'
@@ -1633,12 +1771,55 @@
labelImage: (ResourceRetriever UIPainter iconAlignB 'Bottom')
)
(MenuItem
+ label: '-'
+ )
+ (MenuItem
+ activeHelpKey: alignResizeSelectionLeft
+ enabled: canMoveOrAlignSelection
+ label: 'Resize Left'
+ itemValue: alignResizeSelectionLeft
+ translateLabel: true
+ labelImage: (ResourceRetriever UIPainter iconResizeL 'Resize Left')
+ )
+ (MenuItem
+ activeHelpKey: alignResizeSelectionRight
+ enabled: canMoveOrAlignSelection
+ label: 'Resize Right'
+ itemValue: alignResizeSelectionRight
+ translateLabel: true
+ labelImage: (ResourceRetriever UIPainter iconResizeR 'Resize Right')
+ )
+ (MenuItem
+ activeHelpKey: alignResizeSelectionTop
+ enabled: canMoveOrAlignSelection
+ label: 'Resize Top'
+ itemValue: alignResizeSelectionTop
+ translateLabel: true
+ labelImage: (ResourceRetriever UIPainter iconResizeT 'Resize Top')
+ )
+ (MenuItem
+ activeHelpKey: alignResizeSelectionBottom
+ enabled: canMoveOrAlignSelection
+ label: 'Resize Bottom'
+ itemValue: alignResizeSelectionBottom
+ translateLabel: true
+ labelImage: (ResourceRetriever UIPainter iconResizeB 'Resize Bottom')
+ )
+ (MenuItem
+ activeHelpKey: alignSelectionLeftAndRight
+ enabled: canMoveOrAlignSelection
+ label: 'Left && Right'
+ itemValue: alignSelectionLeftAndRight
+ translateLabel: true
+ labelImage: (ResourceRetriever UIPainter iconResizeLR 'Left && Right')
+ )
+ (MenuItem
activeHelpKey: alignSelectionTopAndBottom
enabled: canMoveOrAlignSelection
label: 'Top && Bottom'
itemValue: alignSelectionTopAndBottom
translateLabel: true
- labelImage: (ResourceRetriever UIPainter iconAlignTB 'Top & Bottom')
+ labelImage: (ResourceRetriever UIPainter iconResizeTB 'Top && Bottom')
)
(MenuItem
label: '-'
@@ -1649,7 +1830,7 @@
label: 'Center Horizontal'
itemValue: alignSelectionCenterHor
translateLabel: true
- labelImage: (ResourceRetriever UIPainter iconCenterH '')
+ labelImage: (ResourceRetriever UIPainter iconCenterH 'Center Horizontal')
)
(MenuItem
activeHelpKey: centerSelectionHor
@@ -1657,7 +1838,7 @@
label: 'Center Horizontal in Frame'
itemValue: centerSelectionHor
translateLabel: true
- labelImage: (ResourceRetriever UIPainter iconCenterHInFrame '')
+ labelImage: (ResourceRetriever UIPainter iconCenterHInFrame 'Center Horizontal in Frame')
)
(MenuItem
activeHelpKey: alignSelectionCenterVer
@@ -1665,7 +1846,7 @@
label: 'Center Vertical'
itemValue: alignSelectionCenterVer
translateLabel: true
- labelImage: (ResourceRetriever UIPainter iconCenterV '')
+ labelImage: (ResourceRetriever UIPainter iconCenterV 'Center Vertical')
)
(MenuItem
activeHelpKey: centerSelectionVer
@@ -1673,7 +1854,7 @@
label: 'Center Vertical in Frame'
itemValue: centerSelectionVer
translateLabel: true
- labelImage: (ResourceRetriever UIPainter iconCenterVInFrame '')
+ labelImage: (ResourceRetriever UIPainter iconCenterVInFrame 'Center Vertical in Frame')
)
(MenuItem
label: '-'
@@ -1684,7 +1865,7 @@
label: 'Distribute Horizontal'
itemValue: spreadSelectionHor
translateLabel: true
- labelImage: (ResourceRetriever UIPainter iconDistributeH '')
+ labelImage: (ResourceRetriever UIPainter iconDistributeH 'Distribute Horizontal')
)
(MenuItem
activeHelpKey: spreadSelectionVer
@@ -1692,7 +1873,7 @@
label: 'Distribute Vertical'
itemValue: spreadSelectionVer
translateLabel: true
- labelImage: (ResourceRetriever UIPainter iconDistributeV '')
+ labelImage: (ResourceRetriever UIPainter iconDistributeV 'Distribute Vertical')
)
)
nil
@@ -1752,7 +1933,7 @@
(MenuItem
activeHelpKey: pasteWithLayout
enabled: canPasteKeepingLayoutHolder
- label: 'Paste without Layout'
+ label: 'Paste With Layout'
itemValue: pasteWithoutLayout
translateLabel: true
)
@@ -1787,6 +1968,12 @@
submenuChannel: menuMove
)
(MenuItem
+ enabled: canMoveOrAlignSelection
+ label: 'Align'
+ translateLabel: true
+ submenuChannel: menuAlign
+ )
+ (MenuItem
enabled: hasSelection
label: 'Dimension'
translateLabel: true
@@ -1794,30 +1981,6 @@
(Menu
(
(MenuItem
- activeHelpKey: editDimensionDefaultExtent
- enabled: canMoveOrAlignSelection
- label: 'Default Extent'
- itemValue: setToDefaultExtent
- translateLabel: true
- )
- (MenuItem
- activeHelpKey: editDimensionDefaultWidth
- enabled: canMoveOrAlignSelection
- label: 'Default Width'
- itemValue: setToDefaultWidth
- translateLabel: true
- )
- (MenuItem
- activeHelpKey: editDimensionDefaultHeight
- enabled: canMoveOrAlignSelection
- label: 'Default Height'
- itemValue: setToDefaultHeight
- translateLabel: true
- )
- (MenuItem
- label: '-'
- )
- (MenuItem
activeHelpKey: editDimensionCopyLayout
enabled: hasSingleSelection
label: 'Copy Layout'
@@ -1869,6 +2032,30 @@
itemValue: pasteHeight
translateLabel: true
)
+ (MenuItem
+ label: '-'
+ )
+ (MenuItem
+ activeHelpKey: editDimensionDefaultExtent
+ enabled: canMoveOrAlignSelection
+ label: 'Set Default Extent'
+ itemValue: setToDefaultExtent
+ translateLabel: true
+ )
+ (MenuItem
+ activeHelpKey: editDimensionDefaultWidth
+ enabled: canMoveOrAlignSelection
+ label: 'Set Default Width'
+ itemValue: setToDefaultWidth
+ translateLabel: true
+ )
+ (MenuItem
+ activeHelpKey: editDimensionDefaultHeight
+ enabled: canMoveOrAlignSelection
+ label: 'Set Default Height'
+ itemValue: setToDefaultHeight
+ translateLabel: true
+ )
)
nil
nil
@@ -2381,108 +2568,115 @@
<resource: #menu>
^
- #(#Menu
- #(
- #(#MenuItem
- #label: 'Align Left'
- #isButton: true
- #value: #alignSelectionLeft
- #activeHelpKey: #alignSelectionLeft
- #enabled: #canMoveOrAlignSelection
- #labelImage: #(#ResourceRetriever nil #iconAlignL)
+ #(Menu
+ (
+ (MenuItem
+ activeHelpKey: alignSelectionLeft
+ enabled: canMoveOrAlignSelection
+ label: 'Align Left'
+ itemValue: alignSelectionLeft
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever nil iconAlignL)
)
- #(#MenuItem
- #label: 'Align Right'
- #isButton: true
- #value: #alignSelectionRight
- #activeHelpKey: #alignSelectionRight
- #enabled: #canMoveOrAlignSelection
- #labelImage: #(#ResourceRetriever nil #iconAlignR)
+ (MenuItem
+ activeHelpKey: alignSelectionRight
+ enabled: canMoveOrAlignSelection
+ label: 'Align Right'
+ itemValue: alignSelectionRight
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever nil iconAlignR)
)
- #(#MenuItem
- #label: 'Align Left & Right'
- #isButton: true
- #value: #alignSelectionLeftAndRight
- #activeHelpKey: #alignSelectionLeftAndRight
- #enabled: #canMoveOrAlignSelection
- #labelImage: #(#ResourceRetriever nil #iconAlignLR)
- )
- #(#MenuItem
- #label: ''
+ (MenuItem
+ activeHelpKey: alignSelectionTop
+ enabled: canMoveOrAlignSelection
+ label: 'Align Top'
+ itemValue: alignSelectionTop
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever nil iconAlignT)
)
- #(#MenuItem
- #label: 'Align Top'
- #isButton: true
- #value: #alignSelectionTop
- #activeHelpKey: #alignSelectionTop
- #enabled: #canMoveOrAlignSelection
- #labelImage: #(#ResourceRetriever nil #iconAlignT)
+ (MenuItem
+ activeHelpKey: alignSelectionBottom
+ enabled: canMoveOrAlignSelection
+ label: 'Align Bottom'
+ itemValue: alignSelectionBottom
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever nil iconAlignB)
)
- #(#MenuItem
- #label: 'Align Bottom'
- #isButton: true
- #value: #alignSelectionBottom
- #activeHelpKey: #alignSelectionBottom
- #enabled: #canMoveOrAlignSelection
- #labelImage: #(#ResourceRetriever nil #iconAlignB)
+ (MenuItem
+ activeHelpKey: alignSelectionLeftAndRight
+ enabled: canMoveOrAlignSelection
+ label: 'Align Left & Right'
+ itemValue: alignSelectionLeftAndRight
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever nil iconResizeLR)
)
- #(#MenuItem
- #label: 'Align Top & Bottom'
- #isButton: true
- #value: #alignSelectionTopAndBottom
- #activeHelpKey: #alignSelectionTopAndBottom
- #enabled: #canMoveOrAlignSelection
- #labelImage: #(#ResourceRetriever nil #iconAlignTB)
+ (MenuItem
+ activeHelpKey: alignSelectionTopAndBottom
+ enabled: canMoveOrAlignSelection
+ label: 'Align Top & Bottom'
+ itemValue: alignSelectionTopAndBottom
+ translateLabel: true
+ isButton: true
+ labelImage: (ResourceRetriever nil iconResizeTB)
)
- #(#MenuItem
- #label: ''
+ (MenuItem
+ label: ''
)
- #(#MenuItem
- #label: 'Move Left'
- #isButton: true
- #triggerOnDown: true
- #hideMenuOnActivated: false
- #value: #moveSelectionLeft
- #activeHelpKey: #changePositionLeft
- #enabled: #canMoveOrAlignSelection
- #labelImage: #(#ResourceRetriever nil #arrowLeft)
+ (MenuItem
+ activeHelpKey: changePositionLeft
+ enabled: canMoveOrAlignSelection
+ label: 'Move Left'
+ itemValue: moveSelectionLeft
+ translateLabel: true
+ isButton: true
+ hideMenuOnActivated: false
+ triggerOnDown: true
+ labelImage: (ResourceRetriever nil arrowLeft)
)
- #(#MenuItem
- #label: 'Move Right'
- #isButton: true
- #triggerOnDown: true
- #hideMenuOnActivated: false
- #value: #moveSelectionRight
- #activeHelpKey: #changePositionRight
- #enabled: #canMoveOrAlignSelection
- #labelImage: #(#ResourceRetriever nil #arrowRight)
+ (MenuItem
+ activeHelpKey: changePositionRight
+ enabled: canMoveOrAlignSelection
+ label: 'Move Right'
+ itemValue: moveSelectionRight
+ translateLabel: true
+ isButton: true
+ hideMenuOnActivated: false
+ triggerOnDown: true
+ labelImage: (ResourceRetriever nil arrowRight)
)
- #(#MenuItem
- #label: 'Move Up'
- #isButton: true
- #triggerOnDown: true
- #value: #moveSelectionUp
- #activeHelpKey: #changePositionUp
- #enabled: #canMoveOrAlignSelection
- #labelImage: #(#ResourceRetriever nil #arrowUp)
+ (MenuItem
+ activeHelpKey: changePositionUp
+ enabled: canMoveOrAlignSelection
+ label: 'Move Up'
+ itemValue: moveSelectionUp
+ translateLabel: true
+ isButton: true
+ triggerOnDown: true
+ labelImage: (ResourceRetriever nil arrowUp)
)
- #(#MenuItem
- #label: 'Move Down'
- #isButton: true
- #triggerOnDown: true
- #value: #moveSelectionDown
- #activeHelpKey: #changePositionDown
- #enabled: #canMoveOrAlignSelection
- #labelImage: #(#ResourceRetriever nil #arrowDown)
+ (MenuItem
+ activeHelpKey: changePositionDown
+ enabled: canMoveOrAlignSelection
+ label: 'Move Down'
+ itemValue: moveSelectionDown
+ translateLabel: true
+ isButton: true
+ triggerOnDown: true
+ labelImage: (ResourceRetriever nil arrowDown)
)
- #(#MenuItem
- #label: 'Widget Documentation'
- #translateLabel: true
- #isButton: true
- #startGroup: #right
- #value: #doOpenWidgetDocumentation
- #activeHelpKey: #editOpenSpecDocumentation
- #labelImage: #(#ResourceRetriever #Icon #helpIcon)
+ (MenuItem
+ activeHelpKey: editOpenSpecDocumentation
+ label: 'Widget Documentation'
+ itemValue: doOpenWidgetDocumentation
+ translateLabel: true
+ isButton: true
+ startGroup: right
+ labelImage: (ResourceRetriever Icon helpIcon)
)
)
nil
@@ -2493,9 +2687,9 @@
!UIPainter methodsFor:'aspects'!
aspectFor:aKey
- "returns the aspect for aKey"
-
- ^aspects at:aKey ifAbsent:[ super aspectFor:aKey ]
+ "returns the aspect for aKey or nil"
+
+ ^ aspects at:aKey ifAbsent:[ super aspectFor:aKey ]
!
canChangeOrderInContainer
@@ -2540,10 +2734,11 @@
!
canMoveSelection
-
- ^self canChangeOrderInContainer value or: [
- self canMoveSelectionOutOfContainer value or: [
- self canMoveSelectionOutOfContainer value]]
+ "true if move-in/move-out/move-up and down are enabled"
+
+ ^ self canChangeOrderInContainer value
+ or: [ self canMoveSelectionOutOfContainer value
+ or: [ self canMoveSelectionIntoContainer value ]]
!
canMoveSelectionIntoContainer
@@ -5726,14 +5921,20 @@
"returns true if any selection exists and all widgets in the selection
can change their layout through to a move or align operation"
- selection size == 0 ifTrue:[
+ selection isEmptyOrNil ifTrue:[
^ false
].
selection do:[:i|
- i == 1 ifTrue:[^ false].
-
- (self canvas canChangeLayoutOfView:((listOfNodes at:i) contents view)) ifFalse:[
+ |node view|
+
+ i == 1 ifTrue:[
+ "/ the tree node for the canvas itself.
+ ^ false
+ ].
+ node := listOfNodes at:i.
+ view := node contents view.
+ (self canvas canChangeLayoutOfView:view) ifFalse:[
^ false
]
].