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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445
|
<HTML>
<HEAD>
<!-- Created with AOLpress/2.0 -->
<!-- AP: Created on: 21-Jan-2001 -->
<!-- AP: Last modified: 11-Mar-2002 -->
<TITLE>X Resources</TITLE>
</HEAD>
<BODY>
<H1 ALIGN=Center>
X Resources
</H1>
<P>
Every X application has an inordinate number of resources that you can tweak.
This one is no exception. However I don't follow standard conventions, so
it's all different. Sorry (a little anyway).
<P>
To use an X resource add a series of lines to your .Xdefaults file and then
run "$ xrdb ~/.Xdefaults". For example:
<BLOCKQUOTE>
<PRE>Gdraw.ScreenWidthInches: 14.7
Gdraw.GGadget.Popup.Font: 10pt helvetica
Gdraw.Background: white
pfaedit.FontView.FontFamily: Helvetica, GillSans
</PRE>
</BLOCKQUOTE>
<P>
If a resource begins with "<CODE>Gdraw.</CODE>" or "<CODE>pfaedit.</CODE>"
then the program will look at it.
<DL>
<DT>
<CODE>pfaedit.FontView.FontFamily</CODE>
<DD>
A list of font family names to be used in the font view to display an example
character over each user character.
<DT>
<CODE>Gdraw.ScreenWidthCentimeters</CODE>
<DD>
A double. (centimeters)<BR>
X usually does not know the physical width of a screen (it knows the logical,
pixel width). Gdraw's internals are based on points rather than pixels, and
it will sometimes pick a font that is too small or too large if it relies
on X's idea of how wide the screen is.
<DT>
<CODE>Gdraw.ScreenWidthInches</CODE>
<DD>
A double. (inches)<BR>
Same as the above, except measured in inches.
<DT>
<CODE>Gdraw.ScreenWidthPixels</CODE>
<DD>
An integer (pixels)<BR>
When X creates a virtual screen it may not be possible for Gdraw to find
the actual number of pixels on the screen. This again will throw off point
calculations.
<DT>
<CODE>Gdraw.ScreenHeightPixels</CODE>
<DD>
An integer (pixels)<BR>
When X creates a virtual screen it may not be possible for Gdraw to find
the actual number of pixels on the screen. This is not used in point
calculations.
<DT>
<CODE>Gdraw.Depth</CODE>
<DD>
An integer (1, 8, 16, 32)<BR>
You can use this to request a different depth than the default one. Not all
servers will support all depths. If PfaEdit can't find a visual with the
desired depth it will use the default depth.
<DT>
<CODE>Gdraw.VisualClass</CODE>
<DD>
A string ("StaticGray", "GrayScale", "StaticColor", "PsuedoColor", "TrueColor",
"DirectColor")<BR>
PfaEdit will search for a visual with the given class (and possibly depth
if the depth argument is specified too).
<DT>
<CODE>Gdraw.<A NAME="Colormap">Colormap</A></CODE>
<DD>
An string ("Current", "Copy", "Private")<BR>
You can use this to control what PfaEdit does about the colormap on an 8bit
screen
<UL>
<LI>
Current -- PfaEdit will attempt to allocate its colors in the current colormap.
<LI>
Copy -- PfaEdit will allocate what colors it can and then copy the current
color map into a private copy. This means PfaEdit has access to a much wider
range of colors, and (as long as the shared colormap doesn't change) PfaEdit's
colormap will match that of the rest of the screen.
<LI>
Private -- PfaEdit will allocate a private colormap and set the colors just
as it wants them. It will almost certainly not match the shared colormap.
</UL>
<DT>
<CODE>Gdraw.DoDithering</CODE>
<DD>
An integer (0 or 1)<BR>
You can use this to turn off dithering of images on an 8bit screen.
<DT>
<CODE>Gdraw.MultiClickTime</CODE>
<DD>
An integer (milliseconds)<BR>
The maximum amount of time allowed between two clicks for them to be considered
a double (triple, etc.) click.
<DT>
<CODE>Gdraw.MultiClickWiggle</CODE>
<DD>
An integer (pixels)<BR>
The maximum number of pixels the mouse is allowed to move between two clicks
and have them still be considered a double click.
<DT>
<CODE>Gdraw.TwoButtonFixup</CODE>
<DD>
A boolean<BR>
On a windows keyboard use the modifier key with the flag on it to simulate
mouse button 2 (middle button). If this key is depressed when a mouse button
is pressed or released then pretend it was button 2 that was pressed or release.
<DT>
<CODE>Gdraw.MacOSXCmd</CODE>
<DD>
A boolean<BR>
On Mac OS X the user will probably expect to use the Command (apple, cloverleaf)
key to control the menu (rather than the Control key). If this is set then
the command key will be mapped to the control key internally.
<DT>
<CODE>Gdraw.MultiClickWiggle</CODE>
<DD>
An integer (pixels)<BR>
The maximum number of pixels the mouse is allowed to move between two clicks
and have them still be considered a double click.
<DT>
<CODE>Gdraw.<A NAME="Keyboard">Keyboard</A></CODE>
<DD>
ibm | mac | sun | ppc | 0 | 1 | 2 | 3<BR>
Allows you to specify the type of keyboard. Currently this is only relevent
when generating menus. The modifier keys are in different locations on different
keyboards (under different operating systems) and if PfaEdit knows what keyboard
you are using it can make the hot-keys have better labels.
<UL>
<LI>
ibm | 0<BR>
Uses the Control and Alt keys
<LI>
mac | 1<BR>
Uses the Command and Option keys (Mac OS/X, Mac keyboard)
<LI>
ppc | 3<BR>
Uses the Control and Command keys (Suse ppc linux, Mac keyboard)
<LI>
sun | 2<BR>
Uses the Control and Meta keys
</UL>
<DT>
<CODE>Gdraw.SelectionNotifyTimeout</CODE>
<DD>
An integer (seconds)<BR>
Gdraw will wait this many seconds after making a request for a selection
(ie. when doing a Paste). If it gets no responce after that period it reports
a failure.
<DT>
<CODE>Gdraw.Background</CODE>
<DD>
A <A HREF="#color">color</A><BR>
Gdraw will use this as the default background color for the windows.
<DT>
<CODE>Gdraw.Foreground</CODE>
<DD>
A <A HREF="#color">color</A><BR>
Gdraw will use this as the default foreground color for dialogs.
<DT>
<CODE>Gdraw.GGadget.Popup.Foreground</CODE>
<DD>
A <A HREF="#color">color</A><BR>
Specifies the foreground color of popup (tooltip) messages.
<DT>
<CODE>Gdraw.GGadget.Popup.Background</CODE>
<DD>
A <A HREF="#color">color</A><BR>
Specifies the background color of popup messages.
<DT>
<CODE>Gdraw.GGadget.Popup.Delay</CODE>
<DD>
An integer (milliseconds).<BR>
Specifies the amount of time the cursor must remain motionless before a popup
message pops up.
<DT>
<CODE>Gdraw.GGadget.Popup.LifeTime</CODE>
<DD>
An integer (milliseconds).<BR>
Specifies the length of time the message will display.
<DT>
<CODE>Gdraw.GGadget.Popup.Font</CODE>
<DD>
A <A HREF="#font">font</A><BR>
Specifies the font to use in a popup message.
<DT>
<CODE>Gdraw.GGadget...</CODE>
<DD>
Every ggadget in enclosed in a box. The following information may be supplied
for any box:
<DL>
<DT>
<CODE>...Box.BorderType</CODE>
<DD>
one of "none", "box", "raised", "lowered", "engraved", "embossed", "double"<BR>
For a description of these see the css manual.
<DT>
<CODE>...Box.BorderShape</CODE>
<DD>
one of "rect", "roundrect", "elipse", "diamond"<BR>
Describes the basic shape of the box. (some ggadgets must be in rectangles).
<DT>
<CODE>...Box.BorderWidth</CODE>
<DD>
An integer (points)<BR>
Specifies the width of the box's border in points (NOT pixels)
<DT>
<CODE>...Box.Padding</CODE>
<DD>
An integer (points)<BR>
Specifies the padding between the interior of the box and the border
<DT>
<CODE>...Box.Radius</CODE>
<DD>
An integer (points)<BR>
Specifies the radius of a roundrect. Ignored for everything else.
<DT>
<CODE>...Box.BorderInner</CODE>
<DD>
A boolean (true, on or 1, false, off or 0)<BR>
Specifies whether a black line should be drawn inside the border.
<DT>
<CODE>...Box.BorderOuter</CODE>
<DD>
A boolean (true, on or 1, false, off or 0)<BR>
Specifies whether a black line should be drawn outside the border.
<DT>
<CODE>...Box.ActiveInner</CODE>
<DD>
A boolean (true, on or 1, false, off or 0)<BR>
Specifies whether a yellow line should be drawn inside the border when the
gadget is active (not all gadgets support this).
<DT>
<CODE>...Box.DoDepressedBackground</CODE>
<DD>
A boolean (true, on or 1, false, off or 0)<BR>
Changes the color of the background while a button is depressed.
<DT>
<CODE>...Box.BorderBrightest</CODE>
<DD>
A <A HREF="#color">color</A><BR>
The color of the brightest edge of the border (usually the left edge)
<DT>
<CODE>...Box.BorderBrighter</CODE>
<DD>
A <A HREF="#color">color</A><BR>
The color of the next to brightest edge of the border (usually the top edge)
<DT>
<CODE>...Box.BorderDarkest</CODE>
<DD>
A <A HREF="#color">color</A><BR>
The color of the darkest edge of the border (usually the right edge)
<DT>
<CODE>...Box.BorderDarker</CODE>
<DD>
A <A HREF="#color">color</A><BR>
The color of the next to next to darkest edge of the border. (usually the
bottom edge)
<DT>
<CODE>...Box.NormalBackground</CODE>
<DD>
A <A HREF="#color">color</A><BR>
The color of a normal background (not disabled, not depressed)
<DT>
<CODE>...Box.NormalForeground</CODE>
<DD>
A <A HREF="#color">color</A><BR>
The color of a normal foreground (not disabled)
<DT>
<CODE>...Box.DisabledBackground</CODE>
<DD>
A <A HREF="#color">color</A><BR>
The color of a disabled background .
<DT>
<CODE>...Box.DisabledForeground</CODE>
<DD>
A <A HREF="#color">color</A><BR>
The color of a normal foreground.
<DT>
<CODE>...Box.ActiveBorder</CODE>
<DD>
A <A HREF="#color">color</A><BR>
The color of an ActiveInner border.
<DT>
<CODE>...Box.PressedBackground</CODE>
<DD>
A <A HREF="#color">color</A><BR>
The color of a depressed background.
<DT>
<CODE>...Font</CODE>
<DD>
A <A HREF="#font">font</A><BR>
Specifies the default font for a ggadget.
</DL>
<DT>
<CODE>Gdraw.GButton...<BR>
Gdraw.GLabel...<BR>
Gdraw.GRadio...<BR>
Gdraw.GCheckBox...<BR>
Gdraw.GTextField...<BR>
Gdraw.GList...<BR>
Gdraw.GScrollBar...<BR>
Gdraw.GScrollBarThumb...<BR>
Gdraw.GGroup...<BR>
Gdraw.GLine...<BR>
Gdraw.GMenu...<BR>
Gdraw.GMenuBar...<BR>
Gdraw.GTabSet...</CODE>
<DD>
As above.<BR>
Specifies the box for this particular type of ggadget.
<DT>
<CODE>Gdraw.GScrollBar.Width</CODE>
<DD>
An integer (points)<BR>
Specifies the scrollbar width in points (for horizontal scrollbars it specifies
the height)
<DT>
<CODE>Gdraw.GWidget.BrokenPalettes</CODE>
<DD>
A boolean<BR>
On many window managers the palette code doesn't work (they steal focus from
menus, they don't track the main window properly, ...). Use this resource
to turn off the broken bits. The results are non-optimal, but they should
be functional. (this is now irrelevant to pfaedit)
<DT>
...
</DL>
<P>
<DL>
<DT>
<A NAME="color">Colors</A>
<DD>
Colors may be specified as:
<UL>
<LI>
rgb(r%,g%,b%)<BR>
where r, g, and b are doubles between 0% and 100%
<LI>
r g b<BR>
where r, g, and b are integers between 0 and 255
<LI>
#rgb<BR>
where r, g, and b are hex digits between 0 and 15 (0xf)
<LI>
#rrggbb<BR>
where rr, gg, bb are hex numbers between 0x00 and 0xff
<LI>
#rrrrggggbbbb<BR>
where rrrr, gggg, bbbb are hex numbers between 0x0000 and 0xffff
<LI>
or one of the color names accepted on the net (red, green, blue, cyan, magenta,
yellow, white, black, maroon, olive, navy, purple, lime, aqua, teal, fuchsia,
silver)
</UL>
<DT>
<A NAME="font">Fonts</A>
<DD>
A font may be specified as:<BR>
<boldness> <italicness> <pointsize>
<familyname><BR>
(I know the order looks a bit weird but that's what is used by css).
<UL>
<LI>
<boldness> can be:
<UL>
<LI>
nothing -- the font is not bold
<LI>
bold -- the font is bold
<LI>
a number -- (between 0 and 999), a numeric value that gives some idea of
how bold the font should be. 200 would be a light font, 400 an normal font,
700 a bold font and 999 and ultra-black font.
</UL>
<LI>
<italicness> can be:
<UL>
<LI>
nothing -- the font is not italic
<LI>
italic -- the font is italic
<LI>
oblique -- the font is oblique (italic)
</UL>
<LI>
<pointsize> can be:
<UL>
<LI>
nothing -- a default point size is chosen
<LI>
a number followed by "pt" -- specifies the point size.
</UL>
</UL>
<P>
Examples
<UL>
<LI>
bold 14pt helvetica<BR>
Helvetica Bold at 14 points
<LI>
italic 10pt times<BR>
Times italic at 10 points
</UL>
</DL>
<P>
<H2>
<A NAME="Keyboards">Keyboards and Mice.</A>
</H2>
<P>
PfaEdit assumes that your keyboard has a control key and some equivalent
of a meta key. PfaEdit works best with a three button mouse.
<P>
Almost all keyboards now-a-days will have the needed modifier keys, but which
key is used for what will depend on the keyboard and the OS (for instance
XDarwin and suse linux use quite different mappings for the modifier keys
on the mac keyboard). Usually this is only relevant for menus (and mnemonics).
PfaEdit tries to guess the keyboard from the environment in which it was
compiled. But with X this may not always be appropriate. So the
"<A HREF="xres.html#Keyboard">Gdraw.Keyboard</A>" resource above may be used
to change this. (Currently this setting only control the labels that appear
in menus for the hotkeys).
<P>
Mice are more problematic. On PCs we usually have two button mice and on
mac single button mice. Many linuxes that run on a PC will give you an option
of simulating the middle button of the mouse by depressing the left and right
buttons simultaneously. PfaEdit will also allow you to simulate it by holding
down the super key (usually this is the one with the picture of a windows
flag on it) while depressing either mouse button.
<P>
On the mac I don't see any good way of simulating a three button mouse...
<P ALIGN=Center>
-- <A HREF="sfdformat.html">Prev</A> -- <A HREF="overview.html">TOC</A> --
<A HREF="cliargs.html">Next</A> --
</BODY></HTML>
|