MotionButton.st
author Jan Vrany <jan.vrany@labware.com>
Fri, 02 Sep 2022 11:25:39 +0100
branchjv
changeset 6261 9b7eb7159d29
parent 4770 6634b540fea2
permissions -rw-r--r--
Fix loong standing bug with some menus not being translated / resolved This has happened with browser "View" menu when sometimes it had the slice resolved and sometimes not. It turned out that it was because the code disabled resources (and therefore slices) resolution when processing shortcuts, so the menu was created and cached unresolved. This fixes the issue. eXept apparently run into the same problem.
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: 1230
diff changeset
    12
"{ Package: 'stx:libwidg2' }"
e3a55f15ef7e package information
Claus Gittinger <cg@exept.de>
parents: 1230
diff changeset
    13
4770
6634b540fea2 Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4355
diff changeset
    14
"{ NameSpace: Smalltalk }"
6634b540fea2 Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4355
diff changeset
    15
0
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    16
Button subclass:#MotionButton
1230
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    17
	instanceVariableNames:'oldBorderWidth'
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    18
	classVariableNames:''
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    19
	poolDictionaries:''
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    20
	category:'Views-Obsolete'
0
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    21
!
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
!MotionButton class methodsFor:'documentation'!
0
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    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
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    28
	      All Rights Reserved
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    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
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    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
    a motionButton highlights itself whenever the cursor
4d7dbb5f1719 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
    44
    walks into it ...
4355
3ec5cc86b891 comments
Claus Gittinger <cg@exept.de>
parents: 3150
diff changeset
    45
    ... this is no longer needed, since every button now
1230
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    46
    supports this.
86
4d7dbb5f1719 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 3
diff changeset
    47
"
0
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    48
! !
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    49
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    50
!MotionButton methodsFor:'events'!
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    51
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    52
pointerEnter:state x:x y:y
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    53
    oldBorderWidth := self borderWidth.
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    54
    self borderWidth:(oldBorderWidth * 2)
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    55
!
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    56
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    57
pointerLeave:state
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    58
    self borderWidth:oldBorderWidth
0fd7841626f6 Initial revision
claus
parents:
diff changeset
    59
! !
1230
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    60
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    61
!MotionButton methodsFor:'initialization'!
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    62
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    63
initEvents
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    64
    super initEvents.
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    65
    self enableEnterLeaveEvents
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    66
! !
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    67
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    68
!MotionButton class methodsFor:'documentation'!
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    69
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    70
version
4355
3ec5cc86b891 comments
Claus Gittinger <cg@exept.de>
parents: 3150
diff changeset
    71
    ^ '$Header: /cvs/stx/stx/libwidg2/MotionButton.st,v 1.7 2013-08-31 09:10:43 cg Exp $'
1230
1e521b1de695 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 86
diff changeset
    72
! !
4355
3ec5cc86b891 comments
Claus Gittinger <cg@exept.de>
parents: 3150
diff changeset
    73