ControllerWithMenu.st
author claus
Sun, 26 Mar 1995 22:14:10 +0200
changeset 125 d74e6ab7157a
parent 123 9f8c7f20fdb2
child 141 caf4432fae8f
permissions -rw-r--r--
*** empty log message ***

"
 COPYRIGHT (c) 1994 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

Controller subclass:#ControllerWithMenu
       instanceVariableNames:'menuHolder performer'
       classVariableNames:''
       poolDictionaries:''
       category:'Interface-Support'
!

ControllerWithMenu comment:'
COPYRIGHT (c) 1994 by Claus Gittinger
	      All Rights Reserved

$Header: /cvs/stx/stx/libview/ControllerWithMenu.st,v 1.3 1995-03-26 20:11:43 claus Exp $
'!

!ControllerWithMenu class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1994 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

version
"
$Header: /cvs/stx/stx/libview/ControllerWithMenu.st,v 1.3 1995-03-26 20:11:43 claus Exp $
"
!

documentation
"
    ControllerWithMenus is a very simple controller for a view with
    a middleButtonMenu.
    This class currently exists for ST-80 compatibility only.
"
! !

!ControllerWithMenu  methodsFor:'accessing'!

menuHolder:aValueHolder
    menuHolder := aValueHolder
!

menuHolder
    ^ menuHolder
!

performer 
    ^ performer 
!

performer:anObject
    performer  := anObject
!

menu
    "to be redefined in subclasses"

    ^ nil
! !

!ControllerWithMenu  methodsFor:'events'!

yellowButtonActivity
    |m selection|

    (m := self menu) notNil ifTrue:[
	selection := self menu startUp.
	selection ~~ 0 ifTrue:[
	    self perform:selection
	]
    ]
! !