# HG changeset patch # User Claus Gittinger # Date 1051524030 -7200 # Node ID 088ff38c03a5b51670bfa844e49cc8b180c87cf6 # Parent 4badda593e48a4b1e2b217f29059570efe72d766 shift + wrap diff -r 4badda593e48 -r 088ff38c03a5 ImageEditor.st --- a/ImageEditor.st Fri Apr 25 01:10:24 2003 +0200 +++ b/ImageEditor.st Mon Apr 28 12:00:30 2003 +0200 @@ -1094,7 +1094,7 @@ ) #(#InputFieldSpec #name: 'AmountEntryField' - #layout: #(#LayoutFrame 95 0 21 0 132 0 43 0) + #layout: #(#LayoutFrame 95 0 21 0 139 0 43 0) #tabable: true #model: #shiftAmount #type: #number @@ -1137,6 +1137,7 @@ #layout: #(#LayoutFrame 105 0 63 0 127 0 85 0) #model: #shiftUpNow #isTriggerOnDown: true + #autoRepeat: true #actionValue: '' #direction: #up ) @@ -1145,6 +1146,7 @@ #layout: #(#LayoutFrame 84 0 86 0 106 0 108 0) #model: #shiftLeftNow #isTriggerOnDown: true + #autoRepeat: true #actionValue: '' #direction: #left ) @@ -1153,6 +1155,7 @@ #layout: #(#LayoutFrame 126 0 86 0 148 0 108 0) #model: #shiftRightNow #isTriggerOnDown: true + #autoRepeat: true #actionValue: '' #direction: #right ) @@ -1161,9 +1164,17 @@ #layout: #(#LayoutFrame 105 0 107 0 127 0 129 0) #model: #shiftDownNow #isTriggerOnDown: true + #autoRepeat: true #actionValue: '' #direction: #down ) + #(#CheckBoxSpec + #label: 'Wrap' + #name: 'CheckBox1' + #layout: #(#LayoutFrame 153 0 22 0 289 0 44 0) + #model: #wrap + #translateLabel: true + ) ) ) @@ -1707,9 +1718,9 @@ #translateLabel: true ) #(#MenuItem + #enabled: #imageIsLoaded #label: 'Copy to Clipboard' #itemValue: #doCopyImageToClipboard - #enabled: #imageIsLoaded #translateLabel: true ) #(#MenuItem @@ -1885,17 +1896,17 @@ ) ) #(#MenuItem + #activeHelpKey: #uncropManual + #label: 'Uncrop (Add Border)...' + #itemValue: #doUnCropManual + #translateLabel: true + ) + #(#MenuItem #activeHelpKey: #shiftManual #label: 'Shift...' #itemValue: #doShiftManual #translateLabel: true ) - #(#MenuItem - #activeHelpKey: #uncropManual - #label: 'Uncrop (Add Border)...' - #itemValue: #doUnCropManual - #translateLabel: true - ) ) nil nil @@ -4291,9 +4302,10 @@ doShiftManual "let user specify amount and shift" - |bindings amount img firstChange shiftAction acceptChannel| + |bindings amount img firstChange shiftAction acceptChannel wrapHolder| acceptChannel := TriggerValue new. + wrapHolder := false asValue. firstChange := true. @@ -4306,12 +4318,13 @@ imageEditView makeUndo. firstChange := false. ]. - imageEditView shiftImageHorizontal:shiftH value vertical:shiftV value. + imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value). self updateInfoLabel ]. bindings := IdentityDictionary new. bindings at:#shiftAmount put:(amount := 1 asValue). + bindings at:#wrap put:wrapHolder. bindings at:#acceptChannel put:acceptChannel. bindings at:#shiftLeftNow put:[ shiftAction value:(-1*amount value) value:0 ].