MenuEditor.st
changeset 1715 9eebdb3802aa
parent 1711 548d690e780f
child 1722 517efee14b0d
equal deleted inserted replaced
1714:f57812a56d17 1715:9eebdb3802aa
  2315 		 ifFalse:[ selection := #() ].
  2315 		 ifFalse:[ selection := #() ].
  2316 
  2316 
  2317     selectionHolder value:selection.
  2317     selectionHolder value:selection.
  2318 ! !
  2318 ! !
  2319 
  2319 
  2320 !MenuEditor methodsFor:'user actions - aspects'!
  2320 !MenuEditor methodsFor:'user actions-aspects'!
  2321 
  2321 
  2322 collectActionSelectors
  2322 collectActionSelectors
  2323     |selectors|
  2323     |selectors|
  2324 
  2324 
  2325     selectors := IdentitySet new.
  2325     selectors := IdentitySet new.
  2371                           category:'menu - aspects'
  2371                           category:'menu - aspects'
  2372                           redefine:redefineAspectMethods
  2372                           redefine:redefineAspectMethods
  2373     ].
  2373     ].
  2374 ! !
  2374 ! !
  2375 
  2375 
  2376 !MenuEditor methodsFor:'user actions - building'!
  2376 !MenuEditor methodsFor:'user actions-building'!
  2377 
  2377 
  2378 doNew
  2378 doNew
  2379     "clear editing menu; start from scratch
  2379     "clear editing menu; start from scratch
  2380     "
  2380     "
  2381     super doNew ifTrue:[ self helpTool doNew ].
  2381     super doNew ifTrue:[ self helpTool doNew ].
  2471     spec ifNotNil:[
  2471     spec ifNotNil:[
  2472         CodeView openWith:spec title: 'Menu Spec'
  2472         CodeView openWith:spec title: 'Menu Spec'
  2473     ].
  2473     ].
  2474 ! !
  2474 ! !
  2475 
  2475 
  2476 !MenuEditor methodsFor:'user actions - creation'!
  2476 !MenuEditor methodsFor:'user actions-creation'!
  2477 
  2477 
  2478 doCreateDelayedMenu:what
  2478 doCreateDelayedMenu:what
  2479     |selectedItem delayedItem|
  2479     |selectedItem delayedItem|
  2480 
  2480 
  2481     selectedItem := self selectedItem.
  2481     selectedItem := self selectedItem.
  2550         item aspectAt:#startGroup put:#right.
  2550         item aspectAt:#startGroup put:#right.
  2551         item
  2551         item
  2552     ].
  2552     ].
  2553 ! !
  2553 ! !
  2554 
  2554 
  2555 !MenuEditor methodsFor:'user actions - editing'!
  2555 !MenuEditor methodsFor:'user actions-editing'!
  2556 
  2556 
  2557 doCopy
  2557 doCopy
  2558     "copy selected menuItems to the clipboard
  2558     "copy selected menuItems to the clipboard
  2559     "
  2559     "
  2560     |clip items|
  2560     |clip items|
  2641     self addAndSelectValueOf:[
  2641     self addAndSelectValueOf:[
  2642         loMenuItems collect:[:el| Item menuItem:el ]
  2642         loMenuItems collect:[:el| Item menuItem:el ]
  2643     ].
  2643     ].
  2644 ! !
  2644 ! !
  2645 
  2645 
  2646 !MenuEditor methodsFor:'user actions - hierarchy'!
  2646 !MenuEditor methodsFor:'user actions-hierarchy'!
  2647 
  2647 
  2648 doMoveIn:aDirection
  2648 doMoveIn:aDirection
  2649     "move selected item into the next (#inNext) or previous (#inPrev) item
  2649     "move selected item into the next (#inNext) or previous (#inPrev) item
  2650     "
  2650     "
  2651     |item idx parent toParent|
  2651     |item idx parent toParent|