PullDMenu.st
changeset 1607 2d277721aa34
parent 1403 ddc59498d1c3
child 1621 fa41bbb0d4f2
equal deleted inserted replaced
1606:8ab3d7e85ea2 1607:2d277721aa34
    17 		raiseTopWhenActivated actions'
    17 		raiseTopWhenActivated actions'
    18 	classVariableNames:'DefaultViewBackground DefaultForegroundColor
    18 	classVariableNames:'DefaultViewBackground DefaultForegroundColor
    19 		DefaultBackgroundColor DefaultHilightForegroundColor
    19 		DefaultBackgroundColor DefaultHilightForegroundColor
    20 		DefaultHilightBackgroundColor DefaultLevel DefaultHilightLevel
    20 		DefaultHilightBackgroundColor DefaultLevel DefaultHilightLevel
    21 		DefaultShadowColor DefaultLightColor DefaultEdgeStyle
    21 		DefaultShadowColor DefaultLightColor DefaultEdgeStyle
    22 		DefaultToggleMode DefaultKeepMenu DefaultToggleKeep DefaultSeparatingLines'
    22 		DefaultToggleMode DefaultKeepMenu DefaultToggleKeep
       
    23 		DefaultSeparatingLines'
    23 	poolDictionaries:''
    24 	poolDictionaries:''
    24 	category:'Views-Menus'
    25 	category:'Views-Menus'
    25 !
    26 !
    26 
    27 
    27 !PullDownMenu class methodsFor:'documentation'!
    28 !PullDownMenu class methodsFor:'documentation'!
   553     "create and set the menu under the title, aString"
   554     "create and set the menu under the title, aString"
   554 
   555 
   555     |menuView|
   556     |menuView|
   556 
   557 
   557     menuView := MenuView labels:labels
   558     menuView := MenuView labels:labels
   558 		      selectors:selectors
   559                       selectors:selectors
   559 		   accelerators:shorties
   560                    accelerators:shorties
   560 			   args:args
   561                            args:args
   561 		       receiver:anObject
   562                        receiver:anObject
   562 			    for:self.
   563                             for:self.
   563     self at:aString putMenu:menuView
   564     self at:aString putMenu:menuView.
       
   565     ^ menuView
   564 
   566 
   565     "Created: 5.6.1996 / 16:51:48 / cg"
   567     "Created: 5.6.1996 / 16:51:48 / cg"
   566 !
   568 !
   567 
   569 
   568 at:aString putLabels:labels selectors:selectors accelerators:shorties receiver:anObject
   570 at:aString putLabels:labels selectors:selectors accelerators:shorties receiver:anObject
   569     "create and set the menu under the title, aString"
   571     "create and set the menu under the title, aString"
   570 
   572 
   571     self at:aString putLabels:labels selectors:selectors accelerators:shorties args:nil receiver:anObject
   573     ^ self at:aString putLabels:labels selectors:selectors accelerators:shorties args:nil receiver:anObject
   572 
   574 
   573     "Modified: 5.6.1996 / 16:48:26 / cg"
   575     "Modified: 5.6.1996 / 16:48:26 / cg"
   574     "Created: 5.6.1996 / 16:53:39 / cg"
   576     "Created: 5.6.1996 / 16:53:39 / cg"
   575 !
   577 !
   576 
   578 
   578     "create and set the menu under the title, aString"
   580     "create and set the menu under the title, aString"
   579 
   581 
   580     |menuView|
   582     |menuView|
   581 
   583 
   582     menuView := MenuView labels:labels
   584     menuView := MenuView labels:labels
   583 		      selectors:selectors
   585                       selectors:selectors
   584 			   args:args
   586                            args:args
   585 		       receiver:anObject
   587                        receiver:anObject
   586 			    for:self.
   588                             for:self.
   587     self at:aString putMenu:menuView
   589     self at:aString putMenu:menuView.
       
   590     ^ menuView
   588 !
   591 !
   589 
   592 
   590 at:aString putLabels:labels selectors:selectors receiver:anObject
   593 at:aString putLabels:labels selectors:selectors receiver:anObject
   591     "create and set the menu under the title, aString"
   594     "create and set the menu under the title, aString"
   592 
   595 
   593     self at:aString putLabels:labels selectors:selectors args:nil receiver:anObject
   596     ^ self at:aString putLabels:labels selectors:selectors args:nil receiver:anObject
   594 
   597 
   595     "Modified: 5.6.1996 / 16:48:26 / cg"
   598     "Modified: 5.6.1996 / 16:48:26 / cg"
   596 !
   599 !
   597 
   600 
   598 at:aString putMenu:aMenu
   601 at:aString putMenu:aMenu
   600 
   603 
   601     |index|
   604     |index|
   602 
   605 
   603     index := self indexOf:aString.
   606     index := self indexOf:aString.
   604     (index == 0) ifTrue:[
   607     (index == 0) ifTrue:[
   605 	self error:'no such menu entry'.
   608         self error:'no such menu entry'.
   606 	^ nil
   609         ^ nil
   607     ].
   610     ].
   608 
   611 
   609     aMenu container:(self superView).
   612     aMenu container:(self superView).
   610     aMenu beInvisible.
   613     aMenu beInvisible.
   611     menus at:index put:aMenu.
   614     menus at:index put:aMenu.
   612     aMenu masterView:self.
   615     aMenu masterView:self.
       
   616 
       
   617     ^ aMenu
   613 
   618 
   614     "Modified: 5.6.1996 / 16:48:50 / cg"
   619     "Modified: 5.6.1996 / 16:48:50 / cg"
   615 !
   620 !
   616 
   621 
   617 labels
   622 labels
  1773 ! !
  1778 ! !
  1774 
  1779 
  1775 !PullDownMenu class methodsFor:'documentation'!
  1780 !PullDownMenu class methodsFor:'documentation'!
  1776 
  1781 
  1777 version
  1782 version
  1778     ^ '$Header: /cvs/stx/stx/libwidg/Attic/PullDMenu.st,v 1.81 1997-11-20 18:02:20 cg Exp $'
  1783     ^ '$Header: /cvs/stx/stx/libwidg/Attic/PullDMenu.st,v 1.82 1998-07-25 10:15:35 cg Exp $'
  1779 ! !
  1784 ! !