PopUpMenu.st
changeset 426 bf35bf40ab11
parent 425 9d44d3ff44a0
child 459 5c35e2f02d27
equal deleted inserted replaced
425:9d44d3ff44a0 426:bf35bf40ab11
   294      args array to anObject. The menu is created on the default DIsplay"
   294      args array to anObject. The menu is created on the default DIsplay"
   295 
   295 
   296     "
   296     "
   297      OBSOLETE protocol: #labels:selectors:... knows how to handle single-symbol selectors-arg
   297      OBSOLETE protocol: #labels:selectors:... knows how to handle single-symbol selectors-arg
   298     "
   298     "
   299     ^ self labels:labels selectors:aSelector args:args receiver:anObject 
   299     ^ self labels:labels selectors:aSelector accelerators:nil args:args receiver:anObject
       
   300 
       
   301     "Modified: 28.2.1996 / 19:01:12 / cg"
   300 !
   302 !
   301 
   303 
   302 labels:labels selector:aSelector args:args receiver:anObject for:aView
   304 labels:labels selector:aSelector args:args receiver:anObject for:aView
   303     "create and return a popup menu with labels as entries.
   305     "create and return a popup menu with labels as entries.
   304      Each item will send aSelector with a corresponding argument from the
   306      Each item will send aSelector with a corresponding argument from the
   307      typical applications can use the sibbling message without the for: argument)."
   309      typical applications can use the sibbling message without the for: argument)."
   308 
   310 
   309     "
   311     "
   310      OBSOLETE protocol: #labels:selectors:... knows how to handle single-symbol selectors-arg
   312      OBSOLETE protocol: #labels:selectors:... knows how to handle single-symbol selectors-arg
   311     "
   313     "
   312     ^ self labels:labels selectors:aSelector args:args receiver:anObject for:aView
   314     ^ self labels:labels selectors:aSelector accelerators:nil args:args receiver:anObject for:aView
       
   315 
       
   316     "Modified: 28.2.1996 / 19:01:29 / cg"
   313 !
   317 !
   314 
   318 
   315 labels:labels selectors:selectors 
   319 labels:labels selectors:selectors 
   316     "create and return a menu with label-items and selectors. The receiver
   320     "create and return a menu with label-items and selectors. The receiver
   317      will either be defined later, or not used at all (if opened via startUp)"
   321      will either be defined later, or not used at all (if opened via startUp)"
   318 
   322 
   319     ^ self labels:labels selectors:selectors args:nil receiver:nil for:nil
   323     ^ self labels:labels selectors:selectors accelerators:nil args:nil receiver:nil for:nil
       
   324 
       
   325     "Modified: 28.2.1996 / 19:01:35 / cg"
       
   326 !
       
   327 
       
   328 labels:labels selectors:selectors accelerators:shorties 
       
   329     "create and return a menu with label-items and selectors. The receiver
       
   330      will either be defined later, or not used at all (if opened via startUp)"
       
   331 
       
   332     ^ self labels:labels selectors:selectors accelerators:shorties args:nil receiver:nil for:nil
       
   333 
       
   334     "Created: 28.2.1996 / 18:58:52 / cg"
       
   335 !
       
   336 
       
   337 labels:labels selectors:selectors accelerators:shorties args:args receiver:anObject
       
   338     "create and return a popup menu with labels as entries.
       
   339      Each item will send a corresponding selector:argument from the selectors-
       
   340      and args array to anObject. The menu is created on the default Display"
       
   341 
       
   342     ^ self labels:labels selectors:selectors accelerators:shorties args:args receiver:anObject for:nil
       
   343 
       
   344     "Created: 28.2.1996 / 18:59:03 / cg"
       
   345 !
       
   346 
       
   347 labels:labels selectors:selectors accelerators:shorties args:args receiver:anObject for:aView
       
   348     "create and return a popup menu with labels as entries.
       
   349      Each item will send a corresponding selector:argument from the selectors-
       
   350      and args array to anObject. The menu is created on the same physical device
       
   351      as aView (which is only of interest in multi-Display applications; 
       
   352      typical applications can use the sibbling message without the for: argument)."
       
   353 
       
   354     |newMenu|
       
   355 
       
   356     newMenu := self onSameDeviceAs:aView. 
       
   357     newMenu menu:(MenuView
       
   358                     labels:labels
       
   359                     selectors:selectors
       
   360                     accelerators:shorties 
       
   361                     args:args
       
   362                     receiver:anObject
       
   363                     in:newMenu).
       
   364     ^ newMenu
       
   365 
       
   366     "Created: 28.2.1996 / 18:59:25 / cg"
       
   367 !
       
   368 
       
   369 labels:labels selectors:selectors accelerators:shorties receiver:anObject
       
   370     "create and return a popup menu with labels as entries.
       
   371      Each item will send a message with a selector from the corresponding 
       
   372      selectors-array.
       
   373      The menu is created on the default Display."
       
   374 
       
   375     ^ self labels:labels selectors:selectors accelerators:shorties args:nil receiver:anObject for:nil
       
   376 
       
   377     "Created: 28.2.1996 / 19:00:49 / cg"
   320 !
   378 !
   321 
   379 
   322 labels:labels selectors:selectors args:argArray 
   380 labels:labels selectors:selectors args:argArray 
   323     "create and return a menu with label-items and selectors. The receiver
   381     "create and return a menu with label-items and selectors. The receiver
   324      will either be defined later, or not used at all (if opened via startUp)"
   382      will either be defined later, or not used at all (if opened via startUp)"
   325 
   383 
   326     ^ self labels:labels selectors:selectors args:argArray receiver:nil for:nil
   384     ^ self labels:labels selectors:selectors accelerators:nil args:argArray receiver:nil for:nil
       
   385 
       
   386     "Modified: 28.2.1996 / 19:01:45 / cg"
   327 !
   387 !
   328 
   388 
   329 labels:labels selectors:selectors args:args receiver:anObject
   389 labels:labels selectors:selectors args:args receiver:anObject
   330     "create and return a popup menu with labels as entries.
   390     "create and return a popup menu with labels as entries.
   331      Each item will send a corresponding selector:argument from the selectors-
   391      Each item will send a corresponding selector:argument from the selectors-
   332      and args array to anObject. The menu is created on the default Display"
   392      and args array to anObject. The menu is created on the default Display"
   333 
   393 
   334     ^ self labels:labels selectors:selectors args:args receiver:anObject for:nil
   394     ^ self labels:labels selectors:selectors accelerators:nil args:args receiver:anObject for:nil
       
   395 
       
   396     "Modified: 28.2.1996 / 19:01:49 / cg"
   335 !
   397 !
   336 
   398 
   337 labels:labels selectors:selectors args:args receiver:anObject for:aView
   399 labels:labels selectors:selectors args:args receiver:anObject for:aView
   338     "create and return a popup menu with labels as entries.
   400     "create and return a popup menu with labels as entries.
   339      Each item will send a corresponding selector:argument from the selectors-
   401      Each item will send a corresponding selector:argument from the selectors-
   340      and args array to anObject. The menu is created on the same physical device
   402      and args array to anObject. The menu is created on the same physical device
   341      as aView (which is only of interest in multi-Display applications; 
   403      as aView (which is only of interest in multi-Display applications; 
   342      typical applications can use the sibbling message without the for: argument)."
   404      typical applications can use the sibbling message without the for: argument)."
   343 
   405 
   344     |newMenu|
   406     ^ self labels:labels selectors:selectors accelerators:nil args:args receiver:anObject for:aView
   345 
   407 
   346     newMenu := self onSameDeviceAs:aView. 
   408     "Modified: 28.2.1996 / 19:03:58 / cg"
   347     newMenu menu:(MenuView
       
   348 		    labels:labels
       
   349 		    selectors:selectors
       
   350 		    args:args
       
   351 		    receiver:anObject
       
   352 		    in:newMenu).
       
   353     ^ newMenu
       
   354 !
   409 !
   355 
   410 
   356 labels:labels selectors:selectors receiver:anObject
   411 labels:labels selectors:selectors receiver:anObject
   357     "create and return a popup menu with labels as entries.
   412     "create and return a popup menu with labels as entries.
   358      Each item will send a message with a selector from the corresponding 
   413      Each item will send a message with a selector from the corresponding 
   359      selectors-array.
   414      selectors-array.
   360      The menu is created on the default Display."
   415      The menu is created on the default Display."
   361 
   416 
   362     ^ self labels:labels selectors:selectors args:nil receiver:anObject for:nil
   417     ^ self labels:labels selectors:selectors accelerators:nil args:nil receiver:anObject for:nil
       
   418 
       
   419     "Modified: 28.2.1996 / 19:02:07 / cg"
   363 !
   420 !
   364 
   421 
   365 labels:labels selectors:selectors receiver:anObject for:aView
   422 labels:labels selectors:selectors receiver:anObject for:aView
   366     "create and return a popup menu with labels as entries.
   423     "create and return a popup menu with labels as entries.
   367      Each item will send a corresponding selector from the selectors-array
   424      Each item will send a corresponding selector from the selectors-array
   368      to anObject. The menu is created on the same physical device
   425      to anObject. The menu is created on the same physical device
   369      as aView (which is only of interest in multi-Display applications; 
   426      as aView (which is only of interest in multi-Display applications; 
   370      typical applications can use the sibbling message without the for: argument)."
   427      typical applications can use the sibbling message without the for: argument)."
   371 
   428 
   372     ^ self labels:labels selectors:selectors args:nil receiver:anObject for:aView
   429     ^ self labels:labels selectors:selectors accelerators:nil args:nil receiver:anObject for:aView
       
   430 
       
   431     "Modified: 28.2.1996 / 19:02:10 / cg"
   373 ! !
   432 ! !
   374 
   433 
   375 !PopUpMenu class methodsFor:'ST-80 instance creation'!
   434 !PopUpMenu class methodsFor:'ST-80 instance creation'!
   376 
   435 
   377 labelArray:labels lines:lines values:values 
   436 labelArray:labels lines:lines values:values 
  1002 ! !
  1061 ! !
  1003 
  1062 
  1004 !PopUpMenu class methodsFor:'documentation'!
  1063 !PopUpMenu class methodsFor:'documentation'!
  1005 
  1064 
  1006 version
  1065 version
  1007     ^ '$Header: /cvs/stx/stx/libwidg/PopUpMenu.st,v 1.37 1996-02-28 14:29:08 cg Exp $'
  1066     ^ '$Header: /cvs/stx/stx/libwidg/PopUpMenu.st,v 1.38 1996-02-28 18:46:01 cg Exp $'
  1008 ! !
  1067 ! !