ControllerWithMenu.st
author claus
Wed, 10 May 1995 04:26:41 +0200
changeset 141 caf4432fae8f
parent 125 d74e6ab7157a
child 157 891eff44c2e7
permissions -rw-r--r--
.

"
 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-Controllers'
!

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

$Header: /cvs/stx/stx/libview/ControllerWithMenu.st,v 1.4 1995-05-10 02:24:54 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.4 1995-05-10 02:24:54 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
	]
    ]
! !