author | Claus Gittinger <cg@exept.de> |
Sat, 11 Nov 1995 16:54:10 +0100 | |
changeset 219 | 9ff0660f447f |
parent 157 | 891eff44c2e7 |
child 1150 | a3d2fa5c5e6a |
permissions | -rw-r--r-- |
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:'' |
|
141 | 17 |
category:'Interface-Support-Controllers' |
91 | 18 |
! |
19 |
||
20 |
!ControllerWithMenu class methodsFor:'documentation'! |
|
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
25 |
All Rights Reserved |
|
26 |
||
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
version |
|
219
9ff0660f447f
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
157
diff
changeset
|
37 |
^ '$Header: /cvs/stx/stx/libview/ControllerWithMenu.st,v 1.6 1995-11-11 15:48:50 cg Exp $' |
91 | 38 |
! |
39 |
||
40 |
documentation |
|
41 |
" |
|
42 |
ControllerWithMenus is a very simple controller for a view with |
|
43 |
a middleButtonMenu. |
|
125 | 44 |
This class currently exists for ST-80 compatibility only. |
91 | 45 |
" |
46 |
! ! |
|
47 |
||
48 |
!ControllerWithMenu methodsFor:'accessing'! |
|
49 |
||
123 | 50 |
menuHolder:aValueHolder |
51 |
menuHolder := aValueHolder |
|
52 |
! |
|
53 |
||
54 |
menuHolder |
|
55 |
^ menuHolder |
|
56 |
! |
|
57 |
||
58 |
performer |
|
59 |
^ performer |
|
60 |
! |
|
61 |
||
62 |
performer:anObject |
|
63 |
performer := anObject |
|
64 |
! |
|
65 |
||
91 | 66 |
menu |
157 | 67 |
"can be redefined in subclasses" |
91 | 68 |
|
157 | 69 |
menuHolder notNil ifTrue:[ |
70 |
^ menuHolder value |
|
71 |
]. |
|
91 | 72 |
^ nil |
73 |
! ! |
|
74 |
||
75 |
!ControllerWithMenu methodsFor:'events'! |
|
76 |
||
77 |
yellowButtonActivity |
|
78 |
|m selection| |
|
79 |
||
80 |
(m := self menu) notNil ifTrue:[ |
|
81 |
selection := self menu startUp. |
|
82 |
selection ~~ 0 ifTrue:[ |
|
83 |
self perform:selection |
|
84 |
] |
|
85 |
] |
|
86 |
! ! |