CheckLabel.st
author Claus Gittinger <cg@exept.de>
Fri, 24 Apr 2020 12:05:44 +0200
changeset 6847 22dc78cb5436
parent 6794 68d504390bbf
permissions -rw-r--r--
#FEATURE by cg class: TextView changed: #editMenu
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1682
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 1998 by eXept Software AG
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
              All Rights Reserved
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
2288
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2137
diff changeset
    12
"{ Package: 'stx:libwidg' }"
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2137
diff changeset
    13
6574
6c054f170606 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 5205
diff changeset
    14
"{ NameSpace: Smalltalk }"
6c054f170606 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 5205
diff changeset
    15
1682
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
Label subclass:#CheckLabel
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	instanceVariableNames:'hasFocus'
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	classVariableNames:''
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	poolDictionaries:''
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	category:'Views-Layout'
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!CheckLabel class methodsFor:'documentation'!
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
copyright
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
 COPYRIGHT (c) 1998 by eXept Software AG
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
              All Rights Reserved
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 This software is furnished under a license and may be used
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 only in accordance with the terms of that license and with the
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 other person.  No title to or ownership of the software is
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 hereby transferred.
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
"
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
!
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
documentation
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
"
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    used for labels in checkBoxes;
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    the only added functionality is the focus-frame
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    drawn around.
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    This is used with win95 styles only.
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
"
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
! !
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
6794
68d504390bbf #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6574
diff changeset
    49
!CheckLabel class methodsFor:'defaults'!
68d504390bbf #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6574
diff changeset
    50
68d504390bbf #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6574
diff changeset
    51
defaultFont
68d504390bbf #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6574
diff changeset
    52
    ^ Label defaultFont
68d504390bbf #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6574
diff changeset
    53
! !
68d504390bbf #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 6574
diff changeset
    54
1682
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
!CheckLabel methodsFor:'accessing'!
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
6574
6c054f170606 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 5205
diff changeset
    57
hasFocus:aBoolean
2288
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2137
diff changeset
    58
    "set the value of the instance variable 'hasFocus' (automatically generated)"
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2137
diff changeset
    59
6574
6c054f170606 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 5205
diff changeset
    60
    hasFocus := aBoolean.
2288
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2137
diff changeset
    61
6574
6c054f170606 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 5205
diff changeset
    62
    "Created: / 17-09-1998 / 14:17:51 / cg"
6c054f170606 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 5205
diff changeset
    63
    "Modified (format): / 23-04-2019 / 19:19:10 / Claus Gittinger"
2288
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2137
diff changeset
    64
! !
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2137
diff changeset
    65
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2137
diff changeset
    66
!CheckLabel methodsFor:'queries'!
93f27fcd6dc2 category change
Claus Gittinger <cg@exept.de>
parents: 2137
diff changeset
    67
1682
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
hasFocus
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
    "return the value of the instance variable 'hasFocus' (automatically generated)"
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
6574
6c054f170606 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 5205
diff changeset
    71
    ^ hasFocus ? false
1682
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
6574
6c054f170606 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 5205
diff changeset
    73
    "Created: / 17-09-1998 / 14:17:51 / cg"
6c054f170606 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 5205
diff changeset
    74
    "Modified: / 23-04-2019 / 19:12:20 / Claus Gittinger"
1682
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
! !
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
!CheckLabel methodsFor:'redrawing'!
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
drawWith:fg and:bg
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
    super drawWith:fg and:bg.
5205
d5b7f2176621 class: CheckLabel
Claus Gittinger <cg@exept.de>
parents: 3682
diff changeset
    81
    hasFocus == true ifTrue:[ self drawFocusFrame ].
1682
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
    "Created: / 17.9.1998 / 14:16:07 / cg"
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
    "Modified: / 17.9.1998 / 14:17:40 / cg"
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
! !
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
!CheckLabel class methodsFor:'documentation'!
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
version
6574
6c054f170606 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 5205
diff changeset
    90
    ^ '$Header$'
1682
6289269ca02c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
! !
5205
d5b7f2176621 class: CheckLabel
Claus Gittinger <cg@exept.de>
parents: 3682
diff changeset
    92