background image
C H A P T E R 8
Text and Ink Input and Display
Using Text
8-31
The Key Definitions Array
8
Each keyboard view contains a key definitions array, which determines the layout
of the individual keys in the keyboard. The key definitions array is an array of rows.
Each row is an array of values that looks like this:
row0 := [
rowHeight
,
rowMaxKeyHeight
,
key0Legend
,
key0result
,
key0Descriptor
,
key1Legend
,
key1result
,
key1Descriptor
,
key2Legend
,
key2result
,
key2Descriptor
,
...
]
The first two elements describe the height to allot for the row (rowHeight) and the
height of the tallest key in the row (rowMaxKeyHeight), in key units. These two
measurements are often the same, but they may differ. Key units are described in
"Key Dimensions" (page 8-35).
Next in the row array is a series of three elements for each key in the row:
keyLegend
keyResult
keyDescriptor
These values are described in the following sections.
Figure 8-13 shows the example keyboard view that is used to explain key definition
in this section.
Figure 8-13
A generic keyboard view
The following is the view definition of the keyboard shown in Figure 8-13. The
values in the row arrays are explained in the remainder of this section.
row0 := [ keyVUnit, keyVUnit,
"1",1, keyHUnit+keyVUnit+keyFramed+2*keyInsetUnit+keyAutoHilite,
"2",2, keyHUnit+keyVUnit+keyFramed+2*keyInsetUnit+keyAutoHilite
"3",3, keyHUnit+keyVUnit+keyFramed+2*keyInsetUnit+keyAutoHilite ];
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна