File: Changing-faces.html

package info (click to toggle)
ecb 2.32-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, squeeze
  • size: 5,236 kB
  • ctags: 1,790
  • sloc: lisp: 24,391; makefile: 143; sh: 57
file content (92 lines) | stat: -rw-r--r-- 3,851 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<html lang="en">
<head>
<title>ECB - the Emacs Code Browser</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name=description content="ECB - the Emacs Code Browser">
<meta name=generator content="makeinfo 4.2">
<link href="http://www.gnu.org/software/texinfo/" rel=generator-home>
</head>
<body>
<p>
Node:<a name="Changing%20faces">Changing faces</a>,
Next:<a rel=next accesskey=n href="Small-screens.html#Small%20screens">Small screens</a>,
Previous:<a rel=previous accesskey=p href="Tips-and-tricks.html#Tips%20and%20tricks">Tips and tricks</a>,
Up:<a rel=up accesskey=u href="Tips-and-tricks.html#Tips%20and%20tricks">Tips and tricks</a>
<hr><br>

<h3>Changing faces in the ECB tree-buffers</h3>

<p>There are two basic faces:

<ul>
<li><code>ecb-default-general-face</code>:
Basic face for displaying an ECB-tree-buffer.

<p>Its recommended to define the font-family, the font-size, the basic
color etc. with this face.

<p>In GNU Emacs 21.X all faces (even the face
<code>ecb-default-highlight-face</code>) used in the ECB tree-buffers
inherit from this face. Therefore the default attributes like font
etc. of a face used in a tree-buffer can be very easily changed with
face <code>ecb-default-general-face</code>.

<p>With XEmacs there is no inheritance-feature but the options
<code>ecb-directories-general-face</code>, <code>ecb-sources-general-face</code>,
<code>ecb-methods-general-face</code> and <code>ecb-history-general-face</code>
offer the choice to use the face <code>ecb-default-general-face</code> so
also with XEmacs the basic face-settings can be easily changed just by
customizing the face <code>ecb-default-general-face</code>.

</p><li><code>ecb-default-highlight-face</code>:
Basic face for highlighting the current node in an ECB-tree-buffer.

<p>In GNU Emacs 21.X all highlighting faces used in the ECB tree-buffers
inherit from this face. Therefore the default attributes like font
etc. of a highlighting face used in a tree-buffer can be very easily
changed with face <code>ecb-default-highlight-face</code>.

<p>With XEmacs there is no inheritance-feature but the options
<code>ecb-directory-face</code>, <code>ecb-source-face</code>,
<code>ecb-method-face</code> and <code>ecb-history-face</code> offer the choice to
use the face <code>ecb-default-highlight-face</code> so also with XEmacs the
basic face-settings can be easily changed just by customizing the face
<code>ecb-default-highlight-face</code>.

</ul>

<p>With these faces you can change the basic attributes easily and fast
for ALL ECB-tree-buffers. But you are also able to display each
ECB-tree-buffer with different faces, see the different options for
every tree-buffer mentioned above.

<p><strong>Please note</strong> (only for XEmacs users): Cause of the lack of the
font-inheritance feature using ONE other font for the ECB-methods
buffer can NOT be achieved just by setting
<code>ecb-methods-general-face</code> to <code>ecb-default-general-face</code> and
changing the font of this default face. In addition you have to set
the same font also for the face <code>ecb-bucket-node-face</code> like in
the following example:

<br><pre>(defconst my-ecb-font
          "-outline-Courier-normal-normal-13-97-96-96-c-*-iso8859-1")
(set-face-font 'ecb-default-general-face my-ecb-font)
(set-face-font 'ecb-bucket-node-face my-ecb-font)
</pre>

<p>This code sets the new defined font <code>my-ecb-font</code> as font for
all<a rel=footnote href="#fn-1"><sup>1</sup></a> ECB-tree-buffers (incl. the methods
buffer).

<hr><h4>Footnotes</h4>
<ol type="1">
<li><a name="fn-1"></a>
<p>Of course <code>ecb-directories-general-face</code>,
<code>ecb-sources-general-face</code>, <code>ecb-methods-general-face</code> and
<code>ecb-history-general-face</code> must be set to
<code>ecb-default-general-face</code>!</p>

</ol><hr>

</body></html>