136
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1995 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 |
ButtonController subclass:#PopUpListController
|
|
14 |
instanceVariableNames:''
|
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
|
17 |
category:'Interface-Support-Controllers'
|
|
18 |
!
|
|
19 |
|
|
20 |
!PopUpListController class methodsFor:'documentation'!
|
|
21 |
|
|
22 |
copyright
|
|
23 |
"
|
|
24 |
COPYRIGHT (c) 1995 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 |
documentation
|
|
37 |
"
|
|
38 |
redefined the behavior on various keys if my view has the focus.
|
|
39 |
"
|
|
40 |
! !
|
|
41 |
|
|
42 |
!PopUpListController methodsFor:'event handling'!
|
|
43 |
|
|
44 |
keyPress:key x:x y:y
|
|
45 |
"pull menu on Return and space, if I am the focusView of my group
|
|
46 |
(i.e. if I got an explicit focus)"
|
|
47 |
|
155
|
48 |
<resource: #keyboard (#CursorUp #CursorDown)>
|
|
49 |
|
136
|
50 |
view hasFocus ifTrue:[
|
246
|
51 |
(key == #Return) ifTrue:[
|
|
52 |
view menu shown ifTrue:[
|
|
53 |
self halt:'not yet implemented'.
|
|
54 |
^ self.
|
|
55 |
].
|
|
56 |
].
|
|
57 |
(key == #CursorUp or:[key == #CursorDown]) ifTrue:[
|
|
58 |
view menu shown ifTrue:[
|
|
59 |
key == #CursorUp ifTrue:[view menu selectNext]
|
|
60 |
ifFalse:[view menu selectPrevious].
|
|
61 |
^ self.
|
|
62 |
].
|
|
63 |
].
|
|
64 |
(key == #Return or:[key == Character space]) ifTrue:[
|
|
65 |
view menu exclusivePointer:false.
|
|
66 |
view menu hideOnRelease:true.
|
|
67 |
view popMenu.
|
|
68 |
view menu exclusivePointer:true.
|
|
69 |
^ self.
|
|
70 |
]
|
136
|
71 |
].
|
|
72 |
view keyPress:key x:x y:y
|
246
|
73 |
|
|
74 |
"Created: 9.12.1995 / 23:06:09 / cg"
|
136
|
75 |
! !
|
200
|
76 |
|
203
|
77 |
!PopUpListController class methodsFor:'documentation'!
|
|
78 |
|
|
79 |
version
|
246
|
80 |
^ '$Header: /cvs/stx/stx/libwidg/PopUpListController.st,v 1.6 1995-12-09 22:11:01 cg Exp $'
|
203
|
81 |
! !
|