5651
|
1 |
Most of the stuff here is obsolete.
|
204
|
2 |
|
|
3 |
|
|
4 |
This directory contains various style sheets which are read
|
|
5 |
and used when the view style is changed (via View>>defaultStyle:).
|
2567
|
6 |
An initial style default is set up by the display.rc and corresponding
|
|
7 |
d_xxx.rc files (found in the projects/smalltalk directory).
|
|
8 |
However, at any later time, the preferred style can be changed either
|
|
9 |
by evaluating (View defaultStyle:#styleName) or via the launchers
|
|
10 |
settings menu.
|
|
11 |
If the settings are saved, the style will be reinstalled whenever
|
|
12 |
ST/X is restarted later.
|
204
|
13 |
|
|
14 |
Look into generic.style, to see which parameters can be changed
|
|
15 |
and how they are named.
|
|
16 |
|
|
17 |
There are still some places in the system, where style information is
|
|
18 |
programmed into (instead of controlled via the StyleSheet) - but these
|
2306
|
19 |
will be removed over time (these are historical leftovers).
|
204
|
20 |
So be prepared, that some things are not fully working.
|
|
21 |
|
2306
|
22 |
Do not modify the original style files - but instead create your own.
|
204
|
23 |
Styles are read using the same path mechanism as all other file accesses,
|
|
24 |
so you can put your private style-files into your private directories,
|
|
25 |
even in case a public file exists with the same name.
|
|
26 |
|
|
27 |
You can inherit other styles via a #include - see 'motifXXX.style' as
|
|
28 |
an example.
|
|
29 |
|
|
30 |
To get your new style, perform the following steps:
|
|
31 |
|
|
32 |
1. create a styleSheet, say 'foo.style'
|
|
33 |
(take any existing to start with and see 'generic.style'
|
|
34 |
for more comments)
|
|
35 |
|
7108
|
36 |
2. make sure its accessible under any 'resources' directory
|
204
|
37 |
of your systemPath.
|
|
38 |
(for the development environment, there is a rule 'make styles'
|
|
39 |
in the 'projects/smalltalk/Makefile', which symlinks all styles
|
|
40 |
to the local directory).
|
|
41 |
|
|
42 |
3. check it by evaluating: 'View defaultStyle:#foo' in
|
309
|
43 |
a workspace (or change the style setting in the Launcher)
|
5651
|
44 |
. Try some NEW views
|
204
|
45 |
(the new style will affect only new views).
|
|
46 |
|
|
47 |
Notice, that the styleSheet is only re-read if the style
|
|
48 |
has changed (the contents is cached to avoid reading the style
|
5651
|
49 |
files over and over again). Thus, to get an updated styleSheet to be
|
204
|
50 |
used, either switch temporary to another style and back, or
|
5651
|
51 |
use 'View updateAllStyleCaches' to force rereading of the current
|
204
|
52 |
style.
|
|
53 |
|
|
54 |
4. if your style is ok and you want it to become your default at startup,
|
|
55 |
add the above line (View defaultStyle:#foo) to your 'private.rc' file.
|
|
56 |
It will then be automatically installed at startup time.
|
|
57 |
|
|
58 |
|
|
59 |
A note on the existing styles:
|
|
60 |
|
309
|
61 |
Most are included as demo and to give you a starting point.
|
2306
|
62 |
Many are not really usable for ergonomic reasons.
|
204
|
63 |
You may want to try your own, by combining features from different styles.
|
309
|
64 |
For example, if you think the #st80-style may look good combined with green-background
|
204
|
65 |
text-selection hilighting; go ahead and create your own.
|
|
66 |
|
309
|
67 |
Disclaimer:
|
5651
|
68 |
It is neither intended, nor do I claim, that these styleSheets mimic the
|
204
|
69 |
originals exactly, they are included for fun and to make your ST/X views
|
|
70 |
integrate better into whatever your environment may look like.
|
309
|
71 |
|
204
|
72 |
You may improve them and send me back your updated files ....
|
|
73 |
... that way, the next release will have more and/ore better styleSheets.
|
|
74 |
|
|
75 |
|
|
76 |
No, I do not intent to extent this mechanism the Xt way, where every
|
|
77 |
individual component can be specified ... (actually, I do not like it).
|
|
78 |
It could be easily done, by reading the Xresource files (a naming hierarchy
|
|
79 |
is already present in the views). But it either tends to make
|
|
80 |
your display look very ugly and colorful, or it is not used by serious
|
|
81 |
users. So what ?
|
|
82 |
|
|
83 |
Most users prefer simple (unspectacular) styles; the most attractive being
|
309
|
84 |
the iris, motif, os2 and normal (for monochrome displays) styles.
|
204
|
85 |
|
|
86 |
TODO:
|
|
87 |
The new ViewStyle supports entries of the form:
|
|
88 |
className.styleVariable ...
|
|
89 |
which makes the whole style definition easier to understand,
|
|
90 |
and allows the style-code to be simplified.
|
|
91 |
The style sheets will be changed till the next version to reflect
|
|
92 |
this. Be prepared for this.
|