Title Banner

Previous Book Contents Book Index Next

Newton Developer Technical Information: Newton Programmer's Guide: 2.1 OS Addendum /
Chapter 11 - Miscellaneous / Reference
Data Structures


Views

A new view slot hilitedData, and the format of clipboard data frames are described in this section.

View Slot

The following view slot is new to Newton 2.1 OS:

Slot description

hilitedData
This slot states whether this view currently has data that can be cut or copied with the global command keys. If a view has this slot with a value of true, it will be sent a *ViewAddDragInfoScript message, when the global command keys are used. If the command was a cut (as opposed to a copy) the view will also be sent a ViewDropRemoveScript message.

Clipboard Data Frame

A clipboard data frame is the frame returned by *GetClipboard, and passed to *SetClipboard. It has the following slots:

Slot descriptions

label
A string; the text displayed by the clipboard item.
types
Array of types arrays, one types array per item in the clipboard item. The number and order of these types arrays must match that of the data arrays in the data slot. Each types array contains symbols representing the types of data in the corresponding data array. Each symbol specifies the type of data in the corresponding element within the data array.
For example, the following 1-element types array describes a clipboard with one item, that can be seen as either a picture or a text:
'[ [text,picture] ]
Note that the nested array is ordered with preferred type first. If the destination view accepts both text and pictures, the text is passed to the destination view.
This next 2-element types array on the other hand, describes a clipboard with two items, a string and a picture:
'[ [text],[picture] ]
The system can display types of 'text, 'polygon, 'ink, and 'picture. The type of data the system requires for these types is listed in Table 11-1.
data
Array of data arrays, one data array per item on the clipboard. The number and order of data arrays, must match the number and order of types arrays in the types slot. Each data array should contain the data corresponding to that type in the array in the types slot. For example the data in clipboardFrame.data[i][j] should be of the type specified by clipboardFrame.types[i][j] .
Each element within the nested arrays can be any NewtonScript object. If you specified a 'text, 'polygon, 'ink, and 'picture data types; these array elements should be frames with the slots listed in Table 11-1.
bounds
A bounds frame; where the data came from in global coordinates.
Table 11-1
typesRequired SlotsOptional slots
'text textany other clParagraphView slots
'polygonpoints
viewBounds
any other clPolygonView slots
'inkink
viewBounds
any other clPolygonView slots
'pictureicon
viewBounds
any other clPictureView slots
Clipboard data types accepted by the system


Subtopics
View Slot
Clipboard Data Frame

Previous Book Contents Book Index Next

© Apple Computer, Inc.
26 APR 1997



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help