91
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1994 by Claus Gittinger
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
Controller subclass:#ControllerWithMenu
|
123
|
14 |
instanceVariableNames:'menuHolder performer'
|
91
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
|
17 |
category:'Interface-Support'
|
|
18 |
!
|
|
19 |
|
|
20 |
ControllerWithMenu comment:'
|
|
21 |
COPYRIGHT (c) 1994 by Claus Gittinger
|
|
22 |
All Rights Reserved
|
|
23 |
|
123
|
24 |
$Header: /cvs/stx/stx/libview/ControllerWithMenu.st,v 1.2 1995-03-25 22:11:54 claus Exp $
|
91
|
25 |
'!
|
|
26 |
|
|
27 |
!ControllerWithMenu class methodsFor:'documentation'!
|
|
28 |
|
|
29 |
copyright
|
|
30 |
"
|
|
31 |
COPYRIGHT (c) 1994 by Claus Gittinger
|
|
32 |
All Rights Reserved
|
|
33 |
|
|
34 |
This software is furnished under a license and may be used
|
|
35 |
only in accordance with the terms of that license and with the
|
|
36 |
inclusion of the above copyright notice. This software may not
|
|
37 |
be provided or otherwise made available to, or used by, any
|
|
38 |
other person. No title to or ownership of the software is
|
|
39 |
hereby transferred.
|
|
40 |
"
|
|
41 |
!
|
|
42 |
|
|
43 |
version
|
|
44 |
"
|
123
|
45 |
$Header: /cvs/stx/stx/libview/ControllerWithMenu.st,v 1.2 1995-03-25 22:11:54 claus Exp $
|
91
|
46 |
"
|
|
47 |
!
|
|
48 |
|
|
49 |
documentation
|
|
50 |
"
|
|
51 |
ControllerWithMenus is a very simple controller for a view with
|
|
52 |
a middleButtonMenu.
|
123
|
53 |
This class exists for ST-80 compatibility only.
|
91
|
54 |
"
|
|
55 |
! !
|
|
56 |
|
|
57 |
!ControllerWithMenu methodsFor:'accessing'!
|
|
58 |
|
123
|
59 |
menuHolder:aValueHolder
|
|
60 |
menuHolder := aValueHolder
|
|
61 |
!
|
|
62 |
|
|
63 |
menuHolder
|
|
64 |
^ menuHolder
|
|
65 |
!
|
|
66 |
|
|
67 |
performer
|
|
68 |
^ performer
|
|
69 |
!
|
|
70 |
|
|
71 |
performer:anObject
|
|
72 |
performer := anObject
|
|
73 |
!
|
|
74 |
|
91
|
75 |
menu
|
|
76 |
"to be redefined in subclasses"
|
|
77 |
|
|
78 |
^ nil
|
|
79 |
! !
|
|
80 |
|
|
81 |
!ControllerWithMenu methodsFor:'events'!
|
|
82 |
|
|
83 |
yellowButtonActivity
|
|
84 |
|m selection|
|
|
85 |
|
|
86 |
(m := self menu) notNil ifTrue:[
|
|
87 |
selection := self menu startUp.
|
|
88 |
selection ~~ 0 ifTrue:[
|
|
89 |
self perform:selection
|
|
90 |
]
|
|
91 |
]
|
|
92 |
! !
|