MacButtonBorder.st
author Claus Gittinger <cg@exept.de>
Sat, 03 Oct 2015 16:07:52 +0200
changeset 6944 81016c45d31b
parent 6732 b909c5f3bd5c
child 6964 a459b5a03d9c
permissions -rw-r--r--
initial checkin class: MacOSXRoundButtonBorder added:10 methods
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
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	instanceVariableNames:''
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
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
     top := StandardSystemView extent:100@100.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
     v := View origin:10@10 corner:90@30 in:top.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
     top openAndWait.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
     b := MacButtonBorder new.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
     v border:b.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
                                                [exEnd]
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
                                                [exBegin]
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
     |top v1 v2 b|
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
     top := StandardSystemView extent:100@200.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
     v1 := View origin:10@10 corner:90@30 in:top.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
     v2 := View origin:10@100 corner:90@150 in:top.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
     top openAndWait.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
     b := MacButtonBorder new.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
     v1 border:b.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
     v2 border:b.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
                                                [exEnd]
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
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
!MacButtonBorder class methodsFor:'initialization'!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
initialize
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
    TopLeftEdge := self topLeftImage2.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
    TopRightEdge := self topRightImage2.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
    BottomLeftEdge := self bottomLeftImage2.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
    BottomRightEdge := self bottomRightImage2.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
! !
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
!MacButtonBorder class methodsFor:'image specs'!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
bottomLeftImage
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
    "This resource specification was automatically generated
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
     by the ImageEditor of ST/X."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
    "Do not manually edit this!! If it is corrupted,
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
     the ImageEditor may not be able to read the specification."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
     self bottomLeftImage inspect
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
     ImageEditor openOnClass:self andSelector:#bottomLeftImage
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
     Icon flushCachedIcons
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
    <resource: #image>
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
    ^Icon
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
        constantNamed:'MacButtonBorder bottomLeftImage'
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
        ifAbsentPut:[(Depth8Image new) width:4; height:4; bits:(ByteArray fromPackedString:'BP A@P@F@PD@APXH@@@DA0@a') ; colorMapFromArray:#[184 184 184 255 255 255 226 226 226 224 224 224 181 181 181 162 162 162 211 211 211 158 158 158 248 248 248 159 159 159]; mask:((Depth1Image new) width:4; height:4; bits:(ByteArray fromPackedString:'<OA0L@@a') ; yourself); yourself]
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
bottomLeftImage2
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
    "This resource specification was automatically generated
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
     by the ImageEditor of ST/X."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
    "Do not manually edit this!! If it is corrupted,
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
     the ImageEditor may not be able to read the specification."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
     self bottomLeftImage2 inspect
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
     ImageEditor openOnClass:self andSelector:#bottomLeftImage2
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
     Icon flushCachedIcons
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
    <resource: #image>
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
    ^Icon
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
        constantNamed:'MacButtonBorder bottomLeftImage2'
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
        ifAbsentPut:[(Depth8Image new) width:9; height:10; bits:(ByteArray fromPackedString:'E@4VHRD!!HRD!!E0XUHRD!!HRD!!GP0QG"D!!HRD!!H!!@EGBD!!HRD!!IQ,IB!!<!!HRD!!HRLSAP,$HRD!!HRD D@PBFRD!!HRD%HAHH@@LNHRD!!HRHXC0\AHRD!!HRD%HA(T
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
') ; colorMapFromArray:#[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 new) width:9; height:10; bits:(ByteArray fromPackedString:'8G? _?A?<G?8_71?O''<??0??A?<b') ; yourself); yourself]
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
bottomRightImage
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
    "This resource specification was automatically generated
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
     by the ImageEditor of ST/X."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
    "Do not manually edit this!! If it is corrupted,
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
     the ImageEditor may not be able to read the specification."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
     self bottomRightImage inspect
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
     ImageEditor openOnClass:self andSelector:#bottomRightImage
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
     Icon flushCachedIcons
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
    <resource: #image>
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
    ^Icon
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
        constantNamed:'MacButtonBorder bottomRightImage'
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
        ifAbsentPut:[(Depth8Image new) width:4; height:4; bits:(ByteArray fromPackedString:'@PDHBPDAA @HA T@A0P@@@@a') ; colorMapFromArray:#[184 184 184 255 255 255 226 226 226 224 224 224 181 181 181 162 162 162 211 211 211 158 158 158 248 248 248 159 159 159]; mask:((Depth1Image new) width:4; height:4; bits:(ByteArray fromPackedString:'<OC 0@@a') ; yourself); yourself]
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
bottomRightImage2
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
    "This resource specification was automatically generated
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
     by the ImageEditor of ST/X."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
    "Do not manually edit this!! If it is corrupted,
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
     the ImageEditor may not be able to read the specification."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
     self bottomRightImage2 inspect
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
     ImageEditor openOnClass:self andSelector:#bottomRightImage2
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
     Icon flushCachedIcons
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
    <resource: #image>
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
    ^Icon
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
        constantNamed:'MacButtonBorder bottomRightImage2'
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
        ifAbsentPut:[(Depth8Image new) width:9; height:10; bits:(ByteArray fromPackedString:'CP4MCP4 F@4TCP4MCP4!!EP\VCP4MCP4]DP,[CP4MCP4\A!!@!!CP4MCR@KB!!(#CP4MI@0ED2HMCP4Y@ PPG04MC L@BQH^CP4M@P OE2DMCP4MEA$^H04MCP4M
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
') ; colorMapFromArray:#[45 45 45 56 56 56 68 68 68 70 70 70 72 72 72 76 76 76 78 78 78 89 89 89 92 92 92 93 93 93 103 103 103 112 112 112 115 115 115 122 122 122 148 148 148 150 150 150 165 165 165 175 175 175 176 176 176 181 181 181 186 186 186 196 196 196 198 198 198 199 199 199 200 200 200 204 204 204 206 206 206 212 212 212 214 214 214 220 220 220 224 224 224 226 226 226 228 228 228 229 229 229 231 231 231 235 235 235 237 237 237]; mask:((ImageMask new) width:9; height:10; bits:(ByteArray fromPackedString:'A?<G?0_?A?<O?1=?O''?<_?!!?<G<b') ; yourself); yourself]
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
topLeftImage
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
    "This resource specification was automatically generated
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
     by the ImageEditor of ST/X."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
    "Do not manually edit this!! If it is corrupted,
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
     the ImageEditor may not be able to read the specification."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
     self topLeftImage inspect
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
     ImageEditor openOnClass:self andSelector:#topLeftImage
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
     Icon flushCachedIcons
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
    <resource: #image>
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
    ^Icon
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
        constantNamed:'MacButtonBorder topLeftImage'
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
        ifAbsentPut:[(Depth8Image new) width:4; height:4; bits:(ByteArray fromPackedString:'@@@DA0@EA  @A DABP A@P@a') ; colorMapFromArray:#[184 184 184 255 255 255 226 226 226 224 224 224 181 181 181 162 162 162 211 211 211 158 158 158 248 248 248 159 159 159]; mask:((Depth1Image new) width:4; height:4; bits:(ByteArray fromPackedString:'LGC0<@@a') ; yourself); yourself]
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
topLeftImage2
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
    "This resource specification was automatically generated
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
     by the ImageEditor of ST/X."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
    "Do not manually edit this!! If it is corrupted,
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
     the ImageEditor may not be able to read the specification."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
     self topLeftImage2 inspect
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
     ImageEditor openOnClass:self andSelector:#topLeftImage2
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
     Icon flushCachedIcons
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
    <resource: #image>
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
    ^Icon
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
        constantNamed:'MacButtonBorder topLeftImage2'
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
        ifAbsentPut:[(Depth8Image new) width:9; height:10; bits:(ByteArray fromPackedString:'GQ4]GQ4]GP<BGQ4]GQ4P@@(SGQ4]GPXCGA4]GQ4]B@\^GQ4]GQ4NAQX]GQ4]GQ(AD!!,]GQ4]GP4KFA4]GQ4]G@PQGQ4]GQ4]E0$UGQ4]GQ4]E@0YGQ4]GQ4]
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
') ; colorMapFromArray:#[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 new) width:9; height:10; bits:(ByteArray fromPackedString:'@_<G?09?GG<8_7!!?\G? _>A?8G<b') ; yourself); yourself]
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
topRightImage
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
    "This resource specification was automatically generated
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
     by the ImageEditor of ST/X."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
    "Do not manually edit this!! If it is corrupted,
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
     the ImageEditor may not be able to read the specification."
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
     self topRightImage inspect
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
     ImageEditor openOnClass:self andSelector:#topRightImage
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
     Icon flushCachedIcons
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
    <resource: #image>
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
    ^Icon
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
        constantNamed:'MacButtonBorder topRightImage'
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
        ifAbsentPut:[(Depth8Image new) width:4; height:4; bits:(ByteArray fromPackedString:'A0P@@@ FAP@A@PX@@PDHBP@a') ; colorMapFromArray:#[184 184 184 255 255 255 226 226 226 224 224 224 181 181 181 162 162 162 211 211 211 158 158 158 248 248 248 159 159 159]; mask:((Depth1Image new) width:4; height:4; bits:(ByteArray fromPackedString:'0NC0<@@a') ; yourself); yourself]
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
topRightImage2
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
    "This resource specification was automatically generated
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
     by the ImageEditor of ST/X."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
    "Do not manually edit this!! If it is corrupted,
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
     the ImageEditor may not be able to read the specification."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
     self topRightImage2 inspect
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
     ImageEditor openOnClass:self andSelector:#topRightImage2
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
     Icon flushCachedIcons
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
    "
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
    <resource: #image>
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
    ^Icon
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
        constantNamed:'MacButtonBorder topRightImage2'
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
        ifAbsentPut:[(Depth8Image new) width:9; height:10; bits:(ByteArray fromPackedString:'B!!\@@@@@@@@@IPD[I @@@@@@@@@1B!!L@@@@@@@@@KPTI@@@@@@@@@@XI@@@@@@@@@@0QJBL@@@@@@@@HF"8@@@@@@@@@L08@@@@@@@@@IB$O@@@@@@@@GQ<%
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
') ; colorMapFromArray:#[153 153 153 127 127 127 227 227 227 254 254 254 242 243 242 115 115 115 202 202 202 229 229 229 205 205 205 119 119 119 106 106 106 237 237 237 215 215 215 220 220 220 114 114 114 203 203 203 241 241 241 177 177 177 233 233 233 116 116 116 236 236 236 212 212 212 250 250 250 155 155 155 246 246 246 231 231 231 145 145 145 90 90 90 221 221 221 208 208 208 224 224 224 147 147 147 216 216 216 243 243 243 230 230 230 217 217 217 195 195 195 191 191 191 156 156 156 245 245 245 108 108 108 126 126 126 235 235 235 240 240 240 247 247 247 223 223 223 148 148 148 228 228 228 226 225 225 222 222 222 249 249 249 174 174 174]; mask:((ImageMask new) width:9; height:10; bits:(ByteArray fromPackedString:'0G?0_3!!?GG<N_0=?A7<C_0O?@?<b') ; yourself); yourself]
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
! !
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
!MacButtonBorder methodsFor:'displaying'!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
displayOn:aGC forDisplayBox:aRectangle
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
    "display the borders represented by the receiver in the specified rectangle.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
     The gc is restored after the draw."
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
    |left right top bottom savedPaint|
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
    left := aRectangle left.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
    right := aRectangle right.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
    top := aRectangle top.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
    bottom := aRectangle bottom.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
    savedPaint := aGC paint.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
    TopLeftEdge displayOn:aGC x:left y:top.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
    aGC paint:(Color redByte:104 greenByte:104 blueByte:104).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
    aGC displayLineFromX:left+(TopLeftEdge width) y:top toX:right-(TopRightEdge width) y:top.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
    aGC paint:(Color redByte:186 greenByte:186 blueByte:186).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
    aGC displayLineFromX:left+(TopLeftEdge width) y:top+1 toX:right-(TopRightEdge width) y:top+1.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
    TopRightEdge displayOn:aGC x:(right-TopRightEdge width) y:top.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
    aGC paint:(Color redByte:208 greenByte:208 blueByte:208).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
    aGC displayLineFromX:right-3 y:(top+TopRightEdge height) toX:right-3 y:(bottom-BottomRightEdge height).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
    aGC paint:(Color redByte:147 greenByte:147 blueByte:147).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
    aGC displayLineFromX:right-2 y:(top+TopRightEdge height) toX:right-2 y:(bottom-BottomRightEdge height).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
    aGC paint:(Color redByte:191 greenByte:191 blueByte:191).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
    aGC displayLineFromX:right-1 y:(top+TopRightEdge height) toX:right-1 y:(bottom-BottomRightEdge height).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
    BottomLeftEdge displayOn:aGC x:left y:(bottom-BottomLeftEdge height).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
    aGC paint:(Color redByte:148 greenByte:148 blueByte:148).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
    aGC displayLineFromX:left+(BottomLeftEdge width) y:bottom-1-2 toX:right-(BottomRightEdge width) y:bottom-1-2.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
    aGC paint:(Color redByte:56 greenByte:56 blueByte:56).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
    aGC displayLineFromX:left+(BottomLeftEdge width) y:bottom-1-1 toX:right-(BottomRightEdge width) y:bottom-1-1.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
    aGC paint:(Color redByte:186 greenByte:186 blueByte:186).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
    aGC displayLineFromX:left+(BottomLeftEdge width) y:bottom-1 toX:right-(BottomRightEdge width) y:bottom-1.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
    BottomRightEdge displayOn:aGC x:(right-BottomRightEdge width) y:(bottom-BottomRightEdge height).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
    aGC paint:(Color redByte:186 greenByte:186 blueByte:186).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   267
    aGC displayLineFromX:left y:(top+TopLeftEdge height) toX:left y:(bottom-BottomLeftEdge height).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   268
    aGC paint:(Color redByte:121 greenByte:121 blueByte:121).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   269
    aGC displayLineFromX:left+1 y:(top+TopLeftEdge height) toX:left+1 y:(bottom-BottomLeftEdge height).
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
    aGC paint:savedPaint.
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
! !
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
!MacButtonBorder methodsFor:'queries'!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
margin
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
    ^ 4
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
! !
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
!MacButtonBorder class methodsFor:'documentation'!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
version
6944
81016c45d31b initial checkin
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   283
    ^ '$Header$'
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
!
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   286
version_CVS
6944
81016c45d31b initial checkin
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
   287
    ^ '$Header$'
6732
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
! !
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   289
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   290
b909c5f3bd5c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
MacButtonBorder initialize!