Views
A new view slothilitedData
, 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 aViewDropRemoveScript
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
Table 11-1
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 thetypes
slot. For example the data inclipboardFrame.data[i][j]
should be of the type specified byclipboardFrame.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.
Clipboard data types accepted by the system
types Required Slots Optional slots 'text
text
any other clParagraphView
slots'polygon
points
viewBoundsany other clPolygonView
slots'ink
ink
viewBoundsany other clPolygonView
slots'picture
icon
viewBoundsany other clPictureView
slots
Subtopics
- View Slot
- Clipboard Data Frame
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help