Apple Newton Utilities Guide de l'utilisateur Page 300

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 942
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 299
CHAPTER 8
Text and Ink Input and Display
8-8 Using Text
Here is an example of a template dening a view of the clEditView class:
editor := {...
viewClass: clEditView,
viewBounds: {left:0, top:0, right:200, bottom:200},
viewFlags: vVisible+vAnythingAllowed,
viewFormat: vfFillWhite+vfFrameBlack+vfPen(1)+
vfLinesLtGray,
viewLineSpacing: 20,
// methods and other view-specific slots
viewSetupFormScript: func()...
...}
System Messages in Automatically Created Views 8
When a child view is automatically created by a clEditView, the vNoScripts
ag is set in the
viewFlags slot of the child view. This ag prevents system
messages from being sent to a view.
This behavior is normally desirable for automatically created views, because they
have no system message-handling methods and the system saves time by not
sending the messages to them.
If you want to use one of these views in a manner that requires it to receive system
messages, you need to remove the
vNoScripts ag from the viewFlags slot of
the view.
Creating the Lined Paper Effect in a Text View 8
A view of the clEditView class can appear simply as a blank area in which the
user writes information. However, this type of view usually contains a series of
horizontal dotted lines, like lined writing paper. The lines indicate to the user that
the view accepts input. To create the lined paper effect, you must set the following
slots appropriately:
viewFormat Must include one of the vfLines ags. This activates the
line display.
viewLineSpacing
Sets the spacing between the lines, in pixels.
viewLinePattern
Optional. Sets a custom pattern that is used to draw the lines
in the view. In the
viewFormat slot editor in NTK, you
must also set the Lines item to Custom to signal that
you are using a custom pattern. (This sets the
vfCustom<<vfLinesShift flag in the viewFormat
slot.)
Patterns are binary data structures, which are described in the
next section.
Vue de la page 299
1 2 ... 295 296 297 298 299 300 301 302 303 304 305 ... 941 942

Commentaires sur ces manuels

Pas de commentaire