Apple Newton Utilities User's Guide Page 328

  • Download
  • Add to my manuals
  • Print
  • Page
    / 942
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 327
CHAPTER 8
Text and Ink Input and Display
8-36 Using Text
Key dimensions are specied by summing a combination of horizontal and vertical
key unit constants within the
keyDescriptor. For example, to specify a key that
is 2 3/4 units wide by 1 1/2 units high, specify these constants for
keyDescriptor:
keyHUnit*2 + keyHQuarter*3 + keyVUnit + keyVHalf
Using the Keyboard Registry 8
If your application includes its own keyboard, you need to register it with the system
keyboard registry. This makes it possible for the system to call any keyboard-related
functions that you have dened and to handle the insertion caret properly.
The
RegisterOpenKeyboard method of a view is for registering a keyboard for
use with that view.
Use the
UnregisterOpenKeyboard method of a view to remove the keyboard
view from the registry. If the insertion caret is visible, calling this method hides it.
Note
The system automatically unregisters the keyboard when the
registered view is hidden or closed. The protokeypad proto
also automatically handles registration for you in its
viewSetupDoneScript. You do not need to call the
UnregisterOpenKeyboard method in these cases.
You can use the OpenKeypadFor function to open a context-sensitive keyboard
for a view. This function rst attempts to open the keyboard dened in the view’s
_keyboard slot. If the view does not define a keyboard in that slot,
OpenKeypadFor determines if the view allows only a single type of input, such
as date, time, phone number, or numbers. If so,
OpenKeypadFor opens the
appropriate built-in keyboard for that input type. If none of these other conditions
is met,
OpenKeypadFor opens the alphaKeyboard keyboard for the view.
Note
The Newton System Software uses the OpenKeypadFor
function to open a context-sensitive keyboard when the user
double-taps on a view in which a
_keyboard slot is dened.
Theses methods and functions, as well as several others you can use with the
keyboard registry in your applications, are described in “Keyboard Registry
Functions and Methods” (page 7-44) in Newton Programmers Reference.
Dening Tabbing Orders 8
You can dene the tabbing order for an input view with the _tabChildren slot,
which contains an array of view paths.
Page view 327
1 2 ... 323 324 325 326 327 328 329 330 331 332 333 ... 941 942

Comments to this Manuals

No comments