This file is indexed.

/usr/share/doc/python-gtk2-tutorial/html/sec-GTKRcFileFormat.html is in python-gtk2-tutorial 2.4-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>23.2. GTK's rc File Format</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Tutorial"><link rel="up" href="ch-GtkRcFiles.html" title="Chapter 23. GTK's rc Files"><link rel="previous" href="ch-GtkRcFiles.html" title="Chapter 23. GTK's rc Files"><link rel="next" href="sec-ExampleRcFile.html" title="23.3. Example rc file"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">23.2. GTK's rc File Format</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch-GtkRcFiles.html">Prev</a> </td><th width="60%" align="center">Chapter 23. GTK's rc Files</th><td width="20%" align="right"> <a accesskey="n" href="sec-ExampleRcFile.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec-GTKRcFileFormat"></a>23.2. GTK's rc File Format</h2></div></div><div></div></div><p>The format of the GTK+ rc file is illustrated in <a href="sec-ExampleRcFile.html" title="23.3. Example rc file">Section 23.3, &#8220;Example rc file&#8221;</a> below. This is the
<tt class="filename">testgtkrc</tt> file from the GTK+ distribution, but I've
added a few comments and things. You may wish to include this explanation in
your application to allow the user to fine tune his application.</p><p>There are several directives to change the attributes of a
widget.</p><div class="itemizedlist"><ul type="none"><li style="list-style-type: none"><p><i class="parameter"><tt>fg</tt></i> - Sets the foreground color of a
widget.</p></li><li style="list-style-type: none"><p><i class="parameter"><tt>bg</tt></i> - Sets the background color of a
widget.</p></li><li style="list-style-type: none"><p><i class="parameter"><tt>bg_pixmap</tt></i> - Sets the background of a
widget to a tiled pixmap.</p></li><li style="list-style-type: none"><p><i class="parameter"><tt>font</tt></i> - Sets the font to be used with the
given widget.</p></li></ul></div><p>In addition to this, there are several states a widget can be
in, and you can set different colors, pixmaps and fonts for each state.
These states are:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">NORMAL</span></td><td><p>The normal state of a widget, without the mouse over top
of it, and not being pressed, etc.</p></td></tr><tr><td><span class="term">PRELIGHT</span></td><td><p>When the mouse is over top of the widget, colors defined
using this state will be in effect.</p></td></tr><tr><td><span class="term">ACTIVE</span></td><td><p> When the widget is pressed or clicked it will be active,
and the attributes assigned by this tag will be in effect.</p></td></tr><tr><td><span class="term">INSENSITIVE</span></td><td><p>When a widget is set insensitive, and cannot be activated,
it will take these attributes.</p></td></tr><tr><td><span class="term">SELECTED</span></td><td><p>When an object is selected, it takes these
attributes.</p></td></tr></tbody></table><p>When using the "fg" and "bg" keywords to set the colors of
widgets, the format is:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  fg[&lt;STATE&gt;] = { Red, Green, Blue }
</pre></td></tr></table><p>Where <tt class="varname">STATE</tt> is one of the above states
(PRELIGHT, ACTIVE, etc), and the <tt class="varname">Red</tt>,
<tt class="varname">Green</tt> and <tt class="varname">Blue</tt> are values in the range
of 0 - 1.0, { 1.0, 1.0, 1.0 } being white. They must be in float form, or
they will register as 0, so a straight "1" will not work, it must be "1.0".
A straight "0" is fine because it doesn't matter if it's not recognized.
Unrecognized values are set to 0.</p><p><i class="parameter"><tt>bg_pixmap</tt></i> is very similar to the above,
except the colors are replaced by a filename.</p><p><i class="parameter"><tt>pixmap_path</tt></i> is a list of paths separated by
":"'s. These paths will be searched for any pixmap you specify.</p><p>The "font" directive is simply:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  font = "&lt;font name&gt;"
</pre></td></tr></table><p>The only hard part is figuring out the <i class="parameter"><tt>font</tt></i>
string. Using <span><b class="command">xfontsel</b></span> or a similar utility should
help.</p><p>The "widget_class" sets the style of a class of widgets. These
classes are listed in the widget overview in <a href="ch-WidgetOverview.html#sec-WidgetHierarchy" title="5.1. Widget Hierarchy">Section 5.1, &#8220;Widget Hierarchy&#8221;</a>.</p><p>The "widget" directive sets a specifically named set of widgets
to a given style, overriding any style set for the given widget class. These
widgets are registered inside the application using the
<tt class="methodname">set_name</tt>() method. This allows you to specify the
attributes of a widget on a per widget basis, rather than setting the
attributes of an entire widget class. I urge you to document any of these
special widgets so users may customize them.</p><p>When the keyword <i class="parameter"><tt>parent</tt></i> is used as an
attribute, the widget will take on the attributes of its parent in the
application.</p><p>When defining a style, you may assign the attributes of a
previously defined style to this new one.</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  style "main_button" = "button"
  {
    font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"
    bg[PRELIGHT] = { 0.75, 0, 0 }
  }
</pre></td></tr></table><p>This example takes the "button" style, and creates a new
"main_button" style simply by changing the font and prelight background
color of the "button" style.</p><p>Of course, many of these attributes don't apply to all widgets.
It's a simple matter of common sense really. Anything that could apply,
should.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch-GtkRcFiles.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch-GtkRcFiles.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="sec-ExampleRcFile.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 23. GTK's rc Files </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 23.3. Example rc file</td></tr></table></div></body></html>