This chapter also describes how to specify style translations for DtEditor widget applications such as the desktop text editor (dtpad) and Mailer (dtmail), and alternates for DtEditor widget application menu accelerators that conflict with these translations.
dtstyle
) provides resources that enable you to specify where the system looks for files containing information about color palettes:
dtstyle*paletteDirectories: /usr/dt/palettes/C \ HomeDirectory/.dt/palettes
App-default files for the desktop applications are located in theFor example, if in /etc/dt/config/C/sys.resources you specify:
AnApplication*resource: value
then the resource AnApplication*resource will be set in each user's RESOURCE_MANAGER property at the next login.
#include "/usr/dt/app-defaults/language/UNIXbindings"
where language is the value of the LANG environment variable.
Menu Accelerators and Accelerator Text | Override |
Dtpad*fileMenu.print.acceleratorText: |
|
Dtpad*fileMenu.print.accelerator: |
|
Dtpad*editMenu.undo.acceleratorText: |
Ctrl+_ |
Dtpad*editMenu.undo.accelerator: |
Ctrl<Key>_ |
Dtpad*editMenu.paste.acceleratorText: |
Shift+Insert |
Dtpad*editMenu.paste.accelerator: |
Shift<Key>osfInsert |
Dtpad*editMenu.selectAll.acceleratorText: |
Ctrl+/ |
Dtpad*editMenu.selectAll.accelerator: |
Ctrl<Key>/ |
Menu Accelerators and Accelerator Text | Override |
Dtmail*ComposeDialog*menubar*Edit.Undo.acceleratorText: |
Ctrl+_ |
Dtmail*ComposeDialog*menubar*Edit.Undo.accelerator: |
Ctrl<Key>_ |
Dtmail*ComposeDialog*menubar*Edit.Paste.acceleratorText: |
Shif+Insert |
Dtmail*ComposeDialog*menubar*Edit.Paste.accelerator: |
Shift<Key>osfInsert |
Dtmail*ComposeDialog*menubar*Edit.Find/Change.acceleratorText: |
Ctrl+S |
Dtmail*ComposeDialog*menubar*Edit.Find/Change.accelerator: |
Ctrl<Key>s |
The additional bindings are:
Modifier Key | Key | Action Routine |
c ~s | <Key>a: | beginning-of-line( )\n\ |
c s | <Key>a: | end-of-line( )\n\ |
c ~s | <Key>b: | backward-character( )\n\ |
c s | <Key>b: | forward-character( )\n\ |
m ~s | <Key>b: | backward-word( )\n\ |
m s | <Key>b: | forward-word( )\n\ |
c ~s | <Key>d: | delete-next-character( )\n\ |
c s | <Key>d: | delete-previous-character( )\n\ |
m ~s | <Key>d: | kill-next-word( )\n\ |
m s | <Key>d: | kill-previous-word( )\n\ |
c ~s | <Key>e: | end-of-line( )\n\ |
c s | <Key>e: | beginning-of-line( )\n\ |
c ~s | <Key>f: | forward-character( )\n\ |
c s | <Key>f: | backward-character( )\n\ |
m ~s | <Key>f: | forward-word( )\n\ |
m s | <Key>f: | backward-word( )\n\ |
c | <Key>j: | newline-and-indent( )\n\ |
c ~s | <Key>k: | kill-to-end-of-line( )\n\ |
c s | <Key>k: | kill-to-start-of-line( )\n\ |
c | <Key>l: | redraw-display( )\n\ |
c | <Key>m: | newline( )\n\ |
c s | <Key>n: | process-up( )\n\ |
c ~s | <Key>n: | process-down( )\n\ |
c | <Key>o: | newline-and-backup( )\n\ |
c ~s | <Key>p: | process-up( )\n\ |
c s | <Key>p: | process-down( )\n\ |
c ~s | <Key>u: | kill-to-start-of-line( )\n\ |
c s | <Key>u: | kill-to-end-of-line( )\n\ |
c ~s | <Key>v: | next-page( )\n\ |
c s | <Key>v: | previous-page( )\n\ |
m ~s | <Key>v: | previous-page( )\n\ |
m s | <Key>v: | next-page( )\n\ |
c | <Key>w: | kill-selection( )\n\ |
c ~s | <Key>y: | unkill( )\n\ |
m | <Key>]: | forward-paragraph( )\n\ |
m | <Key>[: | backward-paragraph( )\n\ |
c ~s | <Key>comma: | backward-word( )\n\ |
c s | <Key>comma: | forward-word( )\n\ |
m | <Key>\\<: | beginning-of-file( )\n\ |
c ~s | <Key>period: | forward-word( )\n\ |
c s | <Key>period: | backward-word( )\n\ |
m | <Key>\\>: | end-of-file( )\n\ |
c ~s | <Key>Return: | end-of-file( )\n\ |
c s | <Key>Return: | beginning-of-file( )\n\ |
~c ~s ~m ~a | <Key>osfDelete: | delete-previous-character( )\n\ |
~c s ~m ~a | <Key>osfDelete: | delete-next-character( )\n\ |
A bitmap font is made from a matrix of dots. (By default, Style Manager configures bitmap fonts only.) The font is completely contained in one file. Many files are needed to have a complete range of sizes, slants, and weights.
Fonts are specified as values of resources and as parameters to commands. The X Logical Font Description (XLFD) name is the method by which a desired font is requested. The system finds the font that best matches the description it was given.
UserFont
:
*XmText*FontList
*XmTextField*FontList
Displayed in text entry boxes
NumFonts
SystemFont[1-7]
SystemFont
UserFont[1-7]
UserFont
For more information about application fonts, seethe DtStdAppFontNames (5) and DtStdInterfaceFontNames (5) man pages.
xlsfonts [-options] [-fn pattern]
A list of XLFD names and font alias names available on your system is displayed. Bitmap fonts show values in all fourteen XLFD fields. Scalable typefaces show zeros in the PixelSize, PointSize, ResolutionX, and ResolutionY positions.
xset +fp directory name
where directory name is the directory containing the desktop fonts. The default location set by session startup is /usr/dt/config/xfonts/language.
application name -xrm "*bitstream-charter-medium-r-normal-8-88-75-75-p-45-iso8859-1"
The form of the property string specification is:
"-Foundry-FamilyName-WeightName-
Slant-SetwidthName-AddStyleName-PixelSize-
PointSize-ResolutionX-ResolutionY-Spacing-
AverageWidth-CharSetRegistry-CharSetCoding"
Property String | Definition | ||||||||||
Foundry | A string identifying the font designer | ||||||||||
FamilyName | A string identifying the trademarked name of the font | ||||||||||
WeightName | A string giving the relative weight of the font, such as bold | ||||||||||
Slant | A code describing the direction of slant
|
||||||||||
SetwidthName | A string describing the width, such as compressed or expanded | ||||||||||
AddStyleName | A string providing any additional information needed to identify the font | ||||||||||
PixelSize | An integer giving the size of an em-square in pixels | ||||||||||
PointSize | An integer giving the size of an em-square in decipoints | ||||||||||
ResolutionX | An integer giving the horizontal resolution in pixels | ||||||||||
ResolutionY | An integer giving the vertical resolution in pixels | ||||||||||
Spacing | A code specifying the spacing between units
|
||||||||||
AverageWidth | An integer giving the average width in 1/10 pixels | ||||||||||
CharSetRegistry | A string identifying the registration authority that has registered the font encoding | ||||||||||
CharSetEncoding | A string identifying the character set in the specified registry |
charter
made by Bitstream that supports the ISO8859-1 standard encoding:
-bitstream-charter-medium-r-normal--8-80-75-75-p-45-iso8859-1
It is medium weight, with no special slanting, and normal width. The font is proportional, with an em-square box of 8 pixels or 8.0 points. The horizontal and vertical resolution are both 75 pixels. The average width of a character is 45 1/10ths pixels or 4.5 pixels.Parts of this string can be replaced by wildcards. The system uses the first font it finds that matches the parts you have specified.
If all you want is an eight-pixel charter
font, you could use:
*-charter-*-*-*-*-8-*
A file exists for each palette. The paletteDirectories
resource specifies the directories containing palette files. By default, this resource contains:
Each color set is composed of up to five colors. Each color button displays the background color of the color set. The five colors in each color set represent the following display component resources:
foreground
background
topShadowColor
The color of the top and left bevels of application controls (such as push buttons) and window frames.
bottomShadowColor
The color of the bottom and right bevels of application controls and window frames.
selectColor
colorUse
resource, which the user can set using the Style Manager Number of Colors To Use dialog box.
#RedGreenBlue
Red, Green, and Blue are hexadecimal numbers, each 1 to 4 digits long, that indicate the amount of that color used. There must be the same number of digits for each of the colors. Thus, valid color values consist of 3, 6, 9, or 12 hexadecimal digits.For example, white can be specified in any of the following ways:
#fff
#ffffff
#fffffffff
#fffffffffffff
If you set a color resource directly, you can use either the color name or RGB value. The file /usr/lib/X11/rgb.txt lists all the named colors.
activeColorSetId
inactiveColorSetId
Inactive window frame color
textColorSetId
primaryColorSetId
secondaryColorSetId
You can use these resources for individual applications. For example, the following line shows how you would visually group all dtterm windows by using color set 8 for their primary color.
dtterm*primaryColorSetId: 8
1
2
Inactive window frame color
3
4
Display | Maximum Number of Colors | Number Derived From |
B_W | 2 | Black and white |
LOW_COLOR | 12 | Two color sets times five colors plus black and white |
MEDIUM_COLOR | 22 | Four color sets times five colors plus black and white |
HIGH_COLOR | 42 | Eight color sets times five colors plus black and white |
To determine the maximum number of colors:
background
and selectColor
) plus black and white:
*colorUse: MEDIUM_COLOR
*shadowPixmaps: True
*foregroundColor: White
colorUse
resource also affects the use of multi-color icons.
shadowPixmaps
resource directs the desktop to replace the two shadow colors with pixmaps. These pixmaps mix the background color with black or white to simulate top or bottom shadow values. This reduces the number of needed colors by two, since color cells do not need to be allocated for the shadow colors.
topShadowPixmap
and bottomShadowPixmap
to use instead of the shadow colors.
topShadowColor
and bottomShadowColor
from the palette are used.
shadowPixmaps
depends on the colorUse
resource you have and the hardware support for the display.foregroundColor
resource specifies how the foreground is configured in a palette.
background
. For instance, white letters on a yellow background are difficult to read, so the system chooses black.
foregroundColor
is set to either Black or White, the number of colors in the color set is reduced by one, and the foreground will not change in response to changes in the background color.
The default value for foregroundColor
is Dynamic, except where the value of colorUse
is B_W.
dynamicColor
resource controls whether applications change color dynamically; that is, whether the clients change color when you switch palettes.
dynamicColor
resource is True, clients that cannot change colors dynamically (non-Motif applications) allocate different cells in the color map than clients that can change colors dynamically, even if you see the same color.
dynamicColor
to False reduces the number of colors your desktop consumes.
To set the shadow thickness to one pixel for non-Motif 1.2 applications:
application_class_name*XmCascadeButton*shadowThickness: 1