53
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1994 by Claus Gittinger
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
ResourcePack subclass:#ViewStyle
|
|
14 |
instanceVariableNames:'bgColor fgColor borderWidth'
|
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
|
17 |
category:'System-Support'
|
|
18 |
!
|
|
19 |
|
|
20 |
ViewStyle comment:'
|
|
21 |
COPYRIGHT (c) 1994 by Claus Gittinger
|
|
22 |
All Rights Reserved
|
|
23 |
|
|
24 |
$Header: /cvs/stx/stx/libview/ViewStyle.st,v 1.1 1994-08-05 01:15:24 claus Exp $
|
|
25 |
'!
|
|
26 |
|
|
27 |
!ViewStyle class methodsFor:'documentation'!
|
|
28 |
|
|
29 |
copyright
|
|
30 |
"
|
|
31 |
COPYRIGHT (c) 1993 by Claus Gittinger
|
|
32 |
All Rights Reserved
|
|
33 |
|
|
34 |
This software is furnished under a license and may be used
|
|
35 |
only in accordance with the terms of that license and with the
|
|
36 |
inclusion of the above copyright notice. This software may not
|
|
37 |
be provided or otherwise made available to, or used by, any
|
|
38 |
other person. No title to or ownership of the software is
|
|
39 |
hereby transferred.
|
|
40 |
"
|
|
41 |
!
|
|
42 |
|
|
43 |
version
|
|
44 |
"
|
|
45 |
$Header: /cvs/stx/stx/libview/ViewStyle.st,v 1.1 1994-08-05 01:15:24 claus Exp $
|
|
46 |
"
|
|
47 |
!
|
|
48 |
|
|
49 |
documentation
|
|
50 |
"
|
|
51 |
instances of this class keep all view-style specific information.
|
|
52 |
For better performance, they cache some heavily used values in extra
|
|
53 |
instance variables (basically, they are dictionaries).
|
|
54 |
"
|
|
55 |
! !
|
|
56 |
|
|
57 |
!ViewStyle class methodsFor:'instance creation'!
|
|
58 |
|
|
59 |
fromFile:aFileName
|
|
60 |
"get the preferences definitions from a file"
|
|
61 |
|
|
62 |
|prefs|
|
|
63 |
|
|
64 |
prefs := super fromFile:aFileName directory:'styles'.
|
|
65 |
^ prefs
|
|
66 |
|
|
67 |
"ViewStyle fromFile:'motif.style'"
|
|
68 |
"ViewStyle fromFile:'normal.style'"
|
|
69 |
"ViewStyle fromFile:'iris.style'"
|
|
70 |
! !
|
|
71 |
|
|
72 |
!ViewStyle methodsFor:'accessing'!
|
|
73 |
|
|
74 |
backgroundColor
|
|
75 |
bgColor notNil ifTrue:[
|
|
76 |
^ bgColor
|
|
77 |
].
|
|
78 |
^ self at:#backgroundColor ifAbsent:[nil]
|
|
79 |
!
|
|
80 |
|
|
81 |
foregroundColor
|
|
82 |
fgColor notNil ifTrue:[
|
|
83 |
^ fgColor
|
|
84 |
].
|
|
85 |
^ self at:#foregroundColor ifAbsent:[nil]
|
|
86 |
!
|
|
87 |
|
|
88 |
borderWidth
|
|
89 |
borderWidth notNil ifTrue:[
|
|
90 |
^ borderWidth
|
|
91 |
].
|
|
92 |
^ self at:#borderWidth ifAbsent:[nil]
|
|
93 |
!
|
|
94 |
|
|
95 |
doesNotUnderstand:aMessage
|
|
96 |
^ self at:(aMessage selector) ifAbsent:[nil]
|
|
97 |
! !
|
|
98 |
|
|
99 |
|
|
100 |
|