Apple Newton Utilities Podręcznik Użytkownika Strona 327

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 942
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 326
CHAPTER 8
Text and Ink Input and Display
Using Text 8-35
Key Dimensions 8
The width and height of keys are specied in units, not pixels. A key unit is not a
xed size, but is used to specify the size of a key relative to other keys. The width
of a unit depends on the total width of all keys in the view and on the width of the
view itself. Key widths and heights can be specied in whole units, half units,
quarter units, and eighth units.
When it is displayed, the whole keyboard is scaled to t entirely within whatever
size view bounds you specify for it.
To t the whole keyboard within the width of a view, the total unit widths are
summed for each row, and the scaling is determined based on the widest row. This
row is scaled to t within the view width, giving an equal pixel width to each
whole key unit. A similar process is used to scale keys vertically to t within the
height of a view.
Fractional key units (half, quarter, eighth), when scaled, must be rounded to an
integer number of pixels, and thus may not be exactly the indicated fraction of a
whole key unit. For example, if the keys are scaled to t in the view bounds,
a whole key unit ends up to be 13 pixels wide. This means that a key specied to
have a width of 1 3/8 units (
keyHUnit+keyHEighth*3) is rounded to 13 + 5, or
18 pixels, which is not exactly 1 3/8 *13.
keyFramed Specify the thickness of the frame around the key. Multiply
this constant by the number of pixels that you want to use
for the frame thickness, from 0-3.
keyRoundingUnit Specify the roundedness of the frame corners. Multiply this
constant by the number of pixels that you want to use for
the corner radius, from 0-15, zero being square.
keyLeftOpen No frame line is drawn along the left side of this key.
keyTopOpen No frame line is drawn along the top side of this key.
keyRightOpen No frame line is drawn along the right side of this key.
keyBottomOpen No frame line is drawn along the bottom side of this key.
keyHUnit
keyHHalf
keyHQuarter
keyHEighth
A combination of these four constants species the
horizontal dimension of the key in units. For details,
see the next section.
keyVUnit
keyVHalf
keyVQuarter
keyVEighth
A combination of these four constants species the
vertical dimension of the key in units. For details, see
the next section.
Table 8-8 Key descriptor constants (continued)
Przeglądanie stron 326
1 2 ... 322 323 324 325 326 327 328 329 330 331 332 ... 941 942

Komentarze do niniejszej Instrukcji

Brak uwag