# The Slot Display Class

Attributes
The Geometry Attribute
The R and C Attributes

> The slot class is for the display of any slotfiller variables. The display consists of a title area above a collection of slot areas, one for each symbolic index. Each slot area has two areas side-by-side. The one on the left is called the label area and, by default, contains the symbolic index of the slot. The one on the right is a value area for the corresponding value. The display of each slot area is like that of a scalar object. For example, if

>          slû(`one `two `three;
>              (0 0 2; "abc"; 3 4))
>          `sl is `slot
>          `sl has (`shelltitle;'sl';
>                   `title;'The above example')
>          show `sl

> then the display has three slot areas: one with label one and value 0 0 2; a second with label two and value abc; and a third with label three and value 3 4. For convenience, 0 is said to be the index of the first slot area, i.e., the one containing one and 0 0 2, 1 the index of the second, and so on.

> The value areas can be edited, but the label areas cannot.

> The slot areas that appear in the display and their arrangement can be controlled by the setting of the geometry attribute; see "The Geometry Attribute". All slot areas specified for display by this attribute are completely displayed; slotfiller displays never have scrollbars.

> The width of the label area in a slot with only one slot area is determined in the same way as the title area of a scalar object. More generally, to determine the width of a particular label area, consider all label areas that line up with it on the left: they all have the same width, which is just large enough to display the longest label among them, except that there is no label area for an empty label.

> The labels can be specified using the label attribute. No label area appears when the label for that area is specified to be an empty vector. A vector of n blanks produces a label area filled with n blanks. As with a scalar object, all additional size goes to the value areas when the display is resized larger.

Visual Representation

> sl With Default Geometry:
> sl With Geometry Changed To 2 1:
> sl With Matrix Geometry:

# Attributes

## The Geometry Attribute

> The geometry attribute controls the arrangement of an object of class slot on the screen. The value can be an integer, a vector, or a matrix.

> Geometry Specified as an Integer

> An integer specifies the number of columns in the arrangement, with the convention that -2 means a horizontal arrangement (and so is equivalent to the number of slot areas), and -1 means vertical (and so is equivalent to 1). Horizontal and vertical arrangements can also be specified by `horizontal and `vertical, respectively.

> Geometry Specified as a Vector

> The elements of a vector specify the number of slotfiller elements in the individual rows, the length of the vector being the number of rows.

> In both the integer and vector cases, the slot areas fill the first row in order, then the second, and so on, until the elements are exhausted.

> Geometry Specified as a Matrix

> In the case of a matrix the elements must be from either (but not both) of:

> - the list of integers ¢1,Én, where n is the number of slots;
> - the list of symbols `,0Øs, where s is the slotfiller array (and 0Øs is therefore its list of symbols).
> The display of the object is subdivided conceptually into blocks with the (i;j)th element of the matrix corresponding to the (i;j)th block; the upper left corner of the display is the origin. A -1 or empty symbol (`) in the matrix indicates that the corresponding block is blank. A nonnegative integer is the index of the slot area (as described above) occupying that block, while a nonempty symbol is the symbolic index associated with that slot area. Repeated integers or symbols must form a submatrix. Not all integers or symbols from their respective lists need be used. See "Functional Attributes".

## The R and C Attributes

> The arrangement of the slot areas can be understood in terms of virtual rows and virtual columns, in the same way as objects in a layout. It is possible to constrain the virtual rows or columns to be all the same size by setting the R or C attribute to 1, respectively.

List of Attributes

> See the "Display Attributes" chapter for details concerning all the attributes that apply to objects in the slot display class, as well as lists of colors and fonts. The keys in the Table of All Display Attributes that pertain to this class are S, ALL, CNFT, NFT, and TOP.

> The attributes that are meaningful for the slot display class (other than the print... attributes) are:

> active
> ancestors
> arrowbuttons
> arrowdown
> arrowkeys
> arrowleft
> arrowlist
> arrowright
> arrowup
> at
> atsector
> b
> bg
> bound
> C
> class
> clear
> colors
> cycle
> decrement
> deiconized
> doc
> done
> downto
> dynamic
> edit
> editbg
> editfg
> editspace
> eval
> evaluate
> execute
> exit
> extent
> fg
> f1-f12
> fkeys
> focus
> followers
> followertree
> font
> foot
> freeze
> fullscreen
> geometry
> h
> H
> has
> head
> hide
> hl
> hlthickness
> icon
> iconic
> iconized
> icontitle
> in
> increment
> incurrentworkspace
> is
> l
> label
> labelfg
> labelfont
> leader
> leftto
> literal
> lower
> mapped
> naturalsize
> notify
> out
> outofcurrentworkspace
> parent
> pin
> preset
> primary
> protect
> protected
> r
> R
> raise
> realize
> refer
> refresh
> request
> resize
> resizeable
> respace
> rightto
> script
> selected
> sensitive
> set
> settings
> shadowthickness
> shell
> shelltitle
> show
> space
> stars
> state
> stateself
> syncshow
> t
> tabfrom
> tablist
> tabto
> title
> titlefg
> titlefont
> titlejustify
> upto
> vcol
> vcols
> verify
> vrow
> vrows
> w
> W
> ws
> x
> X
> xs
> y
> Y
> ys
> yx
> YX
> yxs (Point the mouse cursor to an attribute to display a short description at the bottom of the screen)