author | Jan Vrany <jan.vrany@labware.com> |
Fri, 02 Sep 2022 11:25:39 +0100 | |
branch | jv |
changeset 6261 | 9b7eb7159d29 |
parent 4770 | 6634b540fea2 |
permissions | -rw-r--r-- |
0 | 1 |
" |
3 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
0 | 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 |
" |
|
3150 | 12 |
"{ Package: 'stx:libwidg2' }" |
13 |
||
4770
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4354
diff
changeset
|
14 |
"{ NameSpace: Smalltalk }" |
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4354
diff
changeset
|
15 |
|
0 | 16 |
Button subclass:#MenuButton |
1231 | 17 |
instanceVariableNames:'enterAction' |
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Views-Obsolete' |
|
0 | 21 |
! |
22 |
||
86
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
23 |
!MenuButton class methodsFor:'documentation'! |
0 | 24 |
|
86
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
25 |
copyright |
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
26 |
" |
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
27 |
COPYRIGHT (c) 1989 by Claus Gittinger |
0 | 28 |
All Rights Reserved |
29 |
||
86
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
30 |
This software is furnished under a license and may be used |
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
31 |
only in accordance with the terms of that license and with the |
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
32 |
inclusion of the above copyright notice. This software may not |
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
33 |
be provided or otherwise made available to, or used by, any |
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
34 |
other person. No title to or ownership of the software is |
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
35 |
hereby transferred. |
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
36 |
" |
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
37 |
! |
0 | 38 |
|
86
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
39 |
documentation |
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
40 |
" |
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
41 |
this is obsolete |
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
42 |
|
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
43 |
these objects implement the special buttons used for pull-down-menu-bars. |
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
44 |
they highlight on enter events (while pressed) and perform their |
1231 | 45 |
action on release. |
46 |
This is no longer needed, since every button (& buttonController) |
|
4354 | 47 |
now supports this behavior. |
86
4d7dbb5f1719
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
48 |
" |
0 | 49 |
! ! |
50 |
||
51 |
!MenuButton methodsFor:'accessing'! |
|
52 |
||
53 |
enterAction:aBlock |
|
54 |
enterAction := aBlock |
|
55 |
! ! |
|
56 |
||
57 |
!MenuButton methodsFor:'events'! |
|
58 |
||
59 |
pointerEnter:state x:x y:y |
|
60 |
(state bitTest:(device bitButton1)) ifTrue:[ |
|
61 |
self turnOn. |
|
62 |
enterAction notNil ifTrue:[enterAction value] |
|
63 |
] |
|
64 |
! ! |
|
1231 | 65 |
|
66 |
!MenuButton methodsFor:'initialization'! |
|
67 |
||
68 |
initEvents |
|
69 |
super initEvents. |
|
70 |
self enableEnterEvents |
|
71 |
! ! |
|
72 |
||
73 |
!MenuButton class methodsFor:'documentation'! |
|
74 |
||
75 |
version |
|
4354 | 76 |
^ '$Header: /cvs/stx/stx/libwidg2/MenuButton.st,v 1.7 2013-08-31 09:10:41 cg Exp $' |
1231 | 77 |
! ! |
4354 | 78 |