Ctrl-CursorUp/Down in tree
authorClaus Gittinger <cg@exept.de>
Mon, 23 Jan 2006 19:12:02 +0100
changeset 1958 109ef8358a55
parent 1957 cd30f8cd59f8
child 1959 fd6bf76e712a
Ctrl-CursorUp/Down in tree
MenuEditor.st
--- a/MenuEditor.st	Mon Jan 23 19:04:54 2006 +0100
+++ b/MenuEditor.st	Mon Jan 23 19:12:02 2006 +0100
@@ -1269,42 +1269,38 @@
             activeHelpKey: editMoveUp
             enabled: valueOfEnableMovingUpOrDown
             label: 'Move Up'
-            itemValue: doMoveUpOrDown:
+            itemValue: doMoveUp
             translateLabel: true
             isButton: true
             startGroup: right
             labelImage: (ResourceRetriever Icon upIcon)
-            argument: up
           )
          (MenuItem
             activeHelpKey: editMoveDown
             enabled: valueOfEnableMovingUpOrDown
             label: 'Move Down'
-            itemValue: doMoveUpOrDown:
+            itemValue: doMoveDown
             translateLabel: true
             isButton: true
             labelImage: (ResourceRetriever Icon downIcon)
-            argument: down
           )
          (MenuItem
             activeHelpKey: editMoveIn
             enabled: valueOfEnableMovingIn
-            label: 'Move In'
-            itemValue: doMoveIn:
+            label: 'Move Into Next'
+            itemValue: doMoveInNext
             translateLabel: true
             isButton: true
             labelImage: (ResourceRetriever Icon downRightIcon)
-            argument: inNext
           )
          (MenuItem
             activeHelpKey: editMoveInAbove
             enabled: valueOfEnableMovingInAbove
-            label: 'Move In Above'
-            itemValue: doMoveIn:
+            label: 'Move Into Previous'
+            itemValue: doMoveInPrevious
             translateLabel: true
             isButton: true
             labelImage: (ResourceRetriever Icon upRightIcon)
-            argument: inPrev
           )
          (MenuItem
             activeHelpKey: editMoveOut
@@ -2102,7 +2098,24 @@
     key == #Copy  ifTrue:[ self doCopy.  ^ true ].
     key == #Paste ifTrue:[ self doPaste. ^ true ].
 
-    ^ false
+    (rawKey == #CtrlCursorUp) ifTrue:[ 
+        self doMoveUp.
+        ^ true.
+    ].
+    (rawKey == #CtrlCursorDown) ifTrue:[ 
+        self doMoveDown.
+        ^ true.
+    ].
+    (rawKey == #CtrlCursorLeft) ifTrue:[ 
+        self doMoveOut.
+        ^ true.
+    ].
+    (rawKey == #CtrlCursorRight) ifTrue:[ 
+        self doMoveInNext.
+        ^ true.
+    ].
+
+    ^ false.
 ! !
 
 !MenuEditor methodsFor:'initialization & release'!
@@ -2705,6 +2718,12 @@
 
 !MenuEditor methodsFor:'user actions-hierarchy'!
 
+doMoveDown
+    "move selected item down"
+
+    self doMoveUpOrDown:#down
+!
+
 doMoveIn:aDirection
     "move selected item into the next (#inNext) or previous (#inPrev) item
     "
@@ -2736,6 +2755,18 @@
     modified := true.
 !
 
+doMoveInNext
+    "move selected item into the next item"
+
+    self doMoveIn:#inNext.
+!
+
+doMoveInPrevious
+    "move selected item into the previous item"
+
+    self doMoveIn:#inPrev.
+!
+
 doMoveOut
     "move selected item out of current item
     "
@@ -2761,6 +2792,12 @@
     modified := true.
 !
 
+doMoveUp
+    "move selected item up"
+
+    self doMoveUpOrDown:#up
+!
+
 doMoveUpOrDown:aDirection
     "move selected item up (#up) or down (#down)
     "