Display Attributes


The colors, fonts, layout arrangements, and many other aspects of the appearance of a screen display are controlled by display attributes. "Screen Management Functions" tells how to use the screen management primitive functions of and has to set and reference values of display attributes.

Every display attribute is listed in "Display Attributes", together with a brief description and a set of keys. The meanings of the alphabetic keys are given in the next section.

For some display attributes, the information in "Display Attributes" is only a summary. For more information on:

Among the display attributes described here are those for specifying colors and fonts. Both colors and fonts are specified by symbols or character strings, as in `name or 'name'. A list of all available color names can be found in "/usr/X11R6/lib/X11/rgb.txt".

For convenience, a list pruned to the unique colors appears in "Colors". A list of all available font names can be produced by executing xlsfonts in an XTerm session (or $xlsfonts from A+). A list of preferred fonts (those available on the screen and for printing) is in "Preferred Fonts".

Display Attribute Characteristics

   Persistent Attributes (Key = p)

Display attributes are categorized as persistent and nonpersistent. Persistent attributes can be thought of as more directly connected to the concept of an array than nonpersistent ones. For example, the font in which the values of a variable will appear is a persistent attribute, while the thickness of the highlight border in its display is nonpersistent. The most distinguishing feature is that once a persistent attribute is set for a variable x, it will remain set, even as x is bound, freed, and bound again to another class; in effect, a persistent attribute is an attribute of A+ variables, not of particular display classes. Indeed, it can be set on an unbound variable. For this reason persistent attributes are also called attributes of variables. On the other hand, the setting of a nonpersistent attribute will not be maintained when a variable is freed, and some nonpersistent attributes cannot even be specified for variables bound to certain classes. Nonpersistent attributes are attributes of display classes, not of variables bound to those classes. Nonpersistent attributes are also called attributes of classes, or widget attributes.

Even though a persistent attribute can be given a value for an object of any class, that value is not necessarily meaningful. For example, the font attribute, which specifies the font in which values are type set, is not meaningful for line graphs. For each persistent attribute, "Display Attributes" shows "ALL" as the key for the set of display classes to which it applies and - unless it is meaningful for all classes - lists in parentheses the classes for which it is actually meaningful, i.e., for which it has a visual effect. Note that an object contained in a table or graph is bound to the class tableField or graphTrace, respectively, no matter to what class it may have previously belonged.

   Applicable Classes; the ALL and CNT Keys

Keys with capital letters in the second column of "Display Attributes" indicate classes to which the attributes apply. The ALL key means all classes except report, which is fundamentally different from the others, since it cannot be shown, and in some cases, such as navigation, children of reports. Only Rp refers to the report class. CNT means the container classes hgrid, hpane, layout, notebook, vgrid, and vpane.

   Attributes of Objects in Layouts (Key = CNFT)

Objects in layouts and panes have attributes for establishing their relative positions and behavior when the layouts are resized. See "Layouts, Geometry, Constraints", and also "The Layout Display Class".

   Attributes for Top-level Objects (Key = TOP)

Top-level objects, in the broad sense1, are objects that are not contained in other objects (and not reports). It is these objects that appear with certain window manager decorations, and there are attributes associated with this appearance and their interrelations among top-level objects. See "Windows" in "Introduction to Screen Management".

   Graph Attributes for Axes (Keys = o, x, y)

Graphs have four axes, the x axis on the bottom of the plot area, the y axis to the left, an alternate x axis above, and an alternate y axis to the right. Some attributes come in sets of four, with one attribute for each axis. For example, the font for the labels can be set separately for each axis, as xlabelfont for the x axis, ylabelfont for the y axis, Xlabelfont for the alternate x axis, and Ylabelfont for the alternate y axis. Whenever there is such a foursome, only the attribute for the x axis is given, with the key o.

Similarly, for several attributes there are x-axis and alternate x-axis versions, but no y-axis or alternate y-axis versions. For these attributes, only the attribute for the x-axis is given, and with the key x. Analogously, for attributes with y-axis and alternate y-axis versions, but no x-axis or alternate x-axis versions, only the attribute for the y-axis is given, with the key y.

   Action Attributes (Key = a)

Certain attributes express an action to be taken, rather than a quality. For example, naturalsize is the attribute which causes an object to be resized to a size appropriate for its current value and attribute settings. It is not necessary to specify a value for this attribute, but only that the resizing actions should take place, as in
     `object has `naturalsize
Some action attributes also take values, but it is not necessary to specify a value to get the primary action to take place. For example, the show attribute can be given the value 1 to show an object or 0 to hide it, and
`object has (`show;1) is equivalent to `object has `show.

   Attributes that Can Only Be Set (Key = s) or Referenced (Key = r)

Some attributes can only be set, and have no stored value; s will complain if asked for a value. Other attributes can only be referenced; s will complain about any attempts to set values for them.

   Attributes with Callbacks (Key = cb)

These attributes are associated with user interactions such as key and button presses. See "Attributes with Callbacks". This key is used as a link to the corresponding table entry in that chapter. Some attributes with this key have a default value of 0 or 1 and can also be given the other value of 1 or 0; in these cases either `false or `off can be used in place of 0, and either `true or `on can be used in place of 1.

   Functional Attributes (Key = fn)

These attributes provide efficient means for dynamically modifying their values based on changing circumstances in running applications. See "Functional Attributes". This key is used as a link to the corresponding table entry in that chapter.

Table of All Display Attributes

   Keys for the table

The second column of this large table shows keys which explain the applicability of each attribute. To see a brief description of what a key represents, simply point to they key with your mouse... no clicking required.

Alternatively, assuming you are using the frames version of the online manual, when you are looking at an entry in the table and are not sure what a key stands for, you can click on "Keys" under "Table of Attributes" in the lefthand frame. After ascertaining the key's meaning, you can return to the table by pressing the righthand mouse button with the pointer in the main frame and selecting "Back" from the menu that pops up.


Attribute
 

 Meaning
 
A  array
B  label
C  command
D  password
E  choice
G  graph
gT  graphTrace
hG  hgauge
hM  hmenu
hP  hpane
hR  hgrid
hS  hscale
I  radio
K  check
L  layout
M  matrix
N  action
O  notebook
P  page
Q  scalar
R  tree
Rp  report
S  slot
T  table
tF  tableField
U  button
V  view
vG  vgauge
vM  vmenu
vP  vpane
vR  vgrid
vS  vscale
W  window
X  text
ALL  all objects except reports (fundamentally different; can't be shown)      
    ALL (list)       ALL, but meaningful only for the classes in list
CNFT  NFT but only objects in containers
CNT  containers: layout, grids, panes, and notebook
GS  hgauge, vgauge, hscale, and vscale
NFT  not tableField or graphTrace
TOP  top-level and popup objects only
o  also for graph attributes prefixed X, y, Y, or
x  also for the attribute with prefix X
y  also for graph attribute prefixed Y
a  action
cb  attribute with callback
fn  functional
p  persistent
r  reference only (cannot be set)
s  set only

 
Attribute Keys
(POINT TO KEY FOR INFO)
Description Default
acceptfocus E = choice, hM = hmenu, I = radio, K = check, N = action, U = button, V = view, vM = vmenu If 1, this object will accept input focus during traversal; if 0, it will not. 1
active ALL = all objects except reports (fundamentally different; can't be shown), r = reference only (cannot be set) If 1, this object will be automatically updated when marked for reevaluation; if 0, it will not. The value 0 occurs when the show attribute is 0 for this object or one of its ancestors. 1
addtexttrace G = graph, cb = attribute with callback, (click for more info) The action taken on an add-a-text-trace event.  
addtrace G = graph, cb = attribute with callback, (click for more info) The action taken on an add-a-trace event.  
ancestors ALL = all objects except reports (fundamentally different; can't be shown), r = reference only (cannot be set) Vector of objects containing this object.  
arrowbuttons C = command, D = password, Q = scalar, S = slot If 1, incrementing and decrementing arrows (up- and down-pointing triangles) are shown, for each entry in the case of a slot; if 0, they are not shown; if (for a slot) a boolean vector of the same length as the slotfiller, they are shown for the entries corresponding to ones in arrowbuttons. For the action associated with these buttons, see the increment and decrement attributes. Null (0) for slot, 0 for the others.
arrowdown ALL = all objects except reports (fundamentally different; can't be shown), cb = attribute with callback Event callback function, called for a down-arrow keypress. If 1, default action; if 0, no callback. [Future use] Move selection down 1.
arrowkeys ALL = all objects except reports (fundamentally different; can't be shown), r = reference only (cannot be set) Slotfiller of arrow keys and callback functions. Cf. arrowdown, arrowleft, arrowright, arrowup. [Future use]  
arrowleft ALL = all objects except reports (fundamentally different; can't be shown), cb = attribute with callback Event callback function, called for a left-arrow keypress. If 1, default action; if 0, no callback. [Future use] Move selection left 1.
arrowlist NFT = not tableField or graphTrace Matrix with items "fr dir to".  dir is one of `left `right `up `down and fr and to name objects. Connected to upto, downto, etc. [Future use]  
arrowright ALL = all objects except reports (fundamentally different; can't be shown), cb = attribute with callback Event callback function, called for a right-arrow keypress. If 1, default action; if 0, no callback. [Future use] Move selection right 1.
arrowup ALL = all objects except reports (fundamentally different; can't be shown), cb = attribute with callback Event callback function, called for an up-arrow keypress. If 1, default action; if 0, no callback. [Future use] Move selection up 1.
at CNFT = NFT but only objects in containers, (click for more info) Position of this object in a layout: (vrow, vcol, vrows, vcols).  
atsector TOP = top-level and popup objects only A two-element vector designating the (row, col) position of the virtual desktop sector where this object is displayed, or `here for the currently active sector (see s.desktop{}, s.beHere{}). 0, 0
axis G = graph, (click for more info) Specify which axes appear on a graph. `std
Attribute Keys
(POINT TO KEY FOR INFO)
Description Default
b CNFT = NFT but only objects in containers If 1, bottom justify this object in its layout cell. 0
backpagebg O = notebook Background color of tabs and page edges. `deep skyblue4
backpagefg O = notebook Foreground color of tabs and page edges, but not the titles on the tabs, which get their color from fg. `black
backpages O = notebook Number of apparent unshown pages, i.e., page edges. 3
backpage thickness O = notebook Thickness of each (unshown) page edge, in pixels. 4
banner Rp = report Text of banner to be printed diagonally in background on each page, e.g., "Draft", "Internal use only".  
barwidth G = graph, (click for more info) The maximum pixel width of bars in bar and stack graphs. 10
be ALL (list) = ALL, but meaningful only for the classes in list(CNT = containers: layout, grids, panes, and notebook), fn = functional, p = persistent If (cÖv) has (`be;(f;s)) and cÖv is a container, then f{s;d;i;p;c;v} is called to bind the child d of cÖv to a display class; s may be a display class, a list of display classes, or whatever will help in this process.  
bg ALL = all objects except reports (fundamentally different; can't be shown), p = persistent;
fn = functional for A = array, M = matrix, tF = tableField, V = view
The background color of this object. For tables and arrays, does not change the scrollbar background color if that color is different from the bg color that is being changed. A tableField inherits its value from its table, and when the value for tableField is reset to Null it uses the current value for table. grey
bggrayscale tF = tableField, fn = functional Background shade value in reports, 1 - white to 0 - black. A scalar or a function (in the callback i is the row). 1
bindingwidth O = notebook The width (diameter) of the spiral binding, in pixels. 36
blank ALL (list) = ALL, but meaningful only for the classes in list(A = array, M = matrix, T = table, tF = tableField), p = persistent What is to be displayed for a NA, e.g., on insertion of a row. Cf. na and s.AUTOBLANK. Null
blink P = page, fn = functional, (click for more info) Boolean mask controlling whether or not a cell blinks, i.e., its foreground and background colors oscillate. (The blink timer runs only when something is actively blinking).  
blinkrate P = page The rate of blinking in milliseconds. 250
bold P = page, fn = functional Boolean mask indicating which characters are bold.  
borderheight O = notebook Border area above and below the notebook, in pixels. 7
borderwidth O = notebook Border area on each side of the notebook, in pixels. 7
bottom G = graph, (click for more info) Distance from the bottom of the graph window to the x-axis rule (visible or not), as a percentage of the window height. 0
bottom margin Rp = report Bottom margin of report, in inches. 1
bound ALL = all objects except reports (fundamentally different; can't be shown), r = reference only (cannot be set), p = persistent If 1, this object is bound; if 0, this object is free.  
box P = page, (click for more info) An n by 4 matrix of boxes, where each row represents a box as first row, first col, number of rows, number of columns. 0 4 Ò 0
boxcolor P = page A symbolic vector of box colors. If boxcolor is specified with fewer colors than boxes, then the remaining boxes stay the color that they were before the specification.  
breakbggray scale tF = tableField, fn = functional Background shade for breaks in reports, 1 - white to 0 - black. A scalar or function. 1
breakcriteria func tF = tableField, fn = functional Determines whether a break occurs for this row (propagated to other columns). Must be functional and return 0 or 1. If row (item) differs from previous row.
breakfggray scale tF = tableField, fn = functional Foreground shade for breaks in reports, 1 - white to 0 - black. A scalar or function. 0
breakfont T = table, tF = tableField, fn = functional Font to be used for printing breaks. Value for table is used as a default if no value set for a tableField.  
breakleading tF = tableField, fn = functional Distance in points between break and next row. 2
breakoffset tF = tableField, fn = functional Distance in points between break and previous row. 2
breakon tF = tableField Whether column can initiate breaks or not. 0
break processfunc tF = tableField, fn = functional Function to be called to process data at a break if breakprocesson is 1. If none, computation mode is used.  
break processon tF = tableField Whether to perform computations at breaks. 1
breakstyle T = table, tF = tableField, fn = functional Style for break: `left, `right, `top, `bottom, or a combination. Value for table used as default. `left
breaktext tF = tableField Text to be inserted at every break.  
buffer C = command, X = text, r = reference only (cannot be set) The character buffer of the command or text display class; a vector.  
build hR = hgrid, L = layout, vR = vgrid, (click for more info) If 1 and this object is a simple vector layout, use autobuilder; if 0, use a default arrangement; if Null, use the value of s.AUTOBUILD. Null (0)
Attribute Keys
(POINT TO KEY FOR INFO)
Description Default
C hP = hpane, I = radio, K = check, L = layout, N = action, S = slot, vP = vpane If 1, make all virtual columns of this object the same size.  
cancel Rp = report Set to 1 (in a callback) to cancel report generation. 0
children CNT = containers: layout, grids, panes, and notebook, G = graph, T = table, W = window A vector of all objects named in this variable.  
class ALL = all objects except reports (fundamentally different; can't be shown), p = persistent The display class of this object.  
clear NFT = not tableField or graphTrace, cb = attribute with callback, (click for more info) Furnishes a callback function for a clear event. See "Accessing the Primary Selection Buffer".  
col A = array, M = matrix, T = table, V = view The column index of the selected cell. Setting this attribute causes the selected column to appear in the display. In addition, if the row attribute is set to a valid row index, the cell at position (row, col) is highlighted. Setting it to -1 signifies that no column is selected (so none is highlighted). 0
colindex M = matrix A vector of indices of the selected column labels when the selectcol attribute is 1, in the order of selection. É0
colindexbg M = matrix The background color of the indexed column labels. medium aquamarine
collabelrows M = matrix The maximum number of rows in the column labels. 1
color P = page, fn = functional Row indices for colormap attribute, for foreground, background color pairs for cells. Functional result must be same shape as variable; if nonfunctional, it is reshaped to match. Null (0)
colormap P = page k by 2 matrix of color symbols; each row is a foreground, background pair. Indexed into by the color attribute. 1 2 Ò `black `grey
colors A = array, C = command, D = password, M = matrix, Q = scalar, S = slot, T = table, tF = tableField, V = view, fn = functional A vector of colors that will be cycled through when a cell is updated by indexed specification (which can be caused by editing the cell on screen); see the cycle attribute.  
cols A = array, E = choice, hM = hmenu, M = matrix, T = table, V = view, vM = vmenu, X = text The number of visible columns. Table: at most 5; text: 40.
colsep A = array, M = matrix, T = table, V = view If n, column separators appear every n columns. 1
colspace M = matrix, fn = functional An integer vector specifying column widths. The first element applies to the row-label column. If there is only one element, it applies to all columns. Otherwise, all elements except the first are used cyclically, as in Reshape. Null
column alignment tF = tableField Horizontal alignment of data in the tableField. One of `left, `center, `right. `left
column control T = table Vector of columns per page.  
column pagespan T = table Number of pages that the table's columns are to span.  
column resize T = table, (click for more info) Controls whether columns can be resized by dragging their right borders (column separators): 1 - yes, 0 - no. 0
column spacing T = table Space between columns in reports, in inches.  
computation mode tF = tableField Specify the default computation mode: `sum, `avg, `max, `min, `stddev, `variance. Used when breakprocesson is 1 and breakprocessfunc is not specified.  
compute pagebreakcb Rp = report, cb = attribute with callback For a callback that occurs at the completion of the pagebreak computation.  
compute sizecb Rp = report, cb = attribute with callback For a callback that occurs at the completion of the computation of the report size.  
constraints hP = hpane, L = layout, O = notebook, vP = vpane A slotfiller containing the resize attribute of each child, indexed by child's name. Defaults for the children
coordinate G = graph, (click for more info) The pointer's x, y coordinates when a refer event occurs.  
gT = graphTrace, (click for more info) All the x axis, y axis coordinates that make up the trace when a refer event occurs.  
Coordinate G = graph, (click for more info) The pointer's X, Y coordinates when a refer event occurs.  
copy ALL (list) = ALL, but meaningful only for the classes in list(A = array, M = matrix, T = table, tF = tableField), p = persistent For an inserted line. If 1, copy the line that the new line is being inserted above or below. If 0, use na value. Cf. s.AUTOCOPY. Null (0)
copy texttrace G = graph, cb = attribute with callback, (click for more info) The action taken on a copy-a-text-trace event.  
copytrace G = graph, cb = attribute with callback, (click for more info) The action taken on a copy-a-trace event.  
cornerindex M = matrix If 1, the corner label is "flagged"; if 0, it is not; see the selectcorner attribute. 0
corner indexbg M = matrix The background color of the corner label when it is flagged. medium aquamarine
current breakcolumn T = table, r = reference only (cannot be set) Column that is currently causing a break.  
current page O = notebook Name of the object that is being shown. Set it to show page.  
cursor C = command, P = page, X = text The position of the cursor (number of characters from the left and, for page, top). page: ¢1 ¢1; others: 0.
cycle A = array, C = command, D = password, M = matrix, Q = scalar, S = slot, T = table, tF = tableField, V = view The duration in milliseconds of the appearance of each color in the value of the colors attribute. If set on a table, it applies to all tableFields.  
cyclemode A = array, M = matrix, T = table, V = view If `fg, color cycling affects the foreground, if `bg, the background; if `reverse, color cycling is implemented by reverse video and the colors attribute is ignored. `fg
Attribute Keys
(POINT TO KEY FOR INFO)
Description Default
decrement C = command, D = password, Q = scalar, S = slot, cb = attribute with callback An event callback function to be associated with the down arrow button that appears when arrowbuttons is 1. For a slot, there may be several down arrow buttons; the selected attribute gives the symbol for the entry whose button was pressed.  
deiconized TOP = top-level and popup objects only (not popups), cb = attribute with callback Function for event callback when the widget is deiconized, whether or not the window manager is CDE. See the caveats in the callback section. Cf. iconized.  
delete A = array, E = choice, G = graph ((click for more info)), I = radio, K = check, M = matrix, N = action, S = slot, T = table, cb = attribute with callback Controls the action when a user presses Meta-Delete or, on IBM, Alt-Delete. The default action is to delete the selected row. Set delete to 0 to turn off the Delete key, and 1 to get the default action. In the case of a graph, it applies only to selectable traces. See the selectable attribute. 0
delimiter Rp = report To be defined.  
descendents CNT = containers: layout, grids, panes, and notebook, G = graph, T = table, W = window, r = reference only (cannot be set) A vector of all objects contained in this object.  
disclaimer Rp = report Governs disclaimer: `none; `text only; text in `box; text with `rule above and below; text below `toprule; or text `appended to top-level window. `none
disclaimer bottom margin Rp = report The bottom margin of the disclaimer, in inches. .2777777778
disclaimer file Rp = report The file containing the disclaimer text.  
disclaimer leftmargin Rp = report The left margin of the disclaimer, in inches. .2777777778
disclaimer right margin Rp = report The right margin of the disclaimer, in inches. .2777777778
disclaimer rule width Rp = report Width of any ruling for the disclaimer; see the disclaimer attribute.  
disclaimer topmargin Rp = report The top margin of the disclaimer, in inches. .2777777778
disclaimer orientation Rp = report Orientation of the disclaimer:
same as the object if `none;
else `portrait or `landscape regardless of the object.
`none
distribution method 3 = 3dgraph `linear or `table, indicating distributionlevels evenly spaced separators or the separators in distributiontable. `linear
doc ALL = all objects except reports (fundamentally different; can't be shown), p = persistent An attribute that allows documentation, presumably text, to be attached to each object. Cf. s.AUTODOC. >,< s.AUTODOC
done ALL (list) = ALL, but meaningful only for the classes in list(A = array, M = matrix, P = page, Q = scalar, S = slot, tF = tableField), cb = attribute with callback, p = persistent Holds the name of a function to be called at the end of the screen entry and refresh cycle. (The cycle is: in, preset callback, assignment, set callback, out, done.)  
downto NFT = not tableField or graphTrace Object to which Shift-down-arrow moves keyboard focus. Connected to arrowlist. [Future use] Null
dragdrop T = table, (click for more info) Controls whether columns can be moved by dragging:  1 - yes,  0 - no. 0
dynamic NFT = not tableField or graphTrace Set to 1 for this object to be resized automatically when necessary due to a font or text change. 0
Attribute Keys
(POINT TO KEY FOR INFO)
Description Default
edit A = array, C = command, D = password, hG = hgauge, hS = hscale, M = matrix, Q = scalar, S = slot, T = table, vG = vgauge, vS = vscale, a = action When edit is set to any nonzero value, if there is a selected cell and it is not protected, it is put in input (editing) mode. When edit is set to 0, if there is a cell in input mode, its contents are accepted and input mode ended, as if the viewer had pressed Enter while the pointer was in the object.  
editbegincb A = array, C = command, D = password, hS = hscale, M = matrix, Q = scalar, S = slot, T = table, vS = vscale, cb = attribute with callback The callback function to be executed when a user begins editing the widget. Null (none)
editbg A = array, C = command, D = password, hG = hgauge, hS = hscale, M = matrix, Q = scalar, S = slot, T = table, vG = vgauge, vS = vscale The background color of the cell being edited. black
editendcb A = array, C = command, D = password, hS = hscale, M = matrix, Q = scalar, S = slot, T = table, vS = vscale, cb = attribute with callback The callback function to be executed when a user ends editing of the widget. Null (none)
editfg A = array, C = command, D = password, hG = hgauge, hS = hscale, M = matrix, Q = scalar, S = slot, T = table, vG = vgauge, vS = vscale The color of the text being entered while in edit mode. grey
editspace