MacButtonBorder.st
author Claus Gittinger <cg@exept.de>
Mon, 05 Oct 2015 10:58:28 +0200
changeset 6971 9a049a044a07
parent 6964 a459b5a03d9c
child 6984 7db9175c551b
permissions -rw-r--r--
#REFACTORING class: MacButtonBorder class definition removed: #viewBackgroundColor #viewBackgroundColor:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6944
81016c45d31b initial checkin
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
     1
"{ Encoding: utf8 }"
81016c45d31b initial checkin
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
     2
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"{ Package: 'stx:libview' }"
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
"{ NameSpace: Smalltalk }"
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
AbstractBorder subclass:#MacButtonBorder
6971
9a049a044a07 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 6964
diff changeset
     8
	instanceVariableNames:'topLeftEdge topRightEdge bottomLeftEdge bottomRightEdge'
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
	classVariableNames:'TopLeftEdge TopRightEdge BottomLeftEdge BottomRightEdge'
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
	poolDictionaries:''
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
	category:'Graphics-Support'
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
!MacButtonBorder class methodsFor:'documentation'!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
documentation
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
"
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
    an as yet unused and unfinished attempt to provide a mac-osx like
6944
81016c45d31b initial checkin
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
    19
    button border. These will look like mac buttons up to maverick.
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
    To be continued.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
"
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
examples
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
"
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
                                                [exBegin]
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
     |top v b|
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
     top := StandardSystemView extent:100@100.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
     v := View origin:10@10 corner:90@30 in:top.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
     top openAndWait.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
     b := MacButtonBorder new.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
     v border:b.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
                                                [exEnd]
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
                                                [exBegin]
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
     |top v1 v2 b|
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
     top := StandardSystemView extent:100@200.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
     v1 := View origin:10@10 corner:90@30 in:top.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
     v2 := View origin:10@100 corner:90@150 in:top.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
     top openAndWait.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
     b := MacButtonBorder new.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
     v1 border:b.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
     v2 border:b.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
                                                [exEnd]
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
"
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
! !
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
!MacButtonBorder class methodsFor:'initialization'!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
initialize
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
    55
    "/ self initializeImages. -- done lazy
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
    56
!
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
    57
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
    58
initializeImages
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
    59
    TopLeftEdge := self topLeftImage.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
    60
    TopRightEdge := TopLeftEdge copy flipHorizontal.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
    61
    BottomLeftEdge := self bottomLeftImage.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
    62
    BottomRightEdge := BottomLeftEdge copy flipHorizontal.
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
! !
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
!MacButtonBorder class methodsFor:'image specs'!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
bottomLeftImage
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
    "This resource specification was automatically generated
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
     by the ImageEditor of ST/X."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
    "Do not manually edit this!! If it is corrupted,
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
     the ImageEditor may not be able to read the specification."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
     self bottomLeftImage inspect
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
     ImageEditor openOnClass:self andSelector:#bottomLeftImage
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
     Icon flushCachedIcons
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
    <resource: #image>
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
    ^Icon
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
        constantNamed:'MacButtonBorder bottomLeftImage'
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
    84
        ifAbsentPut:[(Depth8Image width:9 height:10) bits:(ByteArray fromPackedString:'EP8WH"H"H"H"F@\VH"H"H"H"G 4R@RH"H"H"H1DFGRH"H"H"I!!0JB2@"H"H"@BPTA 0%H"H"@@@!!DPTCF"H"@@@@HQLI@PPO@@@@@BLYD@ B@@@@@@@&HQ,U
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
    85
') colorMapFromArray:#[0 0 0 45 45 45 56 56 56 66 66 66 70 70 70 72 72 72 76 76 76 89 89 89 92 92 92 93 93 93 103 103 103 110 110 110 111 111 111 112 112 112 121 121 121 147 147 147 150 150 150 165 165 165 169 169 169 176 176 176 181 181 181 186 186 186 192 192 192 197 197 197 198 198 198 199 199 199 200 200 200 204 204 204 206 206 206 209 209 209 212 212 212 216 216 216 222 222 222 224 224 224 226 226 226 229 229 229 231 231 231 233 233 233 235 235 235] mask:((ImageMask width:9 height:10) bits:(ByteArray fromPackedString:'8G? _>A?<G?8_71?O''<_?0??A?<b'); yourself); yourself]
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
topLeftImage
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
    "This resource specification was automatically generated
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
     by the ImageEditor of ST/X."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
    "Do not manually edit this!! If it is corrupted,
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
     the ImageEditor may not be able to read the specification."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
     self topLeftImage inspect
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
     ImageEditor openOnClass:self andSelector:#topLeftImage
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
     Icon flushCachedIcons
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
    <resource: #image>
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
    ^Icon
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
        constantNamed:'MacButtonBorder topLeftImage'
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   105
        ifAbsentPut:[(Depth8Image width:9 height:10) bits:(ByteArray fromPackedString:'@@@@@@@_G1@C@@@@@A<Q@P,T@@@@G0\DGQ8^@@@_BP _G!!8^@A<OA!!\^G!!8^G1,BD10^G!!8^G08LFQ8^G!!8^GPTRG!!8^G!!8^F@(VG!!8^G!!8^EP4ZG!!8^G!!8^
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   106
') colorMapFromArray:#[0 0 0 91 91 91 102 102 102 104 104 104 109 109 109 110 110 110 115 115 115 117 117 117 118 118 118 119 119 119 121 121 121 123 123 123 139 139 139 143 143 143 146 146 146 153 153 153 155 155 155 158 158 158 169 169 169 174 174 174 187 187 187 191 191 191 192 192 192 199 199 199 203 203 203 204 204 204 207 207 207 217 217 217 219 219 219 221 221 221 224 224 224 229 229 229] mask:((ImageMask width:9 height:10) bits:(ByteArray fromPackedString:'A?<O?19?OG=8_?!!?<G? _>A?8G<b'); yourself); yourself]
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   107
! !
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   109
!MacButtonBorder methodsFor:'accessing'!
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   111
backgroundColor1:aColor
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   114
backgroundColor2:aColor
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
! !
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
!MacButtonBorder methodsFor:'displaying'!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
displayOn:aGC forDisplayBox:aRectangle
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
    "display the borders represented by the receiver in the specified rectangle.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
     The gc is restored after the draw."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   123
    |left right top bottom savedPaint lw th rw bh|
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
    left := aRectangle left.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
    right := aRectangle right.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
    top := aRectangle top.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
    bottom := aRectangle bottom.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
    savedPaint := aGC paint.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   132
    topLeftEdge isNil ifTrue:[
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   133
        self initializeImages
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   134
    ].
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   135
    
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   136
    lw := topLeftEdge width.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   137
    rw := topRightEdge width.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   138
    th := topLeftEdge height.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   139
    bh := bottomLeftEdge height.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   140
    
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   141
    aGC paint:(aGC viewBackground).
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   142
    aGC fillRectangleX:left y:top width:5 height:5.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   143
    aGC fillRectangleX:right-5 y:top width:5 height:5.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   144
    aGC fillRectangleX:right-5 y:bottom-5 width:5 height:5.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   145
    aGC fillRectangleX:left y:bottom-5 width:5 height:5.
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   147
    topLeftEdge displayOn:aGC x:left y:top.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   148
    aGC paint:(Color redByte:104 greenByte:104 blueByte:104).
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   149
    aGC displayLineFromX:left+lw y:top toX:right-rw y:top.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   150
    aGC paint:(Color redByte:186 greenByte:186 blueByte:186).
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   151
    aGC displayLineFromX:left+lw y:top+1 toX:right-rw y:top+1.
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   153
    topRightEdge displayOn:aGC x:(right-rw) y:top.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   154
    aGC paint:(Color redByte:208 greenByte:208 blueByte:208).
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   155
    aGC displayLineFromX:right-3 y:(top+th) toX:right-3 y:(bottom-bh).
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   156
    aGC paint:(Color redByte:147 greenByte:147 blueByte:147).
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   157
    aGC displayLineFromX:right-2 y:(top+th) toX:right-2 y:(bottom-bh).
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   158
    aGC paint:(Color redByte:191 greenByte:191 blueByte:191).
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   159
    aGC displayLineFromX:right-1 y:(top+th) toX:right-1 y:(bottom-bh).
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   160
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   161
    bottomLeftEdge displayOn:aGC x:left y:(bottom-bh).
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
    aGC paint:(Color redByte:148 greenByte:148 blueByte:148).
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   163
    aGC displayLineFromX:left+lw y:bottom-1-2 toX:right-rw y:bottom-1-2.
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
    aGC paint:(Color redByte:56 greenByte:56 blueByte:56).
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   165
    aGC displayLineFromX:left+lw y:bottom-1-1 toX:right-rw y:bottom-1-1.
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
    aGC paint:(Color redByte:186 greenByte:186 blueByte:186).
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   167
    aGC displayLineFromX:left+lw y:bottom-1 toX:right-rw y:bottom-1.
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   169
    bottomRightEdge displayOn:aGC x:(right-rw) y:(bottom-bh).
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
    aGC paint:(Color redByte:186 greenByte:186 blueByte:186).
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   171
    aGC displayLineFromX:left y:(top+th) toX:left y:(bottom-bh).
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
    aGC paint:(Color redByte:121 greenByte:121 blueByte:121).
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   173
    aGC displayLineFromX:left+1 y:(top+th) toX:left+1 y:(bottom-bh).
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
    aGC paint:savedPaint.
6964
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   176
!
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   177
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   178
initializeImages
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   179
    TopLeftEdge isNil ifTrue:[
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   180
        self class initializeImages
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   181
    ].
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   182
    
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   183
    topLeftEdge := TopLeftEdge copy.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   184
    topRightEdge := TopRightEdge copy.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   185
    bottomLeftEdge := BottomLeftEdge copy.
a459b5a03d9c #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
   186
    bottomRightEdge := BottomRightEdge copy.
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
! !
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
!MacButtonBorder methodsFor:'queries'!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
margin
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
    ^ 4
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
! !
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
!MacButtonBorder class methodsFor:'documentation'!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
version
6944
81016c45d31b initial checkin
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   198
    ^ '$Header$'
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
version_CVS
6944
81016c45d31b initial checkin
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   202
    ^ '$Header$'
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
! !
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
MacButtonBorder initialize!