MenuButton.st
author Claus Gittinger <cg@exept.de>
Fri, 15 Jun 2018 10:54:35 +0200
changeset 5816 7876c07931a7
parent 4354 49b2721ef1b0
child 4770 6634b540fea2
permissions -rw-r--r--
#DOCUMENTATION by cg class: ComboListView class comment/format in: #documentation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
0fd7841626f6 Initial revision
claus
parents:
diff changeset
     1
"
3
0332d1e8cecb *** empty log message ***
claus
parents: 2
diff changeset
     2
 COPYRIGHT (c) 1989 by Claus Gittinger
0
0fd7841626f6 Initial revision
claus
parents:
diff changeset
     3
	      All Rights Reserved
0fd7841626f6 Initial revision
claus
parents:
diff changeset
     4
0fd7841626f6 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
0fd7841626f6 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
0fd7841626f6 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
0fd7841626f6 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
0fd7841626f6 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    11
"
3150
e3a55f15ef7e package information
Claus Gittinger <cg@exept.de>
parents: 1231
diff changeset
    12
"{ Package: 'stx:libwidg2' }"
e3a55f15ef7e package information
Claus Gittinger <cg@exept.de>
parents: 1231
diff changeset
    13
0
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    14
Button subclass:#MenuButton
1231
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    15
	instanceVariableNames:'enterAction'
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    16
	classVariableNames:''
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    17
	poolDictionaries:''
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    18
	category:'Views-Obsolete'
0
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    19
!
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    20
86
4d7dbb5f1719 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
    21
!MenuButton class methodsFor:'documentation'!
0
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    22
86
4d7dbb5f1719 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
    23
copyright
4d7dbb5f1719 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
    24
"
4d7dbb5f1719 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
    25
 COPYRIGHT (c) 1989 by Claus Gittinger
0
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    26
	      All Rights Reserved
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    27
86
4d7dbb5f1719 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
    28
 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
    29
 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
    30
 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
    31
 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
    32
 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
    33
 hereby transferred.
4d7dbb5f1719 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
    34
"
4d7dbb5f1719 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
    35
!
0
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    36
86
4d7dbb5f1719 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
    37
documentation
4d7dbb5f1719 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
    38
"
4d7dbb5f1719 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
    39
    this is obsolete
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
    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
    42
    they highlight on enter events (while pressed) and perform their
1231
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    43
    action on release.
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    44
    This is no longer needed, since every button (& buttonController)
4354
49b2721ef1b0 comments
Claus Gittinger <cg@exept.de>
parents: 3150
diff changeset
    45
    now supports this behavior.
86
4d7dbb5f1719 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
    46
"
0
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    47
! !
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    48
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    49
!MenuButton methodsFor:'accessing'!
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    50
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    51
enterAction:aBlock
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    52
    enterAction := aBlock
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    53
! !
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    54
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    55
!MenuButton methodsFor:'events'!
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    56
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    57
pointerEnter:state x:x y:y
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    58
    (state bitTest:(device bitButton1)) ifTrue:[
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    59
	self turnOn.
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    60
	enterAction notNil ifTrue:[enterAction value]
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    61
    ]
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    62
! !
1231
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    63
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    64
!MenuButton methodsFor:'initialization'!
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    65
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    66
initEvents
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    67
    super initEvents.
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    68
    self enableEnterEvents
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    69
! !
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    70
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    71
!MenuButton class methodsFor:'documentation'!
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    72
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    73
version
4354
49b2721ef1b0 comments
Claus Gittinger <cg@exept.de>
parents: 3150
diff changeset
    74
    ^ '$Header: /cvs/stx/stx/libwidg2/MenuButton.st,v 1.7 2013-08-31 09:10:41 cg Exp $'
1231
8d0719049fde *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    75
! !
4354
49b2721ef1b0 comments
Claus Gittinger <cg@exept.de>
parents: 3150
diff changeset
    76