diff -up man/xresources.texi.\~2\~ man/xresources.texi --- man/xresources.texi.~2~ 2003-01-10 11:19:42.000000000 +0900 +++ man/xresources.texi 2003-01-10 12:24:24.000000000 +0900 @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. address@hidden Copyright (C) 1987,93,94,95,1997,2001 Free Software Foundation, Inc. address@hidden Copyright (C) 1987,93,94,95,1997,2001,03 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node X Resources, Antinews, Command Arguments, Top @appendix X Options and Resources @@ -533,13 +533,13 @@ The color for the border shadow, on the If the Emacs installed at your site was built to use the GTK widget set, then the menu bar, scroll bar and the dialogs can be customized with the standard GTK @file{~/.gtkrc-2.0} file or with the Emacs specific address@hidden/.emacs.d/gtkrc} file. Note that this is only for address@hidden/.emacs.d/gtkrc} file; note that these files are only for customizing specific GTK widget features. To customize Emacs font, background, faces etc., use the normal X resources, see @ref{Resources}. -In these files one first defines a style and then apply that style -to widget paths. Here is an example of how to change the font for -Emacs menus: +In these files one first defines a style and then how to apply that style +to widget paths (@pxref{GTK widget paths}). Here is an example of how to +change the font for Emacs menus: @smallexample # This is a comment. @@ -552,13 +552,15 @@ widget "*emacs-menuitem*" style "menufon @end smallexample - There are some items you can set without using any style or widget path, -that affects GTK as a whole. Most of these are poorly documented but -can be found as properties in the documentation for @code{GtkSetting} in the -GTK document references below. -One property of interest is gtk-font-name which sets -a default font. You have to use Pango font names, see @ref{GTK styles}. -A @file{~/.gtkrc-2.0} file that just sets a default font looks like this: + There are some things you can set without using any style or widget path, +which affect GTK as a whole. Most of these are poorly documented, but can +be found in the `Properties' section of the documentation page for address@hidden, in the GTK document references below. + +One property of interest is @code{gtk-font-name} which sets the default +font for GTK; you must use Pango font names (@pxref{GTK styles}). A address@hidden/.gtkrc-2.0} file that just sets a default font looks like this: + @smallexample gtk-font-name = "courier 12" @end smallexample @@ -567,11 +569,11 @@ gtk-font-name = "courier 12" The syntax for GTK resource files is fully described in the GTK API reference manual. You may have this on your site as: address@hidden/share/gtk-doc/html/gtk/gtk-resource-files.html}, address@hidden@var{prefix}/share/gtk-doc/html/gtk/gtk-resource-files.html}, @noindent -where ``prefix'' is where GTK is installed, usually @file{/usr}. -You can find this online at +where @var{prefix} is the prefix under which GTK is installed, usually address@hidden/usr} or @file{/usr/local}. You can find the same document online at: @uref{http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html}. @@ -588,37 +590,41 @@ You can find this online at @cindex GTK widget names @cindex GTK widget classes -Widgets can be specified by widget class or by -widget name. Widgets have pathnames made from how they are contained. -For example, if a @code{GtkWindow} contains a @code{GtkVBox} which in turn -contains a @code{GtkMenuBar}, the class path would then be: +Widgets can be specified by widget class or by widget name. Widget paths +are sequences of widget names or classes, corresponding to hierarchies of +widgets embedded within other widgets. For example, if a @code{GtkWindow} +contains a @code{GtkVBox} which in turn contains a @code{GtkMenuBar}, the +widget class path would then be: + @smallexample GtkWindow.GtkVBox.GtkMenuBar @end smallexample @noindent -If the widgets are named ``top'', ``box'' and ``menubar'', the widget -path then becomes: +If the widgets are named ``top'', ``box'' and ``menubar'', the widget name +path would be: + @smallexample top.box.menubar @end smallexample - When assigning a style to a path, one can use the class path, -the widget path, or a mixture of both. The key word address@hidden matches only against the class path. The key word address@hidden matches first against the name and secondly against the -class. - - Matching is done with shell ``glob'' syntax, that is * -matches zero or more characters, ? matches one character. So -this assigns @code{base_style} to all widgets: + When assigning a style to a path, one can use the class path, the widget +path, or a mixture of both. There are two commands: @code{widget_class} +will assign a style to a widget path, matching only against the class path, +whereas the @code{widget} command will match first against the name and +secondly against the class. + + Matching of widget paths uses shell ``glob'' syntax, that is @code{*} +matches zero or more characters and @code{?} matches one character. So the +following would assign @code{base_style} to all widgets: @smallexample widget "*" style "base_style" @end smallexample Given the class path @code{GtkWindow.GtkVBox.GtkMenuBar} and the widget -path @code{top.box.menubar}, these all assign @code{my_style} to the menu bar: +path @code{top.box.menubar}, the following all assign @code{my_style} to +the menu bar: @smallexample widget_class "GtkWindow.GtkVBox.GtkMenuBar" style "my_style" @@ -653,7 +659,7 @@ widget_class "GtkWindow.GtkVBox.GtkMenuB @end smallexample @noindent -And for the scroll bar, the full path is: +For the scroll bar, the full path is: @smallexample widget_class @@ -661,28 +667,30 @@ widget_class style "my_style" @end smallexample - The names for the widgets are: address@hidden +The names for the emacs widgets, and their classes, are: address@hidden address@hidden and some} address@hidden plus}} address@hidden @code{GtkFileSelection} address@hidden @code{emacs-filedialog} address@hidden @code{GtkDialog} address@hidden @code{emacs-dialog} address@hidden @code{GtkWindow} address@hidden @code{Emacs} address@hidden @code{GtkVHbox} address@hidden @code{pane} address@hidden @code{GtkFixed} address@hidden @code{emacs} address@hidden @code{GtkMenuBar} address@hidden @code{menubar} address@hidden @code{GtkVScrollbar} address@hidden @code{verticalScrollbar} address@hidden anything in menus address@hidden @code{emacs-menuitem} address@hidden address@hidden plus}} address@hidden and some} address@hidden @code{emacs-filedialog} address@hidden @code{GtkFileSelection} address@hidden @code{emacs-dialog} address@hidden @code{GtkDialog} address@hidden @code{Emacs} address@hidden @code{GtkWindow} address@hidden @code{pane} address@hidden @code{GtkVHbox} address@hidden @code{emacs} address@hidden @code{GtkFixed} address@hidden @code{menubar} address@hidden @code{GtkMenuBar} address@hidden @code{verticalScrollbar} address@hidden @code{GtkVScrollbar} address@hidden @code{emacs-menuitem} address@hidden anything in menus @end multitable - Thus, for Emacs you can write the two examples above as: address@hidden +Thus, for Emacs you can write the two examples above as: @smallexample widget "Emacs.pane.menubar" style "my_style" @@ -691,7 +699,7 @@ widget "Emacs.pane.emacs.verticalScrollb GTK absolute paths are quite strange when it comes to menus and dialogs. The paths do not start with Emacs as they are free standing -windows and not contained in the GTK sense by the Emacs GtkWindow. +windows and not contained (in the GTK sense) by the Emacs GtkWindow. To customize the dialogs and menus, use wildcards like this: @smallexample @@ -714,34 +722,35 @@ widget "*Menu*" style "my_menu_style" @node GTK styles, , GTK names in Emacs, GTK resources @appendixsec GTK styles address@hidden GTK style address@hidden GTK styles This is mostly taken from the GTK reference documentation. Within a style declaration, the possible elements are: @table @code address@hidden bg[state] = color address@hidden address@hidden = @var{color} Sets the color used for the background of most widgets. The widget where -you edit text in Emacs ignores this. Use X resources (i.e. address@hidden: color}) for this, see @ref{Resources}. The values -for @code{state} are enumerated below. +you edit text in Emacs ignores this; for it, use X resources (i.e. address@hidden: color}; @ref{Resources})), or emacs faces +(@pxref{Faces}). The possible values for @var{state} are enumerated below. address@hidden fg[state] = color address@hidden address@hidden = @var{color} Sets the color used for the foreground of most widgets. The widget where -you edit text in Emacs ignores this. Use X resources (i.e. address@hidden: color}) for this, see @ref{Resources}. +you edit text in Emacs ignores this; for it, use X resources (i.e. address@hidden: @var{color}}; @ref{Resources})), or emacs faces +(@pxref{Faces}). address@hidden base[state] = color address@hidden address@hidden = @var{color} Sets the color used for the background of widgets displaying editable text. In Emacs, this color is used for the background of the text fields in the file dialog. address@hidden text[state] = color address@hidden address@hidden = @var{color} Sets the color used for foreground of widgets using base for the background color. In Emacs, this color is used for the text color in fields in the file dialog. address@hidden bg_pixmap[state] = pixmap address@hidden address@hidden = @var{pixmap} Sets a background pixmap to be used in place of the background color. The special value @code{} may be used to indicate that the widget should use the same background @@ -754,8 +763,8 @@ in @file{~/.emacs.d/gtkrc}, the pixmap i @file{~/.emacs.d}. It does not seem possible to refer to a file by its absolute path name. address@hidden font_name = font -Sets the font for a widget. The font must be a Pango font name, address@hidden font_name = @var{font} +Sets the font for a widget to @var{font}, which must be a Pango font name, for example ``Sans Italic 10'', ``Helvetica Bold 12'', ``Courier 14'', ``Times 18''. See below for exact syntax. The names are case insensitive. @end table @@ -793,66 +802,43 @@ or @code{#rgb}, where r, g and b are hex as a triplet @address@hidden r, g, b @}}, where r, g and b are either integers in the range 0-65535 or floats in the range 0.0-1.0. - Pang font names have the form ``FAMILY-LIST STYLE-OPTIONS SIZE''. + Pango font names have the form address@hidden @var{style-options} address@hidden''. @noindent -FAMILY-LIST is a comma separated list of families optionally terminated -by a comma. This way you can specify several families and the first -one found will be used. The FAMILY corresponds to the second part in address@hidden is a comma separated list of font families optionally +terminated by a comma. This way you can specify several families and the +first one found will be used. @var{family} corresponds to the second part in an X font name, for example in -``-adobe-times-medium-r-normal--12-120-75-75-p-64-iso10646-1'' -the family name is ``times''. +``-adobe-times-medium-r-normal--12-120-75-75-p-64-iso10646-1'' the family +name is ``times''. @noindent -STYLE-OPTIONS is a whitespace separated list of words where each word -describes one of style, variant, weight, or stretch. -The @code{normal} values below does not need to be specified in a Pango -font name, they are the default. - address@hidden is a whitespace separated list of words where each word +is a style, variant, weight, or stretch. The default value for all of +these is @code{normal}. @noindent -Style corresponds to the fourth part of an X font name. In X font names -it is the character ``r'', ``i'' or ``o''. In Pango font names -it is one of address@hidden @bullet address@hidden @code{normal} address@hidden @code{italic} address@hidden @code{oblique} address@hidden itemize +A `style' corresponds to the fourth part of an X font name. In X font +names it is the character ``r'', ``i'' or ``o''; in Pango font names the +corresponding values are @code{normal}, @code{italic}, or @code{oblique}. @noindent -Variant is either @code{normal} or @code{small-caps}. +a `variant' is either @code{normal} or @code{small-caps}. Small caps is a font with the lower case characters replaced by smaller variants of the capital characters. @noindent Weight describes the ``boldness'' of a font. It corresponds to the third -part of an X font name. It is one of address@hidden @bullet address@hidden @code{ultra-light} address@hidden @code{light} address@hidden @code{normal} address@hidden @code{bold} address@hidden @code{ultra-bold} address@hidden @code{heavy} address@hidden itemize - address@hidden -Stretch gives the width of the font relative to other designs within a -family. It corresponds to the fifth part of an X font name. -It is one of address@hidden @bullet address@hidden @code{ultra-condensed} address@hidden @code{extra-condensed} address@hidden @code{condensed} address@hidden @code{semi-condensed} address@hidden @code{normal} address@hidden @code{semi-expanded} address@hidden @code{expanded} address@hidden @code{extra-expanded} address@hidden @code{ultra-expanded} address@hidden itemize +part of an X font name. It is one of @code{ultra-light}, @code{light}, address@hidden, @code{bold}, @code{ultra-bold}, or @code{heavy}. @noindent -SIZE is a decimal number that describes the font size in points. +Stretch gives the width of the font relative to other designs within a +family. It corresponds to the fifth part of an X font name. It is one of address@hidden, @code{extra-condensed}, @code{condensed}, address@hidden, @code{normal}, @code{semi-expanded}, address@hidden, @code{extra-expanded}, or @code{ultra-expanded}. address@hidden address@hidden is a decimal number that describes the font size in points.