MBS CocoaControls Plugin Documentation

MBS CocoaControls Plugin Documentation
MBS CocoaControls Plugin Documentation
Christian Schmitz
July 16, 2017
2
0.1
Introduction
This is the PDF version of the documentation for the Xojo (Real Studio) Plug-in from Monkeybread Software
Germany. Plugin part: MBS CocoaControls Plugin
0.2
Content
• 1 List of all topics
3
• 2 List of all classes
137
• 3 List of all controls
147
• 4 List of all global methods
149
• 5 All items in this plugin
151
• 17 List of Questions in the FAQ
1283
• 18 The FAQ
1293
Chapter 1
List of Topics
• 6 Cocoa Controls
189
– 8.1.1 class Bevelbutton
587
∗ 8.1.3 NSButtonMBS as NSButtonMBS
3
587
4
CHAPTER 1. LIST OF TOPICS
• 6 Cocoa Controls
– 8.2.1 class Checkbox
∗ 8.2.3 NSButtonMBS as NSButtonMBS
– 6.1.1 class ComboBox
∗ 6.1.3 NSComboBoxMBS as NSComboBoxMBS
– 6.2.1 class CustomNSScrollerMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
189
588
588
189
189
190
6.2.3 Constructor
190
6.2.4 Constructor(Handle as Integer)
190
6.2.5 Constructor(left as Double, top as Double, width as Double, height as Double)
190
6.2.6 Destructor
191
6.2.8 acceptsFirstMouse(e as NSEventMBS) as boolean
191
6.2.9 acceptsFirstResponder as boolean
191
6.2.10 becomeFirstResponder as boolean
191
6.2.11 beginGestureWithEvent(e as NSEventMBS) as boolean
191
6.2.12 canBecomeKeyView as boolean
192
6.2.13 Close
192
6.2.14 concludeDragOperation(sender as NSDraggingInfoMBS)
192
6.2.15 draggingEnded(sender as NSDraggingInfoMBS)
193
6.2.16 draggingEntered(sender as NSDraggingInfoMBS) as Integer
193
6.2.17 draggingExited(sender as NSDraggingInfoMBS)
193
6.2.18 draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
194
6.2.19 draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
194
6.2.20 draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
194
6.2.21 draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as
NSPointMBS)
195
6.2.22 draggingSourceOperationMaskForLocal(flag as boolean) as Integer
195
6.2.23 draggingUpdated(sender as NSDraggingInfoMBS) as Integer
196
6.2.24 drawArrow(g as NSGraphicsMBS, Arrow as Integer, highlight as boolean)
196
6.2.25 drawKnob(g as NSGraphicsMBS)
197
6.2.26 drawKnobSlotInRect(g as NSGraphicsMBS, slotRect as NSRectMBS, highlight as
boolean)
197
6.2.27 drawParts(g as NSGraphicsMBS)
197
6.2.28 endGestureWithEvent(e as NSEventMBS) as boolean
197
6.2.29 ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
197
6.2.30 isOpaque as boolean
198
6.2.31 keyDown(e as NSEventMBS) as boolean
198
6.2.32 keyUp(e as NSEventMBS) as boolean
198
5
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.2.33 magnifyWithEvent(e as NSEventMBS) as boolean
198
6.2.34 menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS 198
6.2.35 mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
199
6.2.36 mouseDownCanMoveWindow as boolean
199
6.2.37 mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
199
6.2.38 mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
199
6.2.39 mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
200
6.2.40 mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
200
6.2.41 mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
200
6.2.42 Open
200
6.2.43 otherMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
200
6.2.44 otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
200
6.2.45 otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
201
6.2.46 performDragOperation(sender as NSDraggingInfoMBS) as boolean
201
6.2.47 prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
201
6.2.48 pressureChange(e as NSEventMBS) as boolean
202
6.2.49 resignFirstResponder as boolean
202
6.2.50 rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
202
6.2.51 rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
202
6.2.52 rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
202
6.2.53 rotateWithEvent(e as NSEventMBS) as boolean
203
6.2.54 scrollWheel(e as NSEventMBS) as boolean
203
6.2.55 swipeWithEvent(e as NSEventMBS) as boolean
203
6.2.56 updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
203
6.2.57 viewDidMoveToWindow
204
6.2.58 wantsPeriodicDraggingUpdates as boolean
204
– 6.3.1 class CustomNSSearchFieldMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.3.3 Constructor
6.3.4 Constructor(Handle as Integer)
6.3.5 Constructor(left as Double, top as Double, width as Double, height as Double)
6.3.6 Destructor
6.3.8 acceptsFirstMouse(e as NSEventMBS) as boolean
6.3.9 acceptsFirstResponder as boolean
6.3.10 becomeFirstResponder as boolean
6.3.11 beginGestureWithEvent(e as NSEventMBS) as boolean
6.3.12 canBecomeKeyView as boolean
6.3.13 Close
6.3.14 concludeDragOperation(sender as NSDraggingInfoMBS)
6.3.15 draggingEnded(sender as NSDraggingInfoMBS)
6.3.16 draggingEntered(sender as NSDraggingInfoMBS) as Integer
6.3.17 draggingExited(sender as NSDraggingInfoMBS)
205
205
205
205
206
206
206
206
206
207
207
207
208
208
208
6
CHAPTER 1. LIST OF TOPICS
∗ 6.3.18 draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
209
∗ 6.3.19 draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
209
∗ 6.3.20 draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
209
∗ 6.3.21 draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as
NSPointMBS)
210
∗ 6.3.22 draggingSourceOperationMaskForLocal(flag as boolean) as Integer
210
∗ 6.3.23 draggingUpdated(sender as NSDraggingInfoMBS) as Integer
211
∗ 6.3.24 endGestureWithEvent(e as NSEventMBS) as boolean
211
∗ 6.3.25 ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
212
∗ 6.3.26 isOpaque as boolean
212
∗ 6.3.27 keyDown(e as NSEventMBS) as boolean
212
∗ 6.3.28 keyUp(e as NSEventMBS) as boolean
212
∗ 6.3.29 magnifyWithEvent(e as NSEventMBS) as boolean
213
∗ 6.3.30 menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS 213
∗ 6.3.31 mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
213
∗ 6.3.32 mouseDownCanMoveWindow as boolean
213
∗ 6.3.33 mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
214
∗ 6.3.34 mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
214
∗ 6.3.35 mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
214
∗ 6.3.36 mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
214
∗ 6.3.37 mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
214
∗ 6.3.38 Open
215
∗ 6.3.39 otherMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
215
∗ 6.3.40 otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
215
∗ 6.3.41 otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
215
∗ 6.3.42 performDragOperation(sender as NSDraggingInfoMBS) as boolean
215
∗ 6.3.43 prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
216
∗ 6.3.44 pressureChange(e as NSEventMBS) as boolean
216
∗ 6.3.45 resignFirstResponder as boolean
216
∗ 6.3.46 rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
217
∗ 6.3.47 rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
217
∗ 6.3.48 rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
217
∗ 6.3.49 rotateWithEvent(e as NSEventMBS) as boolean
217
∗ 6.3.50 scrollWheel(e as NSEventMBS) as boolean
217
∗ 6.3.51 swipeWithEvent(e as NSEventMBS) as boolean
218
∗ 6.3.52 updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
218
∗ 6.3.53 viewDidMoveToWindow
218
∗ 6.3.54 wantsPeriodicDraggingUpdates as boolean
219
7
– 6.4.1 class CustomNSTextFieldMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
220
6.4.3 Constructor
220
6.4.4 Constructor(Handle as Integer)
220
6.4.5 Constructor(left as Double, top as Double, width as Double, height as Double)
220
6.4.6 Destructor
221
6.4.8 acceptsFirstMouse(e as NSEventMBS) as boolean
221
6.4.9 acceptsFirstResponder as boolean
221
6.4.10 becomeFirstResponder as boolean
221
6.4.11 beginGestureWithEvent(e as NSEventMBS) as boolean
221
6.4.12 canBecomeKeyView as boolean
222
6.4.13 Close
222
6.4.14 concludeDragOperation(sender as NSDraggingInfoMBS)
222
6.4.15 draggingEnded(sender as NSDraggingInfoMBS)
223
6.4.16 draggingEntered(sender as NSDraggingInfoMBS) as Integer
223
6.4.17 draggingExited(sender as NSDraggingInfoMBS)
223
6.4.18 draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
224
6.4.19 draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
224
6.4.20 draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
224
6.4.21 draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as
NSPointMBS)
225
6.4.22 draggingSourceOperationMaskForLocal(flag as boolean) as Integer
225
6.4.23 draggingUpdated(sender as NSDraggingInfoMBS) as Integer
226
6.4.24 endGestureWithEvent(e as NSEventMBS) as boolean
226
6.4.25 ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
227
6.4.26 isOpaque as boolean
227
6.4.27 keyDown(e as NSEventMBS) as boolean
227
6.4.28 keyUp(e as NSEventMBS) as boolean
227
6.4.29 magnifyWithEvent(e as NSEventMBS) as boolean
228
6.4.30 menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS 228
6.4.31 mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
228
6.4.32 mouseDownCanMoveWindow as boolean
228
6.4.33 mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
229
6.4.34 mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
229
6.4.35 mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
229
6.4.36 mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
229
6.4.37 mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
229
6.4.38 Open
230
6.4.39 otherMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
230
8
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.4.40
6.4.41
6.4.42
6.4.43
6.4.44
6.4.45
6.4.46
6.4.47
6.4.48
6.4.49
6.4.50
6.4.51
6.4.52
6.4.53
6.4.54
otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
performDragOperation(sender as NSDraggingInfoMBS) as boolean
prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
pressureChange(e as NSEventMBS) as boolean
resignFirstResponder as boolean
rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
rotateWithEvent(e as NSEventMBS) as boolean
scrollWheel(e as NSEventMBS) as boolean
swipeWithEvent(e as NSEventMBS) as boolean
updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
viewDidMoveToWindow
wantsPeriodicDraggingUpdates as boolean
– 6.5.1 class CustomNSTextViewMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
230
230
230
231
231
231
232
232
232
232
232
233
233
233
234
235
6.5.3 Constructor
235
6.5.4 Constructor(Handle as Integer)
235
6.5.5 Constructor(left as Double, top as Double, width as Double, height as Double)
235
6.5.6 Destructor
236
6.5.8 acceptsFirstMouse(e as NSEventMBS) as boolean
236
6.5.9 acceptsFirstResponder as boolean
236
6.5.10 becomeFirstResponder as boolean
236
6.5.11 beginGestureWithEvent(e as NSEventMBS) as boolean
236
6.5.12 canBecomeKeyView as boolean
237
6.5.13 Close
237
6.5.14 concludeDragOperation(sender as NSDraggingInfoMBS)
237
6.5.15 draggingEnded(sender as NSDraggingInfoMBS)
238
6.5.16 draggingEntered(sender as NSDraggingInfoMBS) as Integer
238
6.5.17 draggingExited(sender as NSDraggingInfoMBS)
238
6.5.18 draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
239
6.5.19 draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
239
6.5.20 draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
239
6.5.21 draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as
NSPointMBS)
240
6.5.22 draggingSourceOperationMaskForLocal(flag as boolean) as Integer
240
6.5.23 draggingUpdated(sender as NSDraggingInfoMBS) as Integer
241
6.5.24 endGestureWithEvent(e as NSEventMBS) as boolean
241
9
∗ 6.5.25 ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
242
∗ 6.5.26 isOpaque as boolean
242
∗ 6.5.27 keyDown(e as NSEventMBS) as boolean
242
∗ 6.5.28 keyUp(e as NSEventMBS) as boolean
242
∗ 6.5.29 magnifyWithEvent(e as NSEventMBS) as boolean
243
∗ 6.5.30 menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS 243
∗ 6.5.31 mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
243
∗ 6.5.32 mouseDownCanMoveWindow as boolean
243
∗ 6.5.33 mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
244
∗ 6.5.34 mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
244
∗ 6.5.35 mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
244
∗ 6.5.36 mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
244
∗ 6.5.37 mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
244
∗ 6.5.38 Open
245
∗ 6.5.39 otherMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
245
∗ 6.5.40 otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
245
∗ 6.5.41 otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
245
∗ 6.5.42 performDragOperation(sender as NSDraggingInfoMBS) as boolean
245
∗ 6.5.43 prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
246
∗ 6.5.44 pressureChange(e as NSEventMBS) as boolean
246
∗ 6.5.45 resignFirstResponder as boolean
246
∗ 6.5.46 rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
247
∗ 6.5.47 rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
247
∗ 6.5.48 rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
247
∗ 6.5.49 rotateWithEvent(e as NSEventMBS) as boolean
247
∗ 6.5.50 scrollWheel(e as NSEventMBS) as boolean
247
∗ 6.5.51 swipeWithEvent(e as NSEventMBS) as boolean
248
∗ 6.5.52 updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
248
∗ 6.5.53 viewDidMoveToWindow
248
∗ 6.5.54 wantsPeriodicDraggingUpdates as boolean
249
10
CHAPTER 1. LIST OF TOPICS
• 5 Cocoa
151
– 6.6.1 class CustomNSTokenFieldMBS
∗
∗
∗
∗
6.6.8 acceptsFirstMouse(e as NSEventMBS) as boolean
6.6.12 canBecomeKeyView as boolean
6.6.32 mouseDownCanMoveWindow as boolean
6.6.53 viewDidMoveToWindow
250
251
252
258
263
11
• 6 Cocoa Controls
– 6.6.1 class CustomNSTokenFieldMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
189
250
6.6.3 Constructor
250
6.6.4 Constructor(Handle as Integer)
250
6.6.5 Constructor(left as Double, top as Double, width as Double, height as Double)
250
6.6.6 Destructor
251
6.6.9 acceptsFirstResponder as boolean
251
6.6.10 becomeFirstResponder as boolean
251
6.6.11 beginGestureWithEvent(e as NSEventMBS) as boolean
251
6.6.13 Close
252
6.6.14 concludeDragOperation(sender as NSDraggingInfoMBS)
252
6.6.15 draggingEnded(sender as NSDraggingInfoMBS)
253
6.6.16 draggingEntered(sender as NSDraggingInfoMBS) as Integer
253
6.6.17 draggingExited(sender as NSDraggingInfoMBS)
253
6.6.18 draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
254
6.6.19 draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
254
6.6.20 draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
254
6.6.21 draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as
NSPointMBS)
255
6.6.22 draggingSourceOperationMaskForLocal(flag as boolean) as Integer
255
6.6.23 draggingUpdated(sender as NSDraggingInfoMBS) as Integer
256
6.6.24 endGestureWithEvent(e as NSEventMBS) as boolean
256
6.6.25 ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
257
6.6.26 isOpaque as boolean
257
6.6.27 keyDown(e as NSEventMBS) as boolean
257
6.6.28 keyUp(e as NSEventMBS) as boolean
257
6.6.29 magnifyWithEvent(e as NSEventMBS) as boolean
258
6.6.30 menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS 258
6.6.31 mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
258
6.6.33 mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.34 mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.35 mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.36 mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.37 mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.38 Open
260
6.6.39 otherMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
260
6.6.40 otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
260
6.6.41 otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
260
12
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.6.42
6.6.43
6.6.44
6.6.45
6.6.46
6.6.47
6.6.48
6.6.49
6.6.50
6.6.51
6.6.52
6.6.54
performDragOperation(sender as NSDraggingInfoMBS) as boolean
prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
pressureChange(e as NSEventMBS) as boolean
resignFirstResponder as boolean
rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
rotateWithEvent(e as NSEventMBS) as boolean
scrollWheel(e as NSEventMBS) as boolean
swipeWithEvent(e as NSEventMBS) as boolean
updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
wantsPeriodicDraggingUpdates as boolean
260
261
261
261
262
262
262
262
262
263
263
264
13
• 5 Cocoa
151
– 6.6.1 class CustomNSTokenFieldMBS
∗
∗
∗
∗
6.6.8 acceptsFirstMouse(e as NSEventMBS) as boolean
6.6.12 canBecomeKeyView as boolean
6.6.32 mouseDownCanMoveWindow as boolean
6.6.53 viewDidMoveToWindow
250
251
252
258
263
14
CHAPTER 1. LIST OF TOPICS
• 6 Cocoa Controls
– 6.6.1 class CustomNSTokenFieldMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
189
250
6.6.3 Constructor
250
6.6.4 Constructor(Handle as Integer)
250
6.6.5 Constructor(left as Double, top as Double, width as Double, height as Double)
250
6.6.6 Destructor
251
6.6.9 acceptsFirstResponder as boolean
251
6.6.10 becomeFirstResponder as boolean
251
6.6.11 beginGestureWithEvent(e as NSEventMBS) as boolean
251
6.6.13 Close
252
6.6.14 concludeDragOperation(sender as NSDraggingInfoMBS)
252
6.6.15 draggingEnded(sender as NSDraggingInfoMBS)
253
6.6.16 draggingEntered(sender as NSDraggingInfoMBS) as Integer
253
6.6.17 draggingExited(sender as NSDraggingInfoMBS)
253
6.6.18 draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
254
6.6.19 draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
254
6.6.20 draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
254
6.6.21 draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as
NSPointMBS)
255
6.6.22 draggingSourceOperationMaskForLocal(flag as boolean) as Integer
255
6.6.23 draggingUpdated(sender as NSDraggingInfoMBS) as Integer
256
6.6.24 endGestureWithEvent(e as NSEventMBS) as boolean
256
6.6.25 ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
257
6.6.26 isOpaque as boolean
257
6.6.27 keyDown(e as NSEventMBS) as boolean
257
6.6.28 keyUp(e as NSEventMBS) as boolean
257
6.6.29 magnifyWithEvent(e as NSEventMBS) as boolean
258
6.6.30 menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS 258
6.6.31 mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
258
6.6.33 mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.34 mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.35 mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.36 mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.37 mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.38 Open
260
6.6.39 otherMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
260
6.6.40 otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
260
6.6.41 otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
260
15
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.6.42
6.6.43
6.6.44
6.6.45
6.6.46
6.6.47
6.6.48
6.6.49
6.6.50
6.6.51
6.6.52
6.6.54
performDragOperation(sender as NSDraggingInfoMBS) as boolean
prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
pressureChange(e as NSEventMBS) as boolean
resignFirstResponder as boolean
rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
rotateWithEvent(e as NSEventMBS) as boolean
scrollWheel(e as NSEventMBS) as boolean
swipeWithEvent(e as NSEventMBS) as boolean
updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
wantsPeriodicDraggingUpdates as boolean
260
261
261
261
262
262
262
262
262
263
263
264
16
CHAPTER 1. LIST OF TOPICS
• 5 Cocoa
151
– 6.6.1 class CustomNSTokenFieldMBS
∗
∗
∗
∗
6.6.8 acceptsFirstMouse(e as NSEventMBS) as boolean
6.6.12 canBecomeKeyView as boolean
6.6.32 mouseDownCanMoveWindow as boolean
6.6.53 viewDidMoveToWindow
250
251
252
258
263
17
• 6 Cocoa Controls
– 6.6.1 class CustomNSTokenFieldMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
189
250
6.6.3 Constructor
250
6.6.4 Constructor(Handle as Integer)
250
6.6.5 Constructor(left as Double, top as Double, width as Double, height as Double)
250
6.6.6 Destructor
251
6.6.9 acceptsFirstResponder as boolean
251
6.6.10 becomeFirstResponder as boolean
251
6.6.11 beginGestureWithEvent(e as NSEventMBS) as boolean
251
6.6.13 Close
252
6.6.14 concludeDragOperation(sender as NSDraggingInfoMBS)
252
6.6.15 draggingEnded(sender as NSDraggingInfoMBS)
253
6.6.16 draggingEntered(sender as NSDraggingInfoMBS) as Integer
253
6.6.17 draggingExited(sender as NSDraggingInfoMBS)
253
6.6.18 draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
254
6.6.19 draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
254
6.6.20 draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
254
6.6.21 draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as
NSPointMBS)
255
6.6.22 draggingSourceOperationMaskForLocal(flag as boolean) as Integer
255
6.6.23 draggingUpdated(sender as NSDraggingInfoMBS) as Integer
256
6.6.24 endGestureWithEvent(e as NSEventMBS) as boolean
256
6.6.25 ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
257
6.6.26 isOpaque as boolean
257
6.6.27 keyDown(e as NSEventMBS) as boolean
257
6.6.28 keyUp(e as NSEventMBS) as boolean
257
6.6.29 magnifyWithEvent(e as NSEventMBS) as boolean
258
6.6.30 menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS 258
6.6.31 mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
258
6.6.33 mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.34 mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.35 mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.36 mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.37 mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.38 Open
260
6.6.39 otherMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
260
6.6.40 otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
260
6.6.41 otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
260
18
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.6.42
6.6.43
6.6.44
6.6.45
6.6.46
6.6.47
6.6.48
6.6.49
6.6.50
6.6.51
6.6.52
6.6.54
performDragOperation(sender as NSDraggingInfoMBS) as boolean
prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
pressureChange(e as NSEventMBS) as boolean
resignFirstResponder as boolean
rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
rotateWithEvent(e as NSEventMBS) as boolean
scrollWheel(e as NSEventMBS) as boolean
swipeWithEvent(e as NSEventMBS) as boolean
updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
wantsPeriodicDraggingUpdates as boolean
260
261
261
261
262
262
262
262
262
263
263
264
19
• 5 Cocoa
151
– 6.6.1 class CustomNSTokenFieldMBS
∗
∗
∗
∗
6.6.8 acceptsFirstMouse(e as NSEventMBS) as boolean
6.6.12 canBecomeKeyView as boolean
6.6.32 mouseDownCanMoveWindow as boolean
6.6.53 viewDidMoveToWindow
250
251
252
258
263
20
CHAPTER 1. LIST OF TOPICS
• 6 Cocoa Controls
– 6.6.1 class CustomNSTokenFieldMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
189
250
6.6.3 Constructor
250
6.6.4 Constructor(Handle as Integer)
250
6.6.5 Constructor(left as Double, top as Double, width as Double, height as Double)
250
6.6.6 Destructor
251
6.6.9 acceptsFirstResponder as boolean
251
6.6.10 becomeFirstResponder as boolean
251
6.6.11 beginGestureWithEvent(e as NSEventMBS) as boolean
251
6.6.13 Close
252
6.6.14 concludeDragOperation(sender as NSDraggingInfoMBS)
252
6.6.15 draggingEnded(sender as NSDraggingInfoMBS)
253
6.6.16 draggingEntered(sender as NSDraggingInfoMBS) as Integer
253
6.6.17 draggingExited(sender as NSDraggingInfoMBS)
253
6.6.18 draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
254
6.6.19 draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
254
6.6.20 draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
254
6.6.21 draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as
NSPointMBS)
255
6.6.22 draggingSourceOperationMaskForLocal(flag as boolean) as Integer
255
6.6.23 draggingUpdated(sender as NSDraggingInfoMBS) as Integer
256
6.6.24 endGestureWithEvent(e as NSEventMBS) as boolean
256
6.6.25 ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
257
6.6.26 isOpaque as boolean
257
6.6.27 keyDown(e as NSEventMBS) as boolean
257
6.6.28 keyUp(e as NSEventMBS) as boolean
257
6.6.29 magnifyWithEvent(e as NSEventMBS) as boolean
258
6.6.30 menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS 258
6.6.31 mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
258
6.6.33 mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.34 mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.35 mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.36 mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.37 mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
259
6.6.38 Open
260
6.6.39 otherMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
260
6.6.40 otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
260
6.6.41 otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
260
21
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.6.42
6.6.43
6.6.44
6.6.45
6.6.46
6.6.47
6.6.48
6.6.49
6.6.50
6.6.51
6.6.52
6.6.54
performDragOperation(sender as NSDraggingInfoMBS) as boolean
prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
pressureChange(e as NSEventMBS) as boolean
resignFirstResponder as boolean
rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
rotateWithEvent(e as NSEventMBS) as boolean
scrollWheel(e as NSEventMBS) as boolean
swipeWithEvent(e as NSEventMBS) as boolean
updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
wantsPeriodicDraggingUpdates as boolean
260
261
261
261
262
262
262
262
262
263
263
264
22
CHAPTER 1. LIST OF TOPICS
• 5 Cocoa
151
– 5.1.1 class CustomNSToolbarItemMBS
∗
∗
∗
∗
∗
5.1.3
5.1.4
5.1.6
5.1.7
5.1.8
Constructor(itemIdentifier as string)
Destructor
Action
allowsDuplicatesInToolbar as boolean
validate as boolean
– 5.2.1 class CustomNSToolbarMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
151
151
151
152
152
152
153
5.2.3 Constructor(Identifier as string)
153
5.2.4 Destructor
153
5.2.6 allowsSizeMode(mode as Integer, SuperAllows as boolean) as boolean
153
5.2.7 itemForItemIdentifier(identifier as string, willBeInsertedIntoToolbar as boolean) as NSToolbarItemMBS
154
5.2.8 toolbarAllowedItemIdentifiers as string()
154
5.2.9 toolbarDefaultItemIdentifiers as string()
155
5.2.10 toolbarDidRemoveItem(item as NSToolbarItemMBS, notification as NSNotificationMBS)
155
5.2.11 toolbarItemAction(item as NSToolbarItemMBS)
155
5.2.12 toolbarItemAllowsDuplicatesInToolbar(item as NSToolbarItemMBS) as boolean 156
5.2.13 toolbarItemValidate(item as NSToolbarItemMBS) as boolean
156
5.2.14 toolbarSelectableItemIdentifiers as string()
156
5.2.15 toolbarWillAddItem(item as NSToolbarItemMBS, notification as NSNotificationMBS)
157
23
• 6 Cocoa Controls
– 6.7.1 class CustomNSViewMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
189
265
6.7.3 Constructor
265
6.7.4 Constructor(Handle as Integer)
265
6.7.5 Constructor(left as Double, top as Double, width as Double, height as Double)
265
6.7.6 Destructor
266
6.7.8 acceptsFirstMouse(e as NSEventMBS) as boolean
266
6.7.9 acceptsFirstResponder as boolean
266
6.7.10 becomeFirstResponder as boolean
266
6.7.11 beginGestureWithEvent(e as NSEventMBS) as boolean
266
6.7.12 canBecomeKeyView as boolean
267
6.7.13 Close
267
6.7.14 concludeDragOperation(sender as NSDraggingInfoMBS)
267
6.7.15 draggingEnded(sender as NSDraggingInfoMBS)
268
6.7.16 draggingEntered(sender as NSDraggingInfoMBS) as Integer
268
6.7.17 draggingExited(sender as NSDraggingInfoMBS)
268
6.7.18 draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
269
6.7.19 draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
269
6.7.20 draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
269
6.7.21 draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as
NSPointMBS)
270
6.7.22 draggingSourceOperationMaskForLocal(flag as boolean) as Integer
270
6.7.23 draggingUpdated(sender as NSDraggingInfoMBS) as Integer
271
6.7.24 drawFocusRingMask(g as NSGraphicsMBS) as boolean
271
6.7.25 DrawRect(g as NSGraphicsMBS, left as Double, top as Double, width as Double, height
as Double)
272
6.7.26 endGestureWithEvent(e as NSEventMBS) as boolean
272
6.7.27 focusRingMaskBounds as NSRectMBS
272
6.7.28 ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
273
6.7.29 isFlipped as Boolean
273
6.7.30 isOpaque as boolean
273
6.7.31 keyDown(e as NSEventMBS) as boolean
273
6.7.32 keyUp(e as NSEventMBS) as boolean
274
6.7.33 magnifyWithEvent(e as NSEventMBS) as boolean
274
6.7.34 menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS 274
6.7.35 mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
275
6.7.36 mouseDownCanMoveWindow as boolean
275
6.7.37 mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
275
24
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.7.38
6.7.39
6.7.40
6.7.41
6.7.42
6.7.43
6.7.44
6.7.45
6.7.46
6.7.47
6.7.48
6.7.49
6.7.50
6.7.51
6.7.52
6.7.53
6.7.54
6.7.55
6.7.56
6.7.57
6.7.58
mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Open
otherMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
performDragOperation(sender as NSDraggingInfoMBS) as boolean
prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
pressureChange(e as NSEventMBS) as boolean
resignFirstResponder as boolean
rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
rotateWithEvent(e as NSEventMBS) as boolean
scrollWheel(e as NSEventMBS) as boolean
swipeWithEvent(e as NSEventMBS) as boolean
updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
viewDidMoveToWindow
wantsPeriodicDraggingUpdates as boolean
275
275
276
276
276
276
276
277
277
277
278
278
278
278
278
278
279
279
279
280
280
25
• 13 PDFKit
– 13.1.1 class CustomPDFViewMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
1095
1095
13.1.3 Constructor
1095
13.1.4 Constructor(Handle as Integer)
1095
13.1.5 Constructor(left as Double, top as Double, width as Double, height as Double) 1096
13.1.6 Destructor
1096
13.1.8 acceptsFirstMouse(e as NSEventMBS) as boolean
1096
13.1.9 acceptsFirstResponder as boolean
1096
13.1.10 AfterDrawPage(graphics as NSGraphicsMBS, page as PDFPageMBS)
1097
13.1.11 AfterDrawPagePost(graphics as NSGraphicsMBS, page as PDFPageMBS)
1097
13.1.12 AfterDrawRect(graphics as NSGraphicsMBS, x as Double, y as Double, w as Double,
h as Double)
1097
13.1.13 becomeFirstResponder as boolean
1097
13.1.14 BeforeDrawPage(graphics as NSGraphicsMBS, page as PDFPageMBS) as boolean
1098
13.1.15 BeforeDrawPagePost(graphics as NSGraphicsMBS, page as PDFPageMBS) as boolean
1098
13.1.16 BeforeDrawRect(graphics as NSGraphicsMBS, x as Double, y as Double, w as Double,
h as Double) as boolean
1098
13.1.17 beginGestureWithEvent(e as NSEventMBS) as boolean
1098
13.1.18 canBecomeKeyView as boolean
1099
13.1.19 Close
1099
13.1.20 concludeDragOperation(sender as NSDraggingInfoMBS)
1099
13.1.21 draggingEnded(sender as NSDraggingInfoMBS)
1099
13.1.22 draggingEntered(sender as NSDraggingInfoMBS) as Integer
1100
13.1.23 draggingExited(sender as NSDraggingInfoMBS)
1100
13.1.24 draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
1101
13.1.25 draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
1101
13.1.26 draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
1101
13.1.27 draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as
NSPointMBS)
1102
13.1.28 draggingSourceOperationMaskForLocal(flag as boolean) as Integer
1102
13.1.29 draggingUpdated(sender as NSDraggingInfoMBS) as Integer
1102
13.1.30 endGestureWithEvent(e as NSEventMBS) as boolean
1103
13.1.31 ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
1103
13.1.32 isOpaque as boolean
1104
13.1.33 keyDown(e as NSEventMBS) as boolean
1104
13.1.34 keyUp(e as NSEventMBS) as boolean
1104
26
CHAPTER 1. LIST OF TOPICS
∗ 13.1.35 magnifyWithEvent(e as NSEventMBS) as boolean
1104
∗ 13.1.36 menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS
1104
∗ 13.1.37 mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
1105
∗ 13.1.38 mouseDownCanMoveWindow as boolean
1105
∗ 13.1.39 mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
1105
∗ 13.1.40 mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
1106
∗ 13.1.41 mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
1106
∗ 13.1.42 mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
1106
∗ 13.1.43 mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
1106
∗ 13.1.44 Open
1106
∗ 13.1.45 otherMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
1106
∗ 13.1.46 otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean 1107
∗ 13.1.47 otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
1107
∗ 13.1.48 performDragOperation(sender as NSDraggingInfoMBS) as boolean
1107
∗ 13.1.49 prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
1108
∗ 13.1.50 pressureChange(e as NSEventMBS) as boolean
1108
∗ 13.1.51 resignFirstResponder as boolean
1108
∗ 13.1.52 rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
1108
∗ 13.1.53 rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean 1108
∗ 13.1.54 rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
1109
∗ 13.1.55 rotateWithEvent(e as NSEventMBS) as boolean
1109
∗ 13.1.56 scrollWheel(e as NSEventMBS) as boolean
1109
∗ 13.1.57 swipeWithEvent(e as NSEventMBS) as boolean
1109
∗ 13.1.58 updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
1110
∗ 13.1.59 viewDidMoveToWindow
1110
∗ 13.1.60 wantsPeriodicDraggingUpdates as boolean
1110
27
• 6 Cocoa Controls
– 6.8.1 class DisclosureTriangle
∗ 6.8.3 NSButtonMBS as NSButtonMBS
189
281
281
28
CHAPTER 1. LIST OF TOPICS
• 11 HTMLViewer Mac
– 11.1.1 class DOMAbstractViewMBS
∗ 11.1.3 document as DOMDocumentMBS
– 11.2.1 class DOMAttrMBS
∗
∗
∗
∗
11.2.3
11.2.4
11.2.5
11.2.7
name as String
ownerElement as DOMElementMBS
specified as boolean
value as String
– 11.4.1 class DOMCharacterDataMBS
∗
∗
∗
∗
∗
∗
∗
11.4.3 appendData(arg as string)
11.4.4 deleteData(offset as Integer, count as Integer)
11.4.5 insertData(offset as Integer, arg as string)
11.4.6 length as Integer
11.4.7 replaceData(offset as Integer, count as Integer, arg as string)
11.4.8 substringData(offset as Integer, count as Integer) as string
11.4.10 data as string
– 11.6.1 class DOMCounterMBS
∗ 11.6.3 identifier as String
∗ 11.6.4 listStyle as String
∗ 11.6.5 separator as String
– 11.7.1 class DOMCSSCharsetRuleMBS
∗ 11.7.3 encoding as String
– 11.8.1 class DOMCSSFontFaceRuleMBS
∗ 11.8.3 style as DOMCSSStyleDeclarationMBS
– 11.9.1 class DOMCSSImportRuleMBS
∗ 11.9.3 href as String
∗ 11.9.4 media as DOMMediaListMBS
∗ 11.9.5 styleSheet as DOMCSSStyleSheetMBS
– 11.10.1 class DOMCSSMediaRuleMBS
∗
∗
∗
∗
11.10.3
11.10.4
11.10.5
11.10.6
cssRules as DOMCSSRuleListMBS
deleteRule(index as Integer)
insertRule(rule as string, index as Integer) as Integer
media as DOMMediaListMBS
– 11.11.1 class DOMCSSPageRuleMBS
∗ 11.11.3 style as DOMCSSStyleDeclarationMBS
∗ 11.11.5 selectorText as String
– 11.12.1 class DOMCSSPrimitiveValueMBS
∗ 11.12.3 getCounterValue as DOMCounterMBS
∗ 11.12.4 getRectValue as DOMRectMBS
731
731
731
732
732
732
732
732
735
735
735
735
735
736
736
736
738
738
738
738
739
739
740
740
741
741
741
741
742
742
742
742
742
743
743
743
744
744
744
29
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.12.5 getRGBColorValue as DOMRGBColorMBS
11.12.6 getStringValue as String
11.12.7 primitiveType as Integer
11.12.8 setStringValue(StringType as Integer, StringValue as string)
11.12.10 getFloatValue(unitType as Integer) as single
11.12.12 DOM CSS ATTR = 22
11.12.13 DOM CSS CM = 6
11.12.14 DOM CSS COUNTER = 23
11.12.15 DOM CSS DEG = 11
11.12.16 DOM CSS DIMENSION = 18
11.12.17 DOM CSS EMS = 3
11.12.18 DOM CSS EXS = 4
11.12.19 DOM CSS GRAD = 13
11.12.20 DOM CSS HZ = 16
11.12.21 DOM CSS IDENT = 21
11.12.22 DOM CSS IN = 8
11.12.23 DOM CSS KHZ = 17
11.12.24 DOM CSS MM = 7
11.12.25 DOM CSS MS = 14
11.12.26 DOM CSS NUMBER = 1
11.12.27 DOM CSS PC = 10
11.12.28 DOM CSS PERCENTAGE = 2
11.12.29 DOM CSS PT = 9
11.12.30 DOM CSS PX = 5
11.12.31 DOM CSS RAD = 12
11.12.32 DOM CSS RECT = 24
11.12.33 DOM CSS RGBCOLOR = 25
11.12.34 DOM CSS S = 15
11.12.35 DOM CSS STRING = 19
11.12.36 DOM CSS UNKNOWN = 0
11.12.37 DOM CSS URI = 20
– 11.13.1 class DOMCSSRuleListMBS
∗ 11.13.3 item(index as UInt32) as DOMCSSRuleMBS
∗ 11.13.4 length as Integer
– 11.14.1 class DOMCSSRuleMBS
∗
∗
∗
∗
∗
∗
11.14.3 parentRule as DOMCSSRuleMBS
11.14.4 parentStyleSheet as DOMCSSStyleSheetMBS
11.14.5 type as Integer
11.14.7 cssText as String
11.14.9 DOM CHARSET RULE = 2
11.14.10 DOM IMPORT RULE = 3
744
744
745
745
745
745
745
745
746
746
746
746
746
746
746
746
747
747
747
747
747
747
747
747
748
748
748
748
748
748
748
749
749
749
750
750
750
750
750
751
751
30
CHAPTER 1. LIST OF TOPICS
∗ 11.14.11 DOM MEDIA RULE = 4
∗ 11.14.12 DOM STYLE RULE = 1
∗ 11.14.13 DOM UNKNOWN RULE = 0
751
751
751
– 11.15.1 class DOMCSSStyleDeclarationMBS
752
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.15.3 Constructor
11.15.4 getPropertyCSSValue(propertyName as string) as DOMCSSValueMBS
11.15.5 getPropertyPriority(propertyName as string) as string
11.15.6 getPropertyValue(propertyName as string) as string
11.15.7 item(index as UInt32) as string
11.15.8 length as Integer
11.15.9 parentRule as DOMCSSRuleMBS
11.15.10 removeProperty(propertyName as string) as string
11.15.11 setProperty(propertyName as string, value as string, priority as string)
11.15.13 azimuth as String
11.15.14 background as String
11.15.15 backgroundAttachment as String
11.15.16 backgroundColor as String
11.15.17 backgroundImage as String
11.15.18 backgroundPosition as String
11.15.19 backgroundRepeat as String
11.15.20 border as String
11.15.21 borderBottom as String
11.15.22 borderBottomColor as String
11.15.23 borderBottomStyle as String
11.15.24 borderBottomWidth as String
11.15.25 borderCollapse as String
11.15.26 borderColor as String
11.15.27 borderLeft as String
11.15.28 borderLeftColor as String
11.15.29 borderLeftStyle as String
11.15.30 borderLeftWidth as String
11.15.31 borderRight as String
11.15.32 borderRightColor as String
11.15.33 borderRightStyle as String
11.15.34 borderRightWidth as String
11.15.35 borderSpacing as String
11.15.36 borderStyle as String
11.15.37 borderTop as String
11.15.38 borderTopColor as String
11.15.39 borderTopStyle as String
11.15.40 borderTopWidth as String
752
752
752
752
753
753
753
753
753
753
754
754
754
754
754
754
755
755
755
755
755
755
756
756
756
756
756
756
757
757
757
757
757
757
758
758
758
31
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.15.41
11.15.42
11.15.43
11.15.44
11.15.45
11.15.46
11.15.47
11.15.48
11.15.49
11.15.50
11.15.51
11.15.52
11.15.53
11.15.54
11.15.55
11.15.56
11.15.57
11.15.58
11.15.59
11.15.60
11.15.61
11.15.62
11.15.63
11.15.64
11.15.65
11.15.66
11.15.67
11.15.68
11.15.69
11.15.70
11.15.71
11.15.72
11.15.73
11.15.74
11.15.75
11.15.76
11.15.77
11.15.78
11.15.79
11.15.80
11.15.81
11.15.82
borderWidth as String
bottom as String
captionSide as String
clear as String
clip as String
colorValue as String
content as String
counterIncrement as String
counterReset as String
cssFloat as String
cssText as String
cue as String
cueAfter as String
cueBefore as String
cursor as String
direction as String
display as String
elevation as String
emptyCells as String
font as String
fontFamily as String
fontSize as String
fontSizeAdjust as String
fontStretch as String
fontStyle as String
fontVariant as String
fontWeight as String
height as String
left as String
letterSpacing as String
lineHeight as String
listStyle as String
listStyleImage as String
listStylePosition as String
listStyleType as String
margin as String
marginBottom as String
marginLeft as String
marginRight as String
marginTop as String
markerOffset as String
marks as String
758
758
758
759
759
759
759
759
759
760
760
760
760
760
760
761
761
761
761
761
761
762
762
762
762
762
762
763
763
763
763
763
763
764
764
764
764
764
764
765
765
765
32
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.15.83 maxHeight as String
11.15.84 maxWidth as String
11.15.85 minHeight as String
11.15.86 minWidth as String
11.15.87 orphans as String
11.15.88 outline as String
11.15.89 outlineColor as String
11.15.90 outlineStyle as String
11.15.91 outlineWidth as String
11.15.92 overflow as String
11.15.93 padding as String
11.15.94 paddingBottom as String
11.15.95 paddingLeft as String
11.15.96 paddingRight as String
11.15.97 paddingTop as String
11.15.98 page as String
11.15.99 pageBreakAfter as String
11.15.100 pageBreakBefore as String
11.15.101 pageBreakInside as String
11.15.102 pause as String
11.15.103 pauseAfter as String
11.15.104 pauseBefore as String
11.15.105 pitch as String
11.15.106 pitchRange as String
11.15.107 playDuring as String
11.15.108 position as String
11.15.109 quotes as String
11.15.110 richness as String
11.15.111 right as String
11.15.112 size as String
11.15.113 speak as String
11.15.114 speakHeader as String
11.15.115 speakNumeral as String
11.15.116 speakPunctuation as String
11.15.117 speechRate as String
11.15.118 stress as String
11.15.119 tableLayout as String
11.15.120 textAlign as String
11.15.121 textDecoration as String
11.15.122 textIndent as String
11.15.123 textShadow as String
11.15.124 textTransform as String
765
765
765
766
766
766
766
766
766
767
767
767
767
767
767
768
768
768
768
768
768
769
769
769
769
769
769
770
770
770
770
770
770
771
771
771
771
771
771
772
772
772
33
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.15.125
11.15.126
11.15.127
11.15.128
11.15.129
11.15.130
11.15.131
11.15.132
11.15.133
11.15.134
11.15.135
top as String
unicodeBidi as String
verticalAlign as String
visibility as String
voiceFamily as String
volume as String
whiteSpace as String
widows as String
width as String
wordSpacing as String
zIndex as String
– 11.16.1 class DOMCSSStyleRuleMBS
∗ 11.16.3 style as DOMCSSStyleDeclarationMBS
∗ 11.16.5 selectorText as String
– 11.17.1 class DOMCSSStyleSheetMBS
∗
∗
∗
∗
11.17.3
11.17.4
11.17.5
11.17.6
cssRules as DOMCSSRuleListMBS
deleteRule(index as Integer)
insertRule(rule as string, index as Integer) as Integer
ownerRule as DOMCSSRuleMBS
– 11.19.1 class DOMCSSValueListMBS
∗ 11.19.3 item(index as UInt32) as DOMCSSValueMBS
∗ 11.19.4 length as Integer
– 11.20.1 class DOMCSSValueMBS
∗
∗
∗
∗
∗
∗
11.20.3 cssValueType as Integer
11.20.5 cssText as String
11.20.7 DOM CSS CUSTOM = 3
11.20.8 DOM CSS INHERIT = 0
11.20.9 DOM CSS PRIMITIVE VALUE = 1
11.20.10 DOM CSS VALUE LIST = 2
– 11.22.1 class DOMDocumentMBS
772
772
772
773
773
773
773
773
773
774
774
775
775
775
776
776
776
776
776
778
778
778
779
779
779
779
780
780
780
782
∗ 11.22.3 createAttribute(name as string) as DOMAttrMBS
782
∗ 11.22.4 createAttributeNS(namespaceURI as string, qualifiedName as string) as DOMAttrMBS
782
∗ 11.22.5 createCDATASection(data as string) as DOMCDATASectionMBS
782
∗ 11.22.6 createComment(data as string) as DOMCommentMBS
782
∗ 11.22.7 createCSSStyleDeclaration as DOMCSSStyleDeclarationMBS
783
∗ 11.22.8 createDocumentFragment as DOMDocumentFragmentMBS
783
∗ 11.22.9 createElement(tagName as string) as DOMElementMBS
783
∗ 11.22.10 createElementNS(namespaceURI as string, qualifiedName as string) as DOMElementMBS
783
∗ 11.22.11 createEntityReference(name as string) as DOMEntityReferenceMBS
783
34
CHAPTER 1. LIST OF TOPICS
∗ 11.22.12 createProcessingInstruction(target as string, data as string) as DOMProcessingInstructionMBS
783
∗ 11.22.13 createRange as DOMRangeMBS
784
∗ 11.22.14 createTextNode(data as string) as DOMTextMBS
784
∗ 11.22.15 defaultView as DOMAbstractViewMBS
784
∗ 11.22.16 doctype as DOMDocumentTypeMBS
784
∗ 11.22.17 documentElement as DOMElementMBS
784
∗ 11.22.18 getComputedStyle(elt as DOMElementMBS, pseudoElt as string) as DOMCSSStyleDeclarationMBS
784
∗ 11.22.19 getElementById(elementId as string) as DOMElementMBS
784
∗ 11.22.20 getElementsByTagName(name as string) as DOMNodeListMBS
785
∗ 11.22.21 getElementsByTagNameNS(namespaceURI as string, localName as string) as DOMNodeListMBS
785
∗ 11.22.22 getOverrideStyle(elt as DOMElementMBS, pseudoElt as string) as DOMCSSStyleDeclarationMBS
785
∗ 11.22.23 implementation as DOMImplementationMBS
785
∗ 11.22.24 importNode(importedNode as DOMNodeMBS, deep as boolean) as DOMNodeMBS
785
∗ 11.22.25 styleSheets as DOMStyleSheetListMBS
785
– 11.23.1 class DOMDocumentTypeMBS
∗
∗
∗
∗
∗
∗
11.23.3
11.23.4
11.23.5
11.23.6
11.23.7
11.23.8
entities as DOMElementMBS
internalSubset as String
name as String
notations as DOMElementMBS
publicId as String
systemId as String
– 11.24.1 class DOMElementMBS
786
786
786
786
786
787
787
788
∗ 11.24.3 getAttribute(name as string) as string
788
∗ 11.24.4 getAttributeNode(name as string) as DOMAttrMBS
788
∗ 11.24.5 getAttributeNodeNS(namespaceURI as string, localName as string) as DOMAttrMBS
788
∗ 11.24.6 getAttributeNS(namespaceURI as string, localName as string) as String
788
∗ 11.24.7 getElementsByTagName(name as string) as DOMNodeListMBS
789
∗ 11.24.8 getElementsByTagNameNS(namespaceURI as string, localName as string) as DOMNodeListMBS
789
∗ 11.24.9 hasAttribute(name as string) as boolean
789
∗ 11.24.10 hasAttributeNS(namespaceURI as string, localName as string) as boolean
789
∗ 11.24.11 removeAttribute(name as string)
789
∗ 11.24.12 removeAttributeNode(oldAttr as DOMAttrMBS) as DOMAttrMBS
789
∗ 11.24.13 removeAttributeNS(namespaceURI as string, qualifiedName as string)
789
∗ 11.24.14 setAttribute(name as string, value as string)
790
∗ 11.24.15 setAttributeNode(newAttr as DOMAttrMBS) as DOMAttrMBS
790
35
∗ 11.24.16 setAttributeNodeNS(newAttr as DOMAttrMBS) as DOMAttrMBS
790
∗ 11.24.17 setAttributeNS(namespaceURI as string, qualifiedName as string, value as string)
790
∗ 11.24.18 style as DOMCSSStyleDeclarationMBS
790
∗ 11.24.19 tagName as String
790
– 11.25.1 class DOMEntityMBS
∗ 11.25.3 notationName as String
∗ 11.25.4 publicId as String
∗ 11.25.5 systemId as String
– 11.27.1 class DOMHTMLAnchorElementMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.27.3 blur
11.27.4 focus
11.27.6 accessKey as String
11.27.7 charset as String
11.27.8 coords as String
11.27.9 href as String
11.27.10 hreflang as String
11.27.11 name as String
11.27.12 rel as String
11.27.13 rev as String
11.27.14 shape as String
11.27.15 tabIndex as Integer
11.27.16 target as String
11.27.17 type as String
– 11.28.1 class DOMHTMLAppletElementMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.28.3 align as String
11.28.4 alt as String
11.28.5 archive as string
11.28.6 code as string
11.28.7 codeBase as string
11.28.8 height as String
11.28.9 hspace as Integer
11.28.10 name as String
11.28.11 objectValue as String
11.28.12 vspace as Integer
11.28.13 width as String
– 11.29.1 class DOMHTMLAreaElementMBS
∗
∗
∗
∗
11.29.3
11.29.4
11.29.5
11.29.6
accessKey as String
alt as String
coords as String
href as String
791
791
791
791
793
793
793
793
793
794
794
794
794
794
794
795
795
795
795
796
796
796
796
796
797
797
797
797
797
797
798
799
799
799
799
799
36
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
11.29.7 noHref as boolean
11.29.8 shape as String
11.29.9 tabIndex as Integer
11.29.10 target as String
– 11.30.1 class DOMHTMLBaseElementMBS
∗ 11.30.3 href as String
∗ 11.30.4 target as String
– 11.31.1 class DOMHTMLBaseFontElementMBS
∗ 11.31.3 colorValue as String
∗ 11.31.4 face as String
∗ 11.31.5 size as String
– 11.32.1 class DOMHTMLBodyElementMBS
∗
∗
∗
∗
∗
∗
11.32.3
11.32.4
11.32.5
11.32.6
11.32.7
11.32.8
aLink as String
background as String
bgColor as String
link as String
text as String
vLink as String
– 11.33.1 class DOMHTMLBRElementMBS
∗ 11.33.3 clear as String
– 11.34.1 class DOMHTMLButtonElementMBS
∗
∗
∗
∗
∗
∗
∗
11.34.3 form as DOMHTMLFormElementMBS
11.34.4 type as String
11.34.6 accessKey as String
11.34.7 disabled as boolean
11.34.8 name as String
11.34.9 tabIndex as Integer
11.34.10 value as String
– 11.35.1 class DOMHTMLCollectionMBS
∗ 11.35.3 item(index as UInt32) as DOMNodeMBS
∗ 11.35.4 length as Integer
∗ 11.35.5 namedItem(name as string) as DOMNodeMBS
– 11.36.1 class DOMHTMLDirectoryElementMBS
∗ 11.36.3 compact as boolean
– 11.37.1 class DOMHTMLDivElementMBS
∗ 11.37.3 align as String
– 11.38.1 class DOMHTMLDListElementMBS
∗ 11.38.3 compact as boolean
– 11.39.1 class DOMHTMLDocumentMBS
800
800
800
800
801
801
801
802
802
802
802
803
803
803
803
803
804
804
805
805
806
806
806
806
806
807
807
807
808
808
808
808
809
809
810
810
811
811
812
37
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.39.3 anchors as DOMHTMLCollectionMBS
11.39.4 applets as DOMHTMLCollectionMBS
11.39.5 close
11.39.6 domain as String
11.39.7 forms as DOMHTMLCollectionMBS
11.39.8 getElementById(elementId as string) as DOMElementMBS
11.39.9 getElementsByName(elementName as string) as DOMNodeListMBS
11.39.10 images as DOMHTMLCollectionMBS
11.39.11 links as DOMHTMLCollectionMBS
11.39.12 open
11.39.13 referrer as String
11.39.14 URL as String
11.39.15 write(text as string)
11.39.16 writeln(text as string)
11.39.18 body as DOMHTMLElementMBS
11.39.19 cookie as String
11.39.20 title as String
– 11.40.1 class DOMHTMLElementMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.40.3 children as DOMHTMLCollectionMBS
11.40.4 isContentEditable as boolean
11.40.6 className as String
11.40.7 contentEditable as String
11.40.8 dir as String
11.40.9 idName as String
11.40.10 innerHTML as String
11.40.11 innerText as String
11.40.12 lang as String
11.40.13 outerHTML as String
11.40.14 outerText as String
11.40.15 title as String
– 11.41.1 class DOMHTMLEmbedElementMBS
∗
∗
∗
∗
∗
∗
11.41.3
11.41.4
11.41.5
11.41.6
11.41.7
11.41.8
align as String
height as Integer
name as String
src as String
type as String
width as Integer
– 11.42.1 class DOMHTMLFieldSetElementMBS
∗ 11.42.3 form as DOMHTMLFormElementMBS
– 11.43.1 class DOMHTMLFontElementMBS
∗ 11.43.3 colorValue as String
812
812
812
812
813
813
813
813
813
813
813
814
814
814
814
814
814
816
816
816
816
816
817
817
817
817
817
817
818
818
819
819
819
819
819
820
820
821
821
822
822
38
CHAPTER 1. LIST OF TOPICS
∗ 11.43.4 face as String
∗ 11.43.5 size as String
– 11.44.1 class DOMHTMLFormElementMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.44.3 elements as DOMHTMLCollectionMBS
11.44.4 length as Integer
11.44.5 reset
11.44.6 submit
11.44.8 acceptCharset as String
11.44.9 action as String
11.44.10 enctype as String
11.44.11 method as String
11.44.12 name as String
11.44.13 target as String
– 11.45.1 class DOMHTMLFrameElementMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.45.3 contentDocument as DOMDocumentMBS
11.45.5 frameBorder as String
11.45.6 longDesc as String
11.45.7 marginHeight as String
11.45.8 marginWidth as String
11.45.9 name as String
11.45.10 noResize as Boolean
11.45.11 scrolling as String
11.45.12 src as String
– 11.46.1 class DOMHTMLFrameSetElementMBS
∗ 11.46.3 cols as String
∗ 11.46.4 rows as String
– 11.47.1 class DOMHTMLHeadElementMBS
∗ 11.47.3 profile as String
– 11.48.1 class DOMHTMLHeadingElementMBS
∗ 11.48.3 align as String
– 11.49.1 class DOMHTMLHRElementMBS
∗
∗
∗
∗
11.49.3
11.49.4
11.49.5
11.49.6
align as String
noShade as Boolean
size as String
width as String
– 11.50.1 class DOMHTMLHtmlElementMBS
∗ 11.50.3 version as String
– 11.51.1 class DOMHTMLIFrameElementMBS
∗ 11.51.3 contentDocument as DOMDocumentMBS
822
822
823
823
823
823
823
824
824
824
824
824
824
826
826
826
826
827
827
827
827
827
827
828
828
828
829
829
830
830
831
831
831
831
831
833
833
834
834
39
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.51.5 align as String
11.51.6 frameBorder as String
11.51.7 height as String
11.51.8 longDesc as String
11.51.9 marginHeight as String
11.51.10 marginWidth as String
11.51.11 name as String
11.51.12 scrolling as String
11.51.13 src as String
11.51.14 width as String
– 11.52.1 class DOMHTMLImageElementMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.52.3 align as String
11.52.4 alt as String
11.52.5 border as String
11.52.6 height as Integer
11.52.7 hspace as Integer
11.52.8 isMap as boolean
11.52.9 longDesc as String
11.52.10 name as String
11.52.11 src as String
11.52.12 useMap as String
11.52.13 vspace as Integer
11.52.14 width as Integer
– 11.53.1 class DOMHTMLInputElementMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.53.3 blur
11.53.4 click
11.53.5 focus
11.53.6 form as DOMHTMLFormElementMBS
11.53.7 selectMethod
11.53.9 accept as String
11.53.10 accessKey as String
11.53.11 align as String
11.53.12 alt as String
11.53.13 checked as boolean
11.53.14 defaultChecked as boolean
11.53.15 defaultValue as String
11.53.16 disabled as boolean
11.53.17 maxLength as Integer
11.53.18 name as String
11.53.19 readOnly as boolean
11.53.20 size as String
834
834
835
835
835
835
835
835
836
836
837
837
837
837
837
838
838
838
838
838
838
839
839
840
840
840
840
840
841
841
841
841
841
841
842
842
842
842
842
842
843
40
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
11.53.21
11.53.22
11.53.23
11.53.24
11.53.25
src as String
tabIndex as Integer
type as String
useMap as String
value as String
– 11.54.1 class DOMHTMLIsIndexElementMBS
∗ 11.54.3 form as DOMHTMLFormElementMBS
∗ 11.54.5 prompt as String
– 11.55.1 class DOMHTMLLabelElementMBS
∗ 11.55.3 form as DOMHTMLFormElementMBS
∗ 11.55.5 accessKey as String
∗ 11.55.6 htmlFort as String
– 11.56.1 class DOMHTMLLegendElementMBS
∗ 11.56.3 form as DOMHTMLFormElementMBS
∗ 11.56.5 accessKey as String
∗ 11.56.6 align as String
– 11.57.1 class DOMHTMLLIElementMBS
∗ 11.57.3 type as string
∗ 11.57.4 value as Integer
– 11.58.1 class DOMHTMLLinkElementMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.58.3 charset as String
11.58.4 disabled as boolean
11.58.5 href as String
11.58.6 hreflang as String
11.58.7 media as String
11.58.8 rel as String
11.58.9 rev as String
11.58.10 target as String
11.58.11 type as String
– 11.59.1 class DOMHTMLMapElementMBS
∗ 11.59.3 areas as DOMHTMLCollectionMBS
∗ 11.59.5 name as String
– 11.60.1 class DOMHTMLMenuElementMBS
∗ 11.60.3 compact as boolean
– 11.61.1 class DOMHTMLMetaElementMBS
∗
∗
∗
∗
11.61.3
11.61.4
11.61.5
11.61.6
content as String
httpEquiv as String
name as String
scheme as String
843
843
843
843
843
844
844
844
845
845
845
845
846
846
846
846
847
847
847
848
848
848
848
848
849
849
849
849
849
850
850
850
851
851
852
852
852
852
852
41
– 11.62.1 class DOMHTMLModElementMBS
∗ 11.62.3 cite as String
∗ 11.62.4 dateTime as String
– 11.63.1 class DOMHTMLObjectElementMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.63.3 cells as DOMDocumentMBS
11.63.4 form as DOMHTMLFormElementMBS
11.63.6 align as string
11.63.7 archive as string
11.63.8 border as string
11.63.9 code as string
11.63.10 codeBase as string
11.63.11 codeType as string
11.63.12 data as string
11.63.13 declareValue as boolean
11.63.14 height as string
11.63.15 hspace as Integer
11.63.16 name as string
11.63.17 standby as string
11.63.18 tabIndex as Integer
11.63.19 type as string
11.63.20 useMap as string
11.63.21 vspace as Integer
11.63.22 width as string
– 11.64.1 class DOMHTMLOListElementMBS
∗ 11.64.3 compact as boolean
∗ 11.64.4 start as Integer
∗ 11.64.5 type as string
– 11.65.1 class DOMHTMLOptGroupElementMBS
∗ 11.65.3 content as boolean
∗ 11.65.4 label as String
– 11.66.1 class DOMHTMLOptionElementMBS
∗
∗
∗
∗
∗
∗
∗
∗
11.66.3 form as DOMHTMLFormElementMBS
11.66.4 index as Integer
11.66.5 text as String
11.66.7 defaultSelected as boolean
11.66.8 disabled as boolean
11.66.9 label as String
11.66.10 selected as boolean
11.66.11 value as String
– 11.67.1 class DOMHTMLOptionsCollectionMBS
854
854
854
855
855
855
855
855
856
856
856
856
856
856
857
857
857
857
857
857
858
858
858
859
859
859
859
860
860
860
861
861
861
861
861
862
862
862
862
863
42
CHAPTER 1. LIST OF TOPICS
∗ 11.67.3 item(index as Integer) as DOMNodeMBS
∗ 11.67.4 namedItem(name as string) as DOMNodeMBS
∗ 11.67.6 length as Integer
– 11.68.1 class DOMHTMLParagraphElementMBS
∗ 11.68.3 align as String
– 11.69.1 class DOMHTMLParamElementMBS
∗
∗
∗
∗
11.69.3
11.69.4
11.69.5
11.69.6
name as String
type as String
value as String
valueType as String
– 11.70.1 class DOMHTMLPreElementMBS
∗ 11.70.3 width as Integer
– 11.71.1 class DOMHTMLQuoteElementMBS
∗ 11.71.3 cite as String
– 11.72.1 class DOMHTMLScriptElementMBS
∗
∗
∗
∗
∗
∗
∗
11.72.3
11.72.4
11.72.5
11.72.6
11.72.7
11.72.8
11.72.9
charset as String
defer as boolean
eventValue as String
htmlFor as String
src as String
text as String
type as String
– 11.73.1 class DOMHTMLSelectElementMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
863
863
863
864
864
865
865
865
865
865
867
867
868
868
869
869
869
869
869
870
870
870
871
11.73.3 add(element as DOMHTMLElementMBS, before as DOMHTMLElementMBS) 871
11.73.4 blur
871
11.73.5 focus
871
11.73.6 form as DOMHTMLFormElementMBS
871
11.73.7 length as Integer
872
11.73.8 options as DOMHTMLOptionsCollectionMBS
872
11.73.9 remove(index as Integer)
872
11.73.10 type as String
872
11.73.12 disabled as boolean
872
11.73.13 multiple as boolean
872
11.73.14 name as String
873
11.73.15 selectedIndex as Integer
873
11.73.16 size as Integer
873
11.73.17 tabIndex as Integer
873
11.73.18 value as String
873
– 11.74.1 class DOMHTMLStyleElementMBS
∗ 11.74.3 content as boolean
874
874
43
∗ 11.74.4 media as String
∗ 11.74.5 type as String
– 11.75.1 class DOMHTMLTableCaptionElementMBS
∗ 11.75.3 align as String
– 11.76.1 class DOMHTMLTableCellElementMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.76.3 cellIndex as Integer
11.76.5 abbr as string
11.76.6 align as string
11.76.7 axis as string
11.76.8 bgColor as string
11.76.9 ch as string
11.76.10 chOff as string
11.76.11 colSpan as Integer
11.76.12 headers as string
11.76.13 height as string
11.76.14 noWrap as boolean
11.76.15 rowSpan as Integer
11.76.16 scope as string
11.76.17 vAlign as string
11.76.18 width as string
– 11.77.1 class DOMHTMLTableColElementMBS
∗
∗
∗
∗
∗
∗
11.77.3
11.77.4
11.77.5
11.77.6
11.77.7
11.77.8
align as string
ch as string
chOff as string
span as Integer
vAlign as string
width as string
– 11.78.1 class DOMHTMLTableElementMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.78.3 createCaption as DOMHTMLElementMBS
11.78.4 createTFoot as DOMHTMLElementMBS
11.78.5 createTHead as DOMHTMLElementMBS
11.78.6 deleteCaption
11.78.7 deleteRow(index as Integer)
11.78.8 deleteTFoot
11.78.9 deleteTHead
11.78.10 insertRow(index as Integer) as DOMHTMLElementMBS
11.78.11 rows as DOMHTMLCollectionMBS
11.78.12 tBodies as DOMHTMLCollectionMBS
11.78.14 align as string
11.78.15 bgColor as string
11.78.16 border as string
874
874
875
875
876
876
876
876
877
877
877
877
877
877
878
878
878
878
878
878
879
879
879
879
879
880
880
881
881
881
881
881
882
882
882
882
882
882
883
883
883
44
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.78.17
11.78.18
11.78.19
11.78.20
11.78.21
11.78.22
11.78.23
11.78.24
11.78.25
caption as DOMHTMLTableCaptionElementMBS
cellPadding as string
cellSpacing as string
frameBorders as string
rules as string
summary as string
tFoot as DOMHTMLTableSectionElementMBS
tHead as DOMHTMLTableSectionElementMBS
width as string
– 11.79.1 class DOMHTMLTableRowElementMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.79.3 cells as DOMHTMLCollectionMBS
11.79.4 deleteCell(index as Integer)
11.79.5 insertCell(index as Integer) as DOMHTMLElementMBS
11.79.6 rowIndex as Integer
11.79.7 sectionRowIndex as Integer
11.79.9 align as string
11.79.10 bgColor as string
11.79.11 ch as string
11.79.12 chOff as string
11.79.13 vAlign as string
– 11.80.1 class DOMHTMLTableSectionElementMBS
∗
∗
∗
∗
∗
∗
∗
11.80.3 deleteRow(index as Integer)
11.80.4 insertRow(index as Integer) as DOMHTMLElementMBS
11.80.5 rows as DOMHTMLCollectionMBS
11.80.7 align as string
11.80.8 ch as string
11.80.9 chOff as string
11.80.10 vAlign as string
– 11.81.1 class DOMHTMLTextAreaElementMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.81.3 blur
11.81.4 focus
11.81.5 form as DOMHTMLFormElementMBS
11.81.6 selectMethod
11.81.7 type as String
11.81.9 accessKey as String
11.81.10 cols as Integer
11.81.11 defaultValue as String
11.81.12 disabled as boolean
11.81.13 name as String
11.81.14 readOnly as boolean
11.81.15 rows as Integer
883
883
883
884
884
884
884
884
884
886
886
886
886
886
887
887
887
887
887
887
888
888
888
888
888
889
889
889
890
890
890
890
890
891
891
891
891
891
891
892
892
45
∗ 11.81.16 tabIndex as Integer
∗ 11.81.17 value as String
– 11.82.1 class DOMHTMLTitleElementMBS
∗ 11.82.3 text as String
– 11.83.1 class DOMHTMLUListElementMBS
∗ 11.83.3 compact as boolean
∗ 11.83.4 type as String
– 11.84.1 class DOMImplementationMBS
892
892
893
893
894
894
894
895
∗ 11.84.3 createCSSStyleSheet(title as string, media as string) as DOMCSSStyleSheetMBS 895
∗ 11.84.4 createDocument(namespaceURI as string, qualifiedName as string, doctype as string)
as DOMDocumentTypeMBS
895
∗ 11.84.5 createDocumentType(qualifiedName as string, publicId as string, systemId as string)
as DOMDocumentTypeMBS
895
∗ 11.84.6 hasFeature(feature as string, version as string) as boolean
895
– 11.85.1 class DOMMediaListMBS
∗
∗
∗
∗
∗
11.85.3
11.85.4
11.85.5
11.85.6
11.85.8
appendMedium(newMedium as string)
deleteMedium(oldMedium as string)
item(index as Integer) as string
length as Integer
mediaText as String
– 11.86.1 class DOMNamedNodeMapMBS
896
896
896
896
896
897
898
∗ 11.86.3 getNamedItem(name as string) as DOMNodeMBS
898
∗ 11.86.4 getNamedItemNS(namespaceURI as string, localName as string) as DOMNodeMBS
898
∗ 11.86.5 item(index as UInt32) as DOMNodeMBS
898
∗ 11.86.6 length as Integer
899
∗ 11.86.7 removeNamedItem(name as string) as DOMNodeMBS
899
∗ 11.86.8 removeNamedItemNS(namespaceURI as string, localName as string) as DOMNodeMBS
899
∗ 11.86.9 setNamedItem(arg as DOMNodeMBS) as DOMNodeMBS
899
∗ 11.86.10 setNamedItemNS(arg as DOMNodeMBS) as DOMNodeMBS
899
– 11.87.1 class DOMNodeListMBS
∗ 11.87.3 item(index as UInt32) as DOMNodeMBS
∗ 11.87.4 length as Integer
– 11.88.1 class DOMNodeMBS
∗
∗
∗
∗
∗
11.88.3
11.88.4
11.88.5
11.88.6
11.88.7
appendChild(newChild as DOMNodeMBS) as DOMNodeMBS
childNodes as DOMNodeListMBS
cloneNode(deep as boolean) as DOMNodeMBS
firstChild as DOMNodeMBS
getAttributes as DOMNamedNodeMapMBS
900
900
900
901
901
901
901
901
902
46
CHAPTER 1. LIST OF TOPICS
∗ 11.88.8 hasAttributes as boolean
902
∗ 11.88.9 hasChildNodes as boolean
902
∗ 11.88.10 insertBefore(newChild as DOMNodeMBS, refChild as DOMNodeMBS) as DOMNodeMBS
902
∗ 11.88.11 isSupported(feature as string, version as string) as boolean
902
∗ 11.88.12 lastChild as DOMNodeMBS
902
∗ 11.88.13 localName as String
903
∗ 11.88.14 namespaceURI as String
903
∗ 11.88.15 nextSibling as DOMNodeMBS
903
∗ 11.88.16 nodeName as String
903
∗ 11.88.17 nodeType as Integer
903
∗ 11.88.18 normalize
903
∗ 11.88.19 ownerDocument as DOMDocumentMBS
903
∗ 11.88.20 parentNode as DOMNodeMBS
904
∗ 11.88.21 previousSibling as DOMNodeMBS
904
∗ 11.88.22 removeChild(oldChild as DOMNodeMBS) as DOMNodeMBS
904
∗ 11.88.23 replaceChild(newChild as DOMNodeMBS, oldChild as DOMNodeMBS) as DOMNodeMBS
904
∗ 11.88.25 nodeValue as String
904
∗ 11.88.26 prefix as String
904
905
∗ 11.88.28 DOM ATTRIBUTE NODE = 2
∗ 11.88.29 DOM CDATA SECTION NODE = 4
905
∗ 11.88.30 DOM COMMENT NODE = 8
905
∗ 11.88.31 DOM DOCUMENT FRAGMENT NODE = 11
905
∗ 11.88.32 DOM DOCUMENT NODE = 9
905
∗ 11.88.33 DOM DOCUMENT TYPE NODE = 10
905
∗ 11.88.34 DOM ELEMENT NODE = 1
905
∗ 11.88.35 DOM ENTITY NODE = 6
906
∗ 11.88.36 DOM ENTITY REFERENCE NODE = 5
906
∗ 11.88.37 DOM NOTATION NODE = 12
906
∗ 11.88.38 DOM PROCESSING INSTRUCTION NODE = 7
906
∗ 11.88.39 DOM TEXT NODE = 3
906
– 11.89.1 class DOMNotationMBS
907
∗ 11.89.3 publicId as String
∗ 11.89.4 systemId as String
907
907
– 11.90.1 class DOMObjectMBS
908
∗ 11.90.3 sheet as DOMStyleSheetMBS
908
– 11.91.1 class DOMProcessingInstructionMBS
909
∗ 11.91.3 target as String
∗ 11.91.5 data as String
– 11.92.1 class DOMRangeMBS
909
909
910
47
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.92.3 cloneContents as DOMDocumentFragmentMBS
910
11.92.4 cloneRange as DOMRangeMBS
910
11.92.5 collapse(toStart as boolean)
910
11.92.6 collapsed as boolean
910
11.92.7 commonAncestorContainer as DOMNodeMBS
911
11.92.8 compareBoundaryPoints(how as Integer, sourceRange as DOMRangeMBS) as Integer
911
11.92.9 deleteContents
911
11.92.10 detach
911
11.92.11 endContainer as DOMNodeMBS
911
11.92.12 endOffset as Integer
911
11.92.13 extractContents as DOMDocumentFragmentMBS
911
11.92.14 insertNode(newNode as DOMNodeMBS)
912
11.92.15 selectNode(refNode as DOMNodeMBS)
912
11.92.16 selectNodeContents(refNode as DOMNodeMBS)
912
11.92.17 setEnd(refNode as DOMNodeMBS, offset as Integer)
912
11.92.18 setEndAfter(refNode as DOMNodeMBS)
912
11.92.19 setEndBefore(refNode as DOMNodeMBS)
912
11.92.20 setStart(refNode as DOMNodeMBS, offset as Integer)
912
11.92.21 setStartAfter(refNode as DOMNodeMBS)
913
11.92.22 setStartBefore(refNode as DOMNodeMBS)
913
11.92.23 startContainer as DOMNodeMBS
913
11.92.24 startOffset as Integer
913
11.92.25 surroundContents(newParent as DOMNodeMBS)
913
11.92.26 toString as string
913
914
11.92.28 DOM BAD BOUNDARYPOINTS ERR = 1
11.92.29 DOM END TO END = 2
914
11.92.30 DOM END TO START = 3
914
11.92.31 DOM INVALID NODE TYPE ERR = 2
914
11.92.32 DOM START TO END = 1
914
11.92.33 DOM START TO START = 0
914
– 11.93.1 class DOMRectMBS
∗
∗
∗
∗
11.93.3
11.93.4
11.93.5
11.93.6
bottom as DOMCSSPrimitiveValueMBS
left as DOMCSSPrimitiveValueMBS
right as DOMCSSPrimitiveValueMBS
top as DOMCSSPrimitiveValueMBS
– 11.94.1 class DOMRGBColorMBS
∗
∗
∗
∗
11.94.3
11.94.4
11.94.5
11.94.6
alpha as DOMCSSPrimitiveValueMBS
blue as DOMCSSPrimitiveValueMBS
green as DOMCSSPrimitiveValueMBS
red as DOMCSSPrimitiveValueMBS
915
915
915
915
915
916
916
916
916
916
48
CHAPTER 1. LIST OF TOPICS
– 11.95.1 class DOMStyleSheetListMBS
∗ 11.95.3 item(index as UInt32) as DOMStyleSheetMBS
∗ 11.95.4 length as Integer
– 11.96.1 class DOMStyleSheetMBS
∗
∗
∗
∗
∗
∗
∗
11.96.3 href as String
11.96.4 media as DOMMediaListMBS
11.96.5 ownerNode as DOMNodeMBS
11.96.6 parentStyleSheet as DOMStyleSheetMBS
11.96.7 title as String
11.96.8 type as String
11.96.10 disabled as boolean
– 11.97.1 class DOMTextMBS
∗ 11.97.3 splitText(offset as Integer) as DOMTextMBS
917
917
917
918
918
918
918
918
919
919
919
920
920
49
• 10 DiscRecording
– 10.1.1 class DRBurnMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
10.1.3 abort
10.1.4 burnForDevice(device as DRDeviceMBS) as DRBurnMBS
10.1.5 Constructor(device as DRDeviceMBS)
10.1.6 device as DRDeviceMBS
10.1.7 DRBurnAppendableKey as string
10.1.8 DRBurnCompletionActionEject as string
10.1.9 DRBurnCompletionActionKey as string
10.1.10 DRBurnCompletionActionMount as string
10.1.11 DRBurnDoubleLayerL0DataZoneBlocksKey as string
10.1.12 DRBurnFailureActionEject as string
10.1.13 DRBurnFailureActionKey as string
10.1.14 DRBurnFailureActionNone as string
10.1.15 DRBurnOverwriteDiscKey as string
10.1.16 DRBurnRequestedSpeedKey as string
10.1.17 DRBurnStatusChangedNotification as string
10.1.18 DRBurnStrategyBDDAO as string
10.1.19 DRBurnStrategyCDSAO as string
10.1.20 DRBurnStrategyCDTAO as string
10.1.21 DRBurnStrategyDVDDAO as string
10.1.22 DRBurnStrategyIsRequiredKey as string
10.1.23 DRBurnStrategyKey as string
10.1.24 DRBurnTestingKey as string
10.1.25 DRBurnUnderrunProtectionKey as string
10.1.26 DRBurnVerifyDiscKey as string
10.1.27 DRCDTextKey as string
10.1.28 DRErrorStatusAdditionalSenseStringKey as string
10.1.29 DRErrorStatusErrorInfoStringKey as string
10.1.30 DRErrorStatusErrorKey as string
10.1.31 DRErrorStatusErrorStringKey as string
10.1.32 DRErrorStatusKey as string
10.1.33 DRErrorStatusSenseCodeStringKey as string
10.1.34 DRErrorStatusSenseKey as string
10.1.35 DRMediaCatalogNumberKey as string
10.1.36 DRStatusCurrentSessionKey as string
10.1.37 DRStatusCurrentSpeedKey as string
10.1.38 DRStatusCurrentTrackKey as string
10.1.39 DRStatusEraseTypeKey as string
10.1.40 DRStatusPercentCompleteKey as string
10.1.41 DRStatusProgressCurrentKPS as string
601
601
602
602
602
602
602
603
603
603
603
604
604
604
604
604
605
605
605
605
605
605
606
606
607
607
607
607
608
608
608
608
608
609
609
609
609
609
610
610
610
50
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
10.1.42
10.1.43
10.1.44
10.1.45
10.1.46
10.1.47
10.1.48
10.1.49
10.1.50
10.1.51
10.1.52
10.1.53
10.1.54
10.1.55
10.1.56
10.1.57
10.1.58
10.1.59
10.1.60
10.1.61
10.1.62
10.1.63
10.1.64
10.1.66
10.1.67
10.1.68
10.1.69
10.1.70
10.1.71
10.1.72
10.1.73
10.1.74
10.1.75
10.1.76
DRStatusProgressCurrentXFactor as string
DRStatusProgressInfoKey as string
DRStatusStateDone as string
DRStatusStateErasing as string
DRStatusStateFailed as string
DRStatusStateFinishing as string
DRStatusStateKey as string
DRStatusStateNone as string
DRStatusStatePreparing as string
DRStatusStateSessionClose as string
DRStatusStateSessionOpen as string
DRStatusStateTrackClose as string
DRStatusStateTrackOpen as string
DRStatusStateTrackWrite as string
DRStatusStateVerifying as string
DRStatusTotalSessionsKey as string
DRStatusTotalTracksKey as string
DRSynchronousBehaviorKey as string
status as dictionary
writeImageFile(ImageFile as FolderItem) as boolean
writeImageFile(ImagePath as String) as boolean
writeLayout(track as DRTrackMBS)
writeLayout(tracks() as DRTrackMBS)
appendable as boolean
BurnFailureAction as string
completionAction as string
DoubleLayerL0DataZoneBlocks as Double
MediaCatalogNumber as memoryblock
Overwrite as boolean
properties as dictionary
requestedBurnSpeed as single
Testing as boolean
UnderrunProtection as boolean
verifyDisc as boolean
– 10.2.1 class DRBurnProgressPanelMBS
610
610
611
611
611
611
611
612
612
612
612
612
612
613
613
613
613
613
614
614
614
615
615
615
615
616
616
616
617
617
617
617
618
618
619
∗ 10.2.3 beginProgressPanelForBurn(burn as DRBurnMBS, track as DRTrackMBS)
620
∗ 10.2.4 beginProgressPanelForBurn(burn as DRBurnMBS, tracks() as DRTrackMBS)
620
∗ 10.2.5 beginProgressPanelForImageFile(burn as DRBurnMBS, file as folderitem) as boolean
620
∗ 10.2.6 beginProgressPanelForImageFile(burn as DRBurnMBS, file as string) as boolean 621
∗ 10.2.7 beginProgressSheetForBurn(burn as DRBurnMBS, track as DRTrackMBS, docWindow
as NSWindowMBS)
621
51
∗ 10.2.8 beginProgressSheetForBurn(burn as DRBurnMBS, tracks() as DRTrackMBS, docWindow as NSWindowMBS)
622
∗ 10.2.9 beginProgressSheetForImageFile(burn as DRBurnMBS, file as folderitem, docWindow
as NSWindowMBS) as boolean
622
∗ 10.2.10 beginProgressSheetForImageFile(burn as DRBurnMBS, file as string, docWindow as
NSWindowMBS) as boolean
623
∗ 10.2.11 Constructor
623
∗ 10.2.12 DRBurnProgressPanelDidFinishNotification as string
623
∗ 10.2.13 DRBurnProgressPanelWillBeginNotification as string
623
∗ 10.2.14 stopBurn
624
∗ 10.2.16 Description as string
624
∗ 10.2.17 VerboseProgressStatus as boolean
624
∗ 10.2.19 burnProgressPanelBurnDidFinish(burn as DRBurnMBS) as boolean
625
∗ 10.2.20 burnProgressPanelDidFinish
625
∗ 10.2.21 burnProgressPanelWillBegin
625
– 10.3.1 class DRBurnSetupPanelMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
10.3.3 appendable
10.3.4 burnObject as DRBurnMBS
10.3.5 burnSpeed
10.3.6 completionAction
10.3.7 Constructor
10.3.8 DRBurnSetupPanelDefaultButtonDefaultTitle as string
10.3.9 expand
10.3.10 setCanSelectAppendableMedia(flag as boolean)
10.3.11 setCanSelectTestBurn(flag as boolean)
10.3.12 setDefaultButtonTitle(title as string)
10.3.13 testBurn
10.3.14 verifyBurn
626
627
627
627
627
628
628
628
628
628
629
629
629
– 10.4.1 class DRCDTextBlockMBS
630
∗ 10.4.3 Constructor
∗ 10.4.4 encoding as Integer
∗ 10.4.5 language as string
630
630
630
– 10.5.1 class DRDeviceMBS
∗
∗
∗
∗
∗
∗
∗
∗
10.5.3 acquireExclusiveAccess as boolean
10.5.4 acquireMediaReservation
10.5.5 bsdName as string
10.5.6 closeTray as boolean
10.5.7 Constructor
10.5.8 device(index as UInt32) as DRDeviceMBS
10.5.9 deviceCount as UInt32
10.5.10 deviceForBSDName(bsdName as string) as DRDeviceMBS
631
631
631
632
632
632
632
632
633
52
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
10.5.11
10.5.12
10.5.13
10.5.14
10.5.15
10.5.16
10.5.17
10.5.18
10.5.19
10.5.20
10.5.21
10.5.22
10.5.23
10.5.24
10.5.25
10.5.26
10.5.27
10.5.28
10.5.29
10.5.30
10.5.31
10.5.32
10.5.33
10.5.34
10.5.35
10.5.36
10.5.37
10.5.38
10.5.39
10.5.40
10.5.41
10.5.42
10.5.43
10.5.44
10.5.45
10.5.46
10.5.47
10.5.48
10.5.49
10.5.50
10.5.51
10.5.52
deviceForIORegistryEntryPath(path as string) as DRDeviceMBS
devices as DRDeviceMBS()
displayName as string
DRDeviceAppearedNotification as string
DRDeviceBurnSpeedBD1x as single
DRDeviceBurnSpeedCD1x as single
DRDeviceBurnSpeedDVD1x as single
DRDeviceBurnSpeedHDDVD1x as single
DRDeviceBurnSpeedMax as single
DRDeviceBurnSpeedsKey as string
DRDeviceCanTestWriteCDKey as string
DRDeviceCanTestWriteDVDKey as string
DRDeviceCanUnderrunProtectCDKey as string
DRDeviceCanUnderrunProtectDVDKey as string
DRDeviceCanWriteBDKey as string
DRDeviceCanWriteBDREKey as string
DRDeviceCanWriteBDRKey as string
DRDeviceCanWriteCDKey as string
DRDeviceCanWriteCDRawKey as string
DRDeviceCanWriteCDRKey as string
DRDeviceCanWriteCDRWKey as string
DRDeviceCanWriteCDSAOKey as string
DRDeviceCanWriteCDTAOKey as string
DRDeviceCanWriteCDTextKey as string
DRDeviceCanWriteDVDDAOKey as string
DRDeviceCanWriteDVDKey as string
DRDeviceCanWriteDVDPlusRDoubleLayerKey as string
DRDeviceCanWriteDVDPlusRKey as string
DRDeviceCanWriteDVDPlusRWDoubleLayerKey as string
DRDeviceCanWriteDVDPlusRWKey as string
DRDeviceCanWriteDVDRAMKey as string
DRDeviceCanWriteDVDRDualLayerKey as string
DRDeviceCanWriteDVDRKey as string
DRDeviceCanWriteDVDRWDualLayerKey as string
DRDeviceCanWriteDVDRWKey as string
DRDeviceCanWriteHDDVDKey as string
DRDeviceCanWriteHDDVDRAMKey as string
DRDeviceCanWriteHDDVDRDualLayerKey as string
DRDeviceCanWriteHDDVDRKey as string
DRDeviceCanWriteHDDVDRWDualLayerKey as string
DRDeviceCanWriteHDDVDRWKey as string
DRDeviceCanWriteIndexPointsKey as string
633
633
633
633
634
634
634
634
634
635
635
635
635
635
636
636
636
636
636
636
637
637
637
637
637
637
638
638
638
638
638
638
639
639
639
639
639
639
640
640
640
640
53
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
10.5.53
10.5.54
10.5.55
10.5.56
10.5.57
10.5.58
10.5.59
10.5.60
10.5.61
10.5.62
10.5.63
10.5.64
10.5.65
10.5.66
10.5.67
10.5.68
10.5.69
10.5.70
10.5.71
10.5.72
10.5.73
10.5.74
10.5.75
10.5.76
10.5.77
10.5.78
10.5.79
10.5.80
10.5.81
10.5.82
10.5.83
10.5.84
10.5.85
10.5.86
10.5.87
10.5.88
10.5.89
10.5.90
10.5.91
10.5.92
10.5.93
10.5.94
DRDeviceCanWriteISRCKey as string
DRDeviceCanWriteKey as string
DRDeviceCurrentWriteSpeedKey as string
DRDeviceDisappearedNotification as string
DRDeviceFirmwareRevisionKey as string
DRDeviceIORegistryEntryPathKey as string
DRDeviceIsBusyKey as string
DRDeviceIsTrayOpenKey as string
DRDeviceLoadingMechanismCanEjectKey as string
DRDeviceLoadingMechanismCanInjectKey as string
DRDeviceLoadingMechanismCanOpenKey as string
DRDeviceMaximumWriteSpeedKey as string
DRDeviceMediaBlocksFreeKey as string
DRDeviceMediaBlocksOverwritableKey as string
DRDeviceMediaBlocksUsedKey as string
DRDeviceMediaBSDNameKey as string
DRDeviceMediaClassBD as string
DRDeviceMediaClassCD as string
DRDeviceMediaClassDVD as string
DRDeviceMediaClassHDDVD as string
DRDeviceMediaClassKey as string
DRDeviceMediaClassUnknown as string
DRDeviceMediaDoubleLayerL0DataZoneBlocksKey as string
DRDeviceMediaFreeSpaceKey as string
DRDeviceMediaInfoKey as string
DRDeviceMediaIsAppendableKey as string
DRDeviceMediaIsBlankKey as string
DRDeviceMediaIsErasableKey as string
DRDeviceMediaIsOverwritableKey as string
DRDeviceMediaIsReservedKey as string
DRDeviceMediaOverwritableSpaceKey as string
DRDeviceMediaSessionCountKey as string
DRDeviceMediaStateInTransition as string
DRDeviceMediaStateKey as string
DRDeviceMediaStateMediaPresent as string
DRDeviceMediaStateNone as string
DRDeviceMediaTrackCountKey as string
DRDeviceMediaTypeBDR as string
DRDeviceMediaTypeBDRE as string
DRDeviceMediaTypeBDROM as string
DRDeviceMediaTypeCDR as string
DRDeviceMediaTypeCDROM as string
640
640
641
641
641
641
641
642
642
642
642
642
642
643
643
643
643
643
644
644
644
644
644
644
645
645
645
645
645
646
646
646
646
647
647
647
647
647
647
648
648
648
54
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
10.5.95 DRDeviceMediaTypeCDRW as string
10.5.96 DRDeviceMediaTypeDVDPlusR as string
10.5.97 DRDeviceMediaTypeDVDPlusRDoubleLayer as string
10.5.98 DRDeviceMediaTypeDVDPlusRW as string
10.5.99 DRDeviceMediaTypeDVDPlusRWDoubleLayer as string
10.5.100 DRDeviceMediaTypeDVDR as string
10.5.101 DRDeviceMediaTypeDVDRAM as string
10.5.102 DRDeviceMediaTypeDVDRDualLayer as string
10.5.103 DRDeviceMediaTypeDVDROM as string
10.5.104 DRDeviceMediaTypeDVDRW as string
10.5.105 DRDeviceMediaTypeDVDRWDualLayer as string
10.5.106 DRDeviceMediaTypeHDDVDR as string
10.5.107 DRDeviceMediaTypeHDDVDRAM as string
10.5.108 DRDeviceMediaTypeHDDVDRDualLayer as string
10.5.109 DRDeviceMediaTypeHDDVDROM as string
10.5.110 DRDeviceMediaTypeHDDVDRW as string
10.5.111 DRDeviceMediaTypeHDDVDRWDualLayer as string
10.5.112 DRDeviceMediaTypeKey as string
10.5.113 DRDeviceMediaTypeUnknown as string
10.5.114 DRDeviceMediaUsedSpaceKey as string
10.5.115 DRDevicePhysicalInterconnectATAPI as string
10.5.116 DRDevicePhysicalInterconnectFibreChannel as string
10.5.117 DRDevicePhysicalInterconnectFireWire as string
10.5.118 DRDevicePhysicalInterconnectKey as string
10.5.119 DRDevicePhysicalInterconnectLocationExternal as string
10.5.120 DRDevicePhysicalInterconnectLocationInternal as string
10.5.121 DRDevicePhysicalInterconnectLocationKey as string
10.5.122 DRDevicePhysicalInterconnectLocationUnknown as string
10.5.123 DRDevicePhysicalInterconnectSCSI as string
10.5.124 DRDevicePhysicalInterconnectUSB as string
10.5.125 DRDeviceProductNameKey as string
10.5.126 DRDeviceStatusChangedNotification as string
10.5.127 DRDeviceSupportLevelAppleShipping as string
10.5.128 DRDeviceSupportLevelAppleSupported as string
10.5.129 DRDeviceSupportLevelKey as string
10.5.130 DRDeviceSupportLevelNone as string
10.5.131 DRDeviceSupportLevelUnsupported as string
10.5.132 DRDeviceSupportLevelVendorSupported as string
10.5.133 DRDeviceTrackInfoKey as string
10.5.134 DRDeviceTrackRefsKey as string
10.5.135 DRDeviceVendorNameKey as string
10.5.136 DRDeviceWriteBufferSizeKey as string
648
648
648
649
649
649
649
649
650
650
650
650
650
650
651
651
651
651
651
651
652
652
652
652
652
652
653
653
653
653
653
654
654
654
654
654
655
655
655
655
655
655
55
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
10.5.137
10.5.138
10.5.139
10.5.140
10.5.141
10.5.142
10.5.143
10.5.144
10.5.145
10.5.146
10.5.147
10.5.148
10.5.149
10.5.150
10.5.151
10.5.152
10.5.153
10.5.154
10.5.155
10.5.156
10.5.157
10.5.158
10.5.159
10.5.160
10.5.161
10.5.162
10.5.163
DRDeviceWriteCapabilitiesKey as string
ejectMedia as boolean
info as dictionary
ioRegistryEntryPath as string
isEqualToDevice(value as DRDeviceMBS) as boolean
isValid as boolean
mediaIsAppendable as boolean
mediaIsBlank as boolean
mediaIsBusy as boolean
mediaIsErasable as boolean
mediaIsOverwritable as boolean
mediaIsPresent as boolean
mediaIsReserved as boolean
mediaIsTransitioning as boolean
mediaSpaceFree as DRMSFMBS
mediaSpaceOverwritable as DRMSFMBS
mediaSpaceUsed as DRMSFMBS
mediaType as string
openTray as boolean
PhysicalInterconnect as string
PhysicalInterconnectLocation as string
releaseExclusiveAccess
releaseMediaReservation
status as dictionary
trayIsOpen as boolean
writesCD as boolean
writesDVD as boolean
– 10.6.1 class DREraseMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
10.6.3 Constructor(device as DRDeviceMBS)
10.6.4 device as DRDeviceMBS
10.6.5 DREraseStatusChangedNotification as string
10.6.6 DREraseTypeComplete as string
10.6.7 DREraseTypeKey as string
10.6.8 DREraseTypeQuick as string
10.6.9 eraseForDevice(device as DRDeviceMBS) as DREraseMBS
10.6.10 start
10.6.11 status as dictionary
10.6.13 eraseType as string
10.6.14 properties as dictionary
– 10.7.1 class DREraseProgressPanelMBS
∗ 10.7.3 beginProgressPanelForErase(erase as DREraseMBS)
656
656
656
656
656
657
657
657
657
657
657
658
658
658
658
658
658
658
659
659
659
659
659
660
660
660
660
661
661
661
661
661
662
662
662
662
662
662
663
664
664
56
CHAPTER 1. LIST OF TOPICS
∗ 10.7.4 beginProgressSheetForErase(erase as DREraseMBS, docWindow as NSWindowMBS)
664
∗ 10.7.5 Constructor
664
∗ 10.7.6 DREraseProgressPanelDidFinishNotification as string
665
∗ 10.7.7 DREraseProgressPanelWillBeginNotification as string
665
∗ 10.7.9 Description as string
665
∗ 10.7.11 eraseProgressPanelDidFinish
666
∗ 10.7.12 eraseProgressPanelEraseDidFinish(erase as DREraseMBS) as boolean
666
∗ 10.7.13 eraseProgressPanelWillBegin
666
– 10.8.1 class DREraseSetupPanelMBS
∗ 10.8.3 Constructor
∗ 10.8.4 eraseObject as DREraseMBS
– 10.9.1 class DRFileMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
667
667
667
668
10.9.3 Constructor
668
10.9.4 Constructor(name as string)
668
10.9.5 Constructor(name as string, data as memoryblock)
669
10.9.6 Constructor(path as folderitem)
669
10.9.7 DRLinkTypeFinderAlias as string
669
10.9.8 DRLinkTypeHardLink as string
669
10.9.9 DRLinkTypeSymbolicLink as string
669
10.9.10 fileWithPath(path as folderitem) as DRFileMBS
670
10.9.11 fileWithPath(path as string) as DRFileMBS
670
10.9.12 finderAliasPointingTo(original as DRFSObjectMBS, filesystem as string) as DRFileMBS
670
10.9.13 hardLinkPointingTo(original as DRFileMBS, filesystem as string) as DRFileMBS 671
10.9.14 linkWithLinkType(linkType as string, original as DRFSObjectMBS, filesystem as
string) as DRFileMBS
671
10.9.15 symLinkPointingTo(original as DRFSObjectMBS, filesystem as string) as DRFileMBS
672
10.9.16 virtualFileWithName(name as string, data as memoryblock) as DRFileMBS
672
10.9.18 calculateSizeOfFile(fork as Integer, estimating as boolean) as uint64
673
10.9.19 cleanupFileAfterBurn
673
10.9.20 prepareFileForBurn as boolean
674
10.9.21 prepareFileForVerification as boolean
674
10.9.22 produceFile(fork as Integer, buffer as memoryblock, Bufferlen as uint32, address as
uint64, blocksize as uint32) as uint32
674
10.9.24 DRFileForkData = 0
675
10.9.25 DRFileForkResource = 1
675
– 10.10.1 class DRFolderMBS
∗ 10.10.3 addChild(child as DRFSObjectMBS)
∗ 10.10.4 children as DRFSObjectMBS()
676
676
676
57
∗
∗
∗
∗
∗
∗
∗
∗
∗
10.10.5 Constructor
10.10.6 Constructor(name as string)
10.10.7 Constructor(path as folderitem)
10.10.8 count as Integer
10.10.9 folderWithPath(path as folderitem) as DRFolderMBS
10.10.10 folderWithPath(path as string) as DRFolderMBS
10.10.11 makeVirtual
10.10.12 removeChild(child as DRFSObjectMBS)
10.10.13 virtualFolderWithName(name as string) as DRFolderMBS
– 10.11.1 class DRFSObjectMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
10.11.3 Constructor
10.11.4 DRAccessDate as string
10.11.5 DRAllFilesystems as string
10.11.6 DRAttributeModificationDate as string
10.11.7 DRBackupDate as string
10.11.8 DRContentModificationDate as string
10.11.9 DRCreationDate as string
10.11.10 DREffectiveDate as string
10.11.11 DRExpirationDate as string
10.11.12 DRHFSPlus as string
10.11.13 DRHFSPlusCatalogNodeID as string
10.11.14 DRHFSPlusTextEncodingHint as string
10.11.15 DRInvisible as string
10.11.16 DRISO9660 as string
10.11.17 DRISO9660LevelOne as string
10.11.18 DRISO9660LevelTwo as string
10.11.19 DRISO9660VersionNumber as string
10.11.20 DRJoliet as string
10.11.21 DRMacExtendedFinderFlags as string
10.11.22 DRMacFileCreator as string
10.11.23 DRMacFileType as string
10.11.24 DRMacFinderFlags as string
10.11.25 DRMacFinderHideExtension as string
10.11.26 DRMacIconLocation as string
10.11.27 DRMacScrollPosition as string
10.11.28 DRMacWindowBounds as string
10.11.29 DRMacWindowView as string
10.11.30 DRPosixFileMode as string
10.11.31 DRPosixGID as string
10.11.32 DRPosixUID as string
10.11.33 DRRecordingDate as string
677
677
677
677
677
678
678
678
678
679
679
679
679
679
680
680
680
680
680
680
681
681
681
681
682
682
682
682
683
683
683
683
683
683
684
684
684
684
684
684
685
58
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
10.11.34 DRUDF as string
685
10.11.35 DRUDFApplicationIdentifierSuffix as string
685
10.11.36 DRUDFExtendedFilePermissions as string
685
10.11.37 DRUDFInterchangeLevel as string
685
10.11.38 DRUDFMaxInterchangeLevel as string
686
10.11.39 DRUDFMaxVolumeSequenceNumber as string
686
10.11.40 DRUDFPrimaryVolumeDescriptorNumber as string
686
10.11.41 DRUDFRealTimeFile as string
686
10.11.42 DRUDFVersion102 as string
686
10.11.43 DRUDFVersion150 as string
687
10.11.44 DRUDFVolumeSequenceNumber as string
687
10.11.45 DRUDFVolumeSetIdentifier as string
687
10.11.46 DRUDFVolumeSetImplementationUse as string
687
10.11.47 DRUDFVolumeSetTimestamp as string
687
10.11.48 DRUDFWriteVersion as string
687
10.11.49 effectiveFilesystemMask as Integer
688
10.11.50 isVirtual as boolean
688
10.11.51 mangledNameForFilesystem(filesystem as string) as string
688
10.11.52 mangledNames as dictionary
688
10.11.53 parent as DRFolderMBS
688
10.11.54 propertiesForFilesystem(filesystem as string, mergeWithOtherFilesystems as boolean)
as dictionary
689
10.11.55 propertyForKey(key as string, filesystem as string, mergeWithOtherFilesystems as
boolean) as Variant
689
10.11.56 setProperties(Value as dictionary, filesystem as string)
689
10.11.57 setProperty(Value as Variant, key as string, filesystem as string)
690
10.11.58 sourcePath as string
690
10.11.60 baseName as string
690
10.11.61 explicitFilesystemMask as Integer
691
10.11.62 specificNameForFilesystem(filesystem as string) as string
691
10.11.63 specificNames as dictionary
691
10.11.65 DRFilesystemInclusionMaskHFSPlus = 8
692
10.11.66 DRFilesystemInclusionMaskISO9660 = 1
692
10.11.67 DRFilesystemInclusionMaskJoliet = 2
692
10.11.68 DRFilesystemInclusionMaskUDF = 4
692
– 10.12.1 class DRMSFMBS
∗
∗
∗
∗
∗
∗
10.12.3
10.12.4
10.12.5
10.12.6
10.12.7
10.12.8
Constructor
Constructor(frames as Integer)
Constructor(s as string)
description as string
descriptionWithFormat(format as string) as string
frames as Integer
693
693
693
694
694
694
695
59
∗
∗
∗
∗
∗
∗
∗
∗
∗
10.12.9 isEqualToMSF(value as DRMSFMBS) as boolean
10.12.10 minutes as Integer
10.12.11 msf as DRMSFMBS
10.12.12 msfByAdding(value as DRMSFMBS) as DRMSFMBS
10.12.13 msfBySubtracting(value as DRMSFMBS) as DRMSFMBS
10.12.14 msfWithFrames(frames as Integer) as DRMSFMBS
10.12.15 msfWithString(s as string) as DRMSFMBS
10.12.16 seconds as Integer
10.12.17 sectors as Integer
– 10.13.1 class DRSetupPanelMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
697
10.13.3 cancel
697
10.13.4 close
697
10.13.5 Constructor
697
10.13.6 eject
698
10.13.7 ok
698
10.13.8 open
698
10.13.9 runSetupPanel as Integer
698
10.13.11 determineBestDevice(deviceA as DRDeviceMBS, deviceB as DRDeviceMBS) as DRDeviceMBS
698
10.13.12 DeviceContainsSuitableMedia(device as DRDeviceMBS, byref prompt as string) as
boolean
699
10.13.13 DeviceCouldBeTarget(device as DRDeviceMBS) as boolean
699
10.13.14 DeviceSelectionChanged(device as DRDeviceMBS)
699
10.13.15 SetupPanelShouldHandleMediaReservations as boolean
699
10.13.17 NSCancelButton = 0
700
10.13.18 NSOKButton = 1
700
– 10.14.1 class DRTrackMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
695
695
695
695
695
696
696
696
696
10.14.3 Constructor
10.14.4 DRAbstractFile as string
10.14.5 DRApplicationIdentifier as string
10.14.6 DRAudioFourChannelKey as string
10.14.7 DRAudioPreEmphasisKey as string
10.14.8 DRBibliographicFile as string
10.14.9 DRBlockSize as string
10.14.10 DRBlockSizeKey as string
10.14.11 DRBlockTypeKey as string
10.14.12 DRCopyrightFile as string
10.14.13 DRDataFormKey as string
10.14.14 DRDataPreparer as string
10.14.15 DRDefaultDate as string
10.14.16 DRDVDCopyrightInfoKey as string
701
702
702
702
702
702
703
703
703
703
703
704
704
704
704
60
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
10.14.17
10.14.18
10.14.19
10.14.20
10.14.21
10.14.22
10.14.23
10.14.24
10.14.25
10.14.26
10.14.27
10.14.28
10.14.29
10.14.30
10.14.31
10.14.32
10.14.33
10.14.34
10.14.35
10.14.36
10.14.37
10.14.38
10.14.39
10.14.40
10.14.41
10.14.42
10.14.43
10.14.44
10.14.45
10.14.46
10.14.47
10.14.48
10.14.49
10.14.50
10.14.51
10.14.52
10.14.53
10.14.54
10.14.55
10.14.56
10.14.57
10.14.58
DRDVDTimestampKey as string
DRFreeBlocksKey as string
DRIndexPointsKey as string
DRISOLevel as string
DRISOMacExtensions as string
DRISORockRidgeExtensions as string
DRMaxBurnSpeedKey as string
DRNextWritableAddressKey as string
DRPreGapIsRequiredKey as string
DRPreGapLengthKey as string
DRPublisher as string
DRSCMSCopyrightFree as string
DRSCMSCopyrightProtectedCopy as string
DRSCMSCopyrightProtectedOriginal as string
DRSerialCopyManagementStateKey as string
DRSessionFormatKey as string
DRSessionNumberKey as string
DRSubchannelDataFormKey as string
DRSubchannelDataFormNone as string
DRSubchannelDataFormPack as string
DRSubchannelDataFormRaw as string
DRSuppressMacSpecificFiles as string
DRSystemIdentifier as string
DRTrackIsEmptyKey as string
DRTrackISRCKey as string
DRTrackLengthKey as string
DRTrackModeKey as string
DRTrackNumberKey as string
DRTrackPacketSizeKey as string
DRTrackPacketTypeFixed as string
DRTrackPacketTypeKey as string
DRTrackPacketTypeVariable as string
DRTrackStartAddressKey as string
DRTrackTypeClosed as string
DRTrackTypeIncomplete as string
DRTrackTypeInvisible as string
DRTrackTypeKey as string
DRTrackTypeReserved as string
DRVerificationTypeChecksum as string
DRVerificationTypeKey as string
DRVerificationTypeNone as string
DRVerificationTypeProduceAgain as string
704
704
705
705
705
705
705
706
706
706
706
707
707
707
707
708
708
708
708
709
709
709
709
709
710
710
710
710
710
711
711
711
711
711
712
712
712
712
712
712
713
713
61
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
10.14.59 DRVerificationTypeReceiveData as string
713
10.14.60 DRVolumeCheckedDate as string
713
10.14.61 DRVolumeCreationDate as string
713
10.14.62 DRVolumeEffectiveDate as string
713
10.14.63 DRVolumeExpirationDate as string
714
10.14.64 DRVolumeModificationDate as string
714
10.14.65 DRVolumeSet as string
714
10.14.66 estimateLength as UInt64
714
10.14.67 testProductionSpeedForInterval(seconds as Double) as Double
715
10.14.68 testProductionSpeedForLength(length as Integer) as Double
715
10.14.69 trackForAudioFile(path as folderitem) as DRTrackMBS
715
10.14.70 trackForAudioFile(path as string) as DRTrackMBS
716
10.14.71 trackForRootFolder(folder as DRFolderMBS) as DRTrackMBS
717
10.14.72 trackForRootFolder(folder as folderitem) as DRTrackMBS
717
10.14.74 BlockSize as Integer
717
10.14.75 BlockType as Integer
717
10.14.76 DataForm as Integer
717
10.14.77 length as DRMSFMBS
718
10.14.78 MaxBurnSpeed as Double
718
10.14.79 preGap as DRMSFMBS
718
10.14.80 PreGapIsRequired as boolean
718
10.14.81 PreGapLength as Double
719
10.14.82 properties as dictionary
719
10.14.83 SessionFormat as Integer
719
10.14.84 TrackISRC as memoryblock
719
10.14.85 TrackMode as Integer
720
10.14.86 VerificationType as string
720
10.14.88 cleanupTrackAfterBurn
720
10.14.89 cleanupTrackAfterVerification as boolean
721
10.14.90 estimateLengthOfTrack as uint64
721
10.14.91 prepareTrack(burn as DRBurnMBS) as boolean
721
10.14.92 prepareTrackForVerification as boolean
722
10.14.93 produceDataForTrack(buffer as memoryblock, Bufferlen as uint32, address as uint64,
blocksize as uint32, byref flags as uint32) as uint32
722
10.14.94 producePreGapForTrack(buffer as memoryblock, Bufferlen as uint32, address as
uint64, blocksize as uint32, byref flags as uint32) as uint32
722
10.14.95 verifyDataForTrack(buffer as memoryblock, Bufferlen as uint32, address as uint64,
blocksize as uint32, byref flags as uint32) as boolean
723
10.14.96 verifyPreGapForTrack(buffer as memoryblock, Bufferlen as uint32, address as uint64,
blocksize as uint32, byref flags as uint32) as boolean
724
10.14.98 DRFlagSubchannelDataRequested = 2
724
10.14.99 kDRBlockSizeAudio = 2352
724
62
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
10.14.100
10.14.101
10.14.102
10.14.103
10.14.104
10.14.105
10.14.106
10.14.107
10.14.108
10.14.109
10.14.110
10.14.111
10.14.112
10.14.113
10.14.114
10.14.115
10.14.116
10.14.117
10.14.118
10.14.119
10.14.120
10.14.121
10.14.122
10.14.123
10.14.124
10.14.125
10.14.126
10.14.127
kDRBlockSizeDVDData = 2048
kDRBlockSizeMode1Data = 2048
kDRBlockSizeMode2Data = 2332
kDRBlockSizeMode2Form1Data = 2048
kDRBlockSizeMode2Form2Data = 2324
kDRBlockTypeAudio = 0
kDRBlockTypeDVDData = 8
kDRBlockTypeMode1Data = 8
kDRBlockTypeMode2Data = 13
kDRBlockTypeMode2Form1Data = 10
kDRBlockTypeMode2Form2Data = 12
kDRDataFormAudio = 0
kDRDataFormDVDData = 16
kDRDataFormMode1Data = 16
kDRDataFormMode2Data = 32
kDRDataFormMode2Form1Data = 32
kDRDataFormMode2Form2Data = 32
kDRSessionFormatAudio = 0
kDRSessionFormatCDI = 16
kDRSessionFormatCDXA = 32
kDRSessionFormatDVDData = 0
kDRSessionFormatMode1Data = 0
kDRTrackMode1Data = 4
kDRTrackMode2Data = 4
kDRTrackMode2Form1Data = 4
kDRTrackMode2Form2Data = 4
kDRTrackModeAudio = 0
kDRTrackModeDVDData = 5
725
725
725
725
725
725
726
726
726
726
726
726
726
727
727
727
727
727
727
727
728
728
728
728
728
728
728
729
63
• 6 Cocoa Controls
– 6.9.1 class Groupbox
∗ 6.9.3 NSBoxMBS as NSBoxMBS
189
282
282
64
CHAPTER 1. LIST OF TOPICS
• 11 HTMLViewer Mac
– 11.98.1 class HTMLViewer
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
731
921
11.98.3 backForwardListMBS as WebBackForwardListMBS
921
11.98.4 canGoBackMBS as boolean
921
11.98.5 canGoForwardMBS as boolean
921
11.98.6 canMakeTextLargerMBS as boolean
921
11.98.7 canMakeTextSmallerMBS as boolean
922
11.98.8 canResetPageZoomMBS as boolean
922
11.98.9 CanShowMIMETypeAsHTMLMBS(mime as string) as boolean
922
11.98.10 CanShowMIMETypeMBS(mime as string) as boolean
923
11.98.11 canZoomPageInMBS as boolean
923
11.98.12 canZoomPageOutMBS as boolean
923
11.98.13 ClearFocusMBS
924
11.98.14 EstimatedProgressMBS as Double
924
11.98.15 EvaluateJavaScriptMBS(code as string) as string
924
11.98.16 GetPageFormatMBS as string
925
11.98.17 GoBackMBS
925
11.98.18 GoForwardMBS
926
11.98.19 goToBackForwardItemMBS(item as WebHistoryItemMBS) as boolean
926
11.98.20 HandleMBS as Integer
926
11.98.21 HTMLTextMBS as string
926
11.98.22 InstallWebDownloadDelegateMBS(WebDownloadDelegate as WebDownloadDelegateMBS)
927
11.98.23 InstallWebFrameLoadDelegateMBS(WebFrameLoadDelegate as WebFrameLoadDelegateMBS)
927
11.98.24 InstallWebPolicyDelegateMBS(WebPolicyDelegate as WebPolicyDelegateMBS) 927
11.98.25 InstallWebResourceLoadDelegateMBS(WebResourceLoadDelegate as WebResourceLoadDelegateMBS)
927
11.98.26 InstallWebUIDelegateMBS(WebUIDelegate as WebUIDelegateMBS)
927
11.98.27 LoadHTMLStringMBS(data as memoryblock, mime as string, encoding as string,
url as string)
928
11.98.28 LoadHTMLStringMBS(text as string, url as string)
928
11.98.29 LoadRequest(request as NSURLRequestMBS)
929
11.98.30 LoadURLMBS(url as string)
929
11.98.31 LoadURLMBS(url as string, CachePolicy as Integer, TimeOut as Double)
929
11.98.32 mainFrameMBS as WebFrameMBS
930
11.98.33 makeTextLargerMBS
930
11.98.34 makeTextSmallerMBS
931
11.98.35 mediaVolumeMBS as Double
931
11.98.36 NSScrollViewMBS as Variant
931
11.98.37 PageSetupDialogMBS(sheetTarget as window=nil) as boolean
932
11.98.38 pageSizeMultiplierMBS as Double
932
65
∗ 11.98.39 PrintDialogMBS(sheetTarget as window=nil, PDFFile as folderitem=nil) as boolean
933
∗ 11.98.40 PrintDialogVisibleMBS as boolean
933
∗ 11.98.41 PrintingEndMBS
933
∗ 11.98.42 PrintingPageMBS(index as UInt32) as Memoryblock
934
∗ 11.98.43 PrintingStartMBS(width as Double, height as Double) as Integer
934
∗ 11.98.44 PrintMBS(PDFFile as folderitem=nil) as boolean
935
∗ 11.98.45 PrintToPDFFileMBS(PDFFile as folderitem, LeftMargin as Double = 50.0, TopMargin as Double = 50.0, RightMargin as Double = 50.0, BottomMargin as Double = 50.0)
as boolean
935
∗ 11.98.46 reloadFromOriginMBS
936
∗ 11.98.47 ReloadMBS
936
∗ 11.98.48 RenderDocumentToEPSMBS as Memoryblock
936
∗ 11.98.49 RenderDocumentToPDFMBS as Memoryblock
937
∗ 11.98.50 RenderEPSMBS as Memoryblock
937
∗ 11.98.51 RenderPDFMBS as Memoryblock
938
∗ 11.98.52 RenderWebsiteImageMBS(ResolutionScale as Double = 1.0) as NSImageMBS 938
∗ 11.98.53 resetPageZoomMBS
939
∗ 11.98.54 SearchForMBS(text as string, Forward as boolean, CaseSensitive as boolean, Wrap
as Boolean) as boolean
939
∗ 11.98.55 setMaintainsBackForwardListMBS(value as boolean)
940
∗ 11.98.56 setMediaVolumeMBS(value as Double)
940
∗ 11.98.57 SetPageFormatMBS(data as string) as boolean
940
∗ 11.98.58 setPageSizeMultiplierMBS(value as Double)
941
∗ 11.98.59 StopLoadingMBS
941
∗ 11.98.60 SupportsTextEncodingMBS as boolean
941
∗ 11.98.61 userAgentForURLMBS(url as string) as String
941
∗ 11.98.62 VisibleHeightMBS as Double
942
∗ 11.98.63 VisibleLeftMBS as Double
942
∗ 11.98.64 VisibleTopMBS as Double
942
∗ 11.98.65 VisibleWidthMBS as Double
943
∗ 11.98.66 WebViewMBS as WebViewMBS
943
∗ 11.98.67 zoomPageInMBS
943
∗ 11.98.68 zoomPageOutMBS
943
∗ 11.98.70 ApplicationNameForUserAgentMBS as String
944
∗ 11.98.71 BoundsHeightMBS as Double
944
∗ 11.98.72 BoundsLeftMBS as Double
945
∗ 11.98.73 BoundsTopMBS as Double
945
∗ 11.98.74 BoundsWidthMBS as Double
945
∗ 11.98.75 ContinuousSpellCheckingEnabledMBS as boolean
946
∗ 11.98.76 CustomTextEncodingNameMBS as String
946
∗ 11.98.77 CustomUserAgentMBS as String
947
66
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.98.78
11.98.79
11.98.80
11.98.81
11.98.82
11.98.83
11.98.84
11.98.85
11.98.86
11.98.87
11.98.88
11.98.89
11.98.90
11.98.91
11.98.92
11.98.93
11.98.94
11.98.95
– ?? Globals
dashboardBehaviorMBS(behavior as Integer) as boolean
DrawsBackgroundMBS as Boolean
EditableMBS as boolean
FrameHeightMBS as Double
FrameLeftMBS as Double
FrameTopMBS as Double
FrameWidthMBS as Double
GroupNameMBS as string
mediaStyleMBS as String
PreferencesIdentifierMBS as string
preferencesMBS as WebPreferencesMBS
ScrollHeightMBS as single
ScrollLeftMBS as single
ScrollTopMBS as single
ScrollWidthMBS as single
TextSizeMultiplierMBS as single
toolTipMBS as String
visibleMBS as boolean
947
947
948
948
948
949
949
949
950
950
950
951
951
951
952
952
952
952
??
∗ 11.99.1 InstallWebDownloadDelegate(extends w as WebViewMBS, theDelegate as WebDownloadDelegateMBS)
954
∗ 11.99.2 InstallWebFrameLoadDelegate(extends w as WebViewMBS, theDelegate as WebFrameLoadDelegateMBS)
954
∗ 11.99.3 InstallWebPolicyDelegate(extends w as WebViewMBS, theDelegate as WebPolicyDelegateMBS)
954
∗ 11.99.4 InstallWebResourceLoadDelegate(extends w as WebViewMBS, theDelegate as WebResourceLoadDelegateMBS)
954
∗ 11.99.5 InstallWebUIDelegate(extends w as WebViewMBS, theDelegate as WebUIDelegateMBS)
955
67
• 6 Cocoa Controls
– 6.10.1 class ImageWell
∗ 6.10.3 NSImageViewMBS as NSImageViewMBS
– 6.11.1 class KeyValueCodingMBS
189
283
283
284
∗ 6.11.3 Constructor
284
∗ 6.11.4 sortedArrayUsingDescriptor(values() as KeyValueCodingMBS, sortDescriptor as NSSortDescriptorMBS) as KeyValueCodingMBS()
284
∗ 6.11.5 sortedArrayUsingDescriptors(values() as KeyValueCodingMBS, sortDescriptor() as NSSortDescriptorMBS) as KeyValueCodingMBS()
284
∗ 6.11.7 Description as String
285
∗ 6.11.8 Handle as Integer
285
∗ 6.11.9 Tag as Variant
285
∗ 6.11.10 valueForKey(key as String) as Variant
285
∗ 6.11.12 Description as String
286
∗ 6.11.13 setValueForKey(key as string, value as Variant)
286
∗ 6.11.14 setValueForUndefinedKey(key as string, value as Variant)
286
∗ 6.11.15 valueForKey(key as string) as Variant
287
∗ 6.11.16 valueForUndefinedKey(key as string) as Variant
287
68
CHAPTER 1. LIST OF TOPICS
• 8 Controls
– 8.3.1 class Listbox
∗ 8.3.3 HorizontalNSScrollerMBS as NSScrollerMBS
∗ 8.3.4 VerticalNSScrollerMBS as NSScrollerMBS
587
589
589
589
69
• 6 Cocoa Controls
– 6.12.1 class NSBoxMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.12.3 borderRect as NSRectMBS
6.12.4 Constructor
6.12.5 Constructor(Handle as Integer)
6.12.6 Constructor(left as Double, top as Double, width as Double, height as Double)
6.12.7 setFrameFromContentFrame(contentFrame as NSRectMBS)
6.12.8 setTitleWithMnemonic(stringWithAmpersand as string)
6.12.9 sizeToFit
6.12.10 titleCell as NSCellMBS
6.12.11 titleRect as NSRectMBS
6.12.13 borderColor as NSColorMBS
6.12.14 borderType as Integer
6.12.15 borderWidth as Double
6.12.16 boxType as Integer
6.12.17 contentView as NSViewMBS
6.12.18 contentViewMargins as NSSizeMBS
6.12.19 cornerRadius as Double
6.12.20 fillColor as NSColorMBS
6.12.21 title as string
6.12.22 titleFont as NSFontMBS
6.12.23 titlePosition as Integer
6.12.24 Transparent as Boolean
6.12.26 NSAboveBottom = 4
6.12.27 NSAboveTop = 1
6.12.28 NSAtBottom = 5
6.12.29 NSAtTop = 2
6.12.30 NSBelowBottom = 6
6.12.31 NSBelowTop = 3
6.12.32 NSBoxCustom = 4
6.12.33 NSBoxOldStyle = 3
6.12.34 NSBoxPrimary = 0
6.12.35 NSBoxSecondary = 1
6.12.36 NSBoxSeparator = 2
6.12.37 NSNoTitle = 0
– 6.13.1 control NSButtonControlMBS
∗
∗
∗
∗
∗
6.13.3
6.13.4
6.13.5
6.13.6
6.13.7
AlternateTitle as String
BezelStyle as Integer
ButtonType as Integer
Title as String
View as NSButtonMBS
189
288
288
288
288
289
289
289
290
290
291
291
291
291
292
292
292
293
293
293
293
294
294
294
294
294
295
295
295
295
295
295
296
296
296
297
297
297
298
298
298
70
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.13.9 Action
6.13.10 BoundsChanged
6.13.11 EnableMenuItems
6.13.12 FrameChanged
6.13.13 GotFocus
6.13.14 LostFocus
6.13.15 MenuAction(HitItem as MenuItem) As Boolean
6.13.16 MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
6.13.17 MouseDrag(x as Integer, y as Integer)
6.13.18 MouseUp(x as Integer, y as Integer)
6.13.19 ScaleFactorChanged(NewFactor as Double)
– 6.14.1 class NSButtonMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.14.3 Constructor
6.14.4 Constructor(Handle as Integer)
6.14.5 Constructor(left as Double, top as Double, width as Double, height as Double)
6.14.6 Constructor(Title as String, Image as NSImageMBS = nil, Type as Integer = 0)
6.14.7 setButtonType(buttonType as Integer)
6.14.8 setNextState
6.14.10 allowsMixedState as boolean
6.14.11 alternateImage as NSImageMBS
6.14.12 alternateTitle as string
6.14.13 attributedAlternateTitle as NSAttributedStringMBS
6.14.14 attributedTitle as NSAttributedStringMBS
6.14.15 backgroundColor as NSColorMBS
6.14.16 bezelColor as NSColorMBS
6.14.17 bezelStyle as Integer
6.14.18 image as NSImageMBS
6.14.19 imageDimsWhenDisabled as Boolean
6.14.20 imageHugsTitle as Boolean
6.14.21 imagePosition as Integer
6.14.22 imageScaling as Integer
6.14.23 isBordered as boolean
6.14.24 isTransparent as boolean
6.14.25 keyEquivalent as string
6.14.26 keyEquivalentModifierMask as Integer
6.14.27 maxAcceleratorLevel as Integer
6.14.28 showsBorderOnlyWhileMouseInside as boolean
6.14.29 sound as Variant
6.14.30 SpringLoaded as Boolean
6.14.31 state as Integer
6.14.32 title as string
298
298
299
299
299
299
299
299
300
300
300
301
301
301
302
302
302
303
303
303
304
304
304
304
304
304
305
305
306
306
306
307
307
307
307
309
309
309
309
310
310
71
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.14.34
6.14.35
6.14.36
6.14.37
6.14.38
6.14.39
6.14.40
6.14.41
6.14.42
6.14.43
6.14.44
6.14.45
6.14.46
6.14.47
6.14.48
6.14.49
6.14.50
6.14.51
6.14.52
6.14.53
6.14.54
6.14.55
6.14.56
NSCircularBezelStyle=7
NSDisclosureBezelStyle=5
NSHelpButtonBezelStyle=9
NSInlineBezelStyle=15
NSMomentaryChangeButton=5
NSMomentaryLightButton=0
NSMomentaryPushInButton=7
NSOnOffButton=6
NSPushOnPushOffButton=1
NSRadioButton=4
NSRecessedBezelStyle=13
NSRegularSquareBezelStyle=2
NSRoundedBezelStyle=1
NSRoundedDisclosureBezelStyle=14
NSRoundRectBezelStyle=12
NSShadowlessSquareBezelStyle=6
NSSmallSquareBezelStyle=10
NSSwitchButton=3
NSTexturedRoundedBezelStyle=11
NSTexturedSquareBezelStyle=8
NSThickerSquareBezelStyle=4
NSThickSquareBezelStyle=3
NSToggleButton=2
– 6.15.1 class NSClipViewMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.15.3 autoscroll(theEvent as NSEventMBS) as boolean
6.15.4 constrainScrollPoint(newOrigin as NSPointMBS) as NSPointMBS
6.15.5 Constructor
6.15.6 Constructor(Handle as Integer)
6.15.7 Constructor(left as Double, top as Double, width as Double, height as Double)
6.15.8 documentRect as NSRectMBS
6.15.9 documentVisibleRect as NSRectMBS
6.15.10 reflectScrolledClipView(clipView as NSClipViewMBS)
6.15.11 scrollClipView(clipview as NSClipViewMBS, toPoint as NSPointMBS)
6.15.12 scrollToPoint(newOrigin as NSPointMBS)
6.15.13 viewBoundsChanged(notification as NSNotificationMBS)
6.15.14 viewFrameChanged(notification as NSNotificationMBS)
6.15.16 backgroundColor as NSColorMBS
6.15.17 copiesOnScroll as boolean
6.15.18 documentCursor as NSCursorMBS
6.15.19 documentView as NSViewMBS
6.15.20 drawsBackground as boolean
310
310
311
311
311
311
311
312
312
312
312
312
312
313
313
313
313
313
313
314
314
314
314
315
316
316
316
317
317
317
318
318
318
318
318
319
319
319
319
319
320
72
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
6.15.22
6.15.23
6.15.24
6.15.25
6.15.26
6.15.27
NSClipViewFindBarPositionAboveContent = 1
NSClipViewFindBarPositionAboveHorizontalRuler = 0
NSClipViewFindBarPositionBelowContent = 2
NSScrollElasticityAllowed = 2
NSScrollElasticityAutomatic = 0
NSScrollElasticityNone = 1
– 6.16.1 class NSComboBoxMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.16.3 addItemWithObjectValue(value as Variant)
6.16.4 Constructor
6.16.5 Constructor(Handle as Integer)
6.16.6 Constructor(left as Double, top as Double, width as Double, height as Double)
6.16.7 deselectItemAtIndex(index as Integer)
6.16.8 indexOfItemWithObjectValue(value as Variant) as Integer
6.16.9 indexOfSelectedItem as Integer
6.16.10 noteNumberOfItemsChanged
6.16.11 numberOfItems as Integer
6.16.12 reloadData
6.16.13 removeAllItems
6.16.14 removeItemAtIndex(index as Integer)
6.16.15 removeItemWithObjectValue(value as Variant)
6.16.16 scrollItemAtIndexToTop(index as Integer)
6.16.17 scrollItemAtIndexToVisible(index as Integer)
6.16.18 selectItemAtIndex(index as Integer)
6.16.19 selectItemWithObjectValue(value as Variant)
6.16.21 completes as boolean
6.16.22 hasVerticalScroller as boolean
6.16.23 intercellSpacing as NSSizeMBS
6.16.24 isButtonBordered as boolean
6.16.25 itemHeight as Double
6.16.26 numberOfVisibleItems as Integer
6.16.27 usesDataSource as boolean
– 6.17.1 control NSDatePickerControlMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.17.3 View as NSDatePickerMBS
6.17.5 Action
6.17.6 BoundsChanged
6.17.7 EnableMenuItems
6.17.8 FrameChanged
6.17.9 GotFocus
6.17.10 LostFocus
6.17.11 MenuAction(HitItem as MenuItem) As Boolean
6.17.12 MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
320
320
321
321
321
321
322
322
322
323
323
323
324
324
324
325
325
325
325
325
326
326
326
326
327
327
327
328
328
328
328
329
329
329
329
329
330
330
330
330
330
73
∗ 6.17.13 MouseDrag(x as Integer, y as Integer)
∗ 6.17.14 MouseUp(x as Integer, y as Integer)
∗ 6.17.15 ScaleFactorChanged(NewFactor as Double)
– 6.18.1 class NSDatePickerMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.18.3 Constructor
6.18.4 Constructor(Handle as Integer)
6.18.5 Constructor(left as Double, top as Double, width as Double, height as Double)
6.18.7 backgroundColor as NSColorMBS
6.18.8 Bezeled as Boolean
6.18.9 Bordered as Boolean
6.18.10 calendar as NSCalendarMBS
6.18.11 datePickerElements as Integer
6.18.12 datePickerMode as Integer
6.18.13 datePickerStyle as Integer
6.18.14 dateValue as date
6.18.15 drawsBackground as Boolean
6.18.16 locale as NSLocaleMBS
6.18.17 maxDate as date
6.18.18 minDate as date
6.18.19 textColor as NSColorMBS
6.18.20 timeInterval as Double
6.18.21 timeZone as NSTimeZoneMBS
6.18.23 NSClockAndCalendarDatePickerStyle = 1
6.18.24 NSEraDatePickerElementFlag = & h100
6.18.25 NSHourMinuteDatePickerElementFlag = & hC
6.18.26 NSHourMinuteSecondDatePickerElementFlag = & hE
6.18.27 NSRangeDateMode = 1
6.18.28 NSSingleDateMode = 0
6.18.29 NSTextFieldAndStepperDatePickerStyle = 0
6.18.30 NSTextFieldDatePickerStyle = 2
6.18.31 NSTimeZoneDatePickerElementFlag = & h10
6.18.32 NSYearMonthDatePickerElementFlag = & hC0
6.18.33 NSYearMonthDayDatePickerElementFlag = & hE0
331
331
331
332
332
332
333
333
333
334
334
334
334
334
334
335
335
335
335
335
336
336
336
336
336
337
337
337
337
337
337
338
338
74
CHAPTER 1. LIST OF TOPICS
• 7 Cocoa Networking
– 7.1.1 class NSHTTPCookieMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
567
7.1.3 comment as string
568
7.1.4 commentURL as string
568
7.1.5 Constructor(properties as dictionary)
569
7.1.6 cookiesWithResponseHeaderFields(headerFields as dictionary, URL as string) as NSHTTPCookieMBS()
570
7.1.7 cookieWithProperties(dic as dictionary) as NSHTTPCookieMBS
570
7.1.8 domain as string
571
7.1.9 expiresDate as date
571
7.1.10 isHTTPOnly as boolean
572
7.1.11 isSecure as boolean
573
7.1.12 isSessionOnly as boolean
573
7.1.13 name as string
573
7.1.14 NSHTTPCookieComment as string
574
7.1.15 NSHTTPCookieCommentURL as string
574
7.1.16 NSHTTPCookieDiscard as string
574
7.1.17 NSHTTPCookieDomain as string
575
7.1.18 NSHTTPCookieExpires as string
575
7.1.19 NSHTTPCookieMaximumAge as string
575
7.1.20 NSHTTPCookieName as string
575
7.1.21 NSHTTPCookieOriginURL as string
575
7.1.22 NSHTTPCookiePath as string
576
7.1.23 NSHTTPCookiePort as string
576
7.1.24 NSHTTPCookieSecure as string
576
7.1.25 NSHTTPCookieValue as string
576
7.1.26 NSHTTPCookieVersion as string
577
7.1.27 path as string
577
7.1.28 portList as Integer()
577
7.1.29 properties as dictionary
578
7.1.30 requestHeaderFieldsWithCookies(cookies() as NSHTTPCookieMBS) as dictionary 579
7.1.31 value as string
580
7.1.32 version as Integer
580
7.1.34 Handle as Integer
580
– 7.2.1 class NSHTTPCookieStorageMBS
∗
∗
∗
∗
∗
∗
567
7.2.3
7.2.4
7.2.5
7.2.6
7.2.7
7.2.8
Constructor
cookies as NSHTTPCookieMBS()
cookiesForURL(URL as string) as NSHTTPCookieMBS()
cookiesToArray(cookies() as NSHTTPCookieMBS) as Integer
deleteCookie(cookie as NSHTTPCookieMBS)
NSHTTPCookieManagerAcceptPolicyChangedNotification as string
581
581
581
582
582
583
583
75
∗ 7.2.9 NSHTTPCookieManagerCookiesChangedNotification as string
584
∗ 7.2.10 setCookie(cookie as NSHTTPCookieMBS)
584
∗ 7.2.11 setCookies(cookies() as NSHTTPCookieMBS, URL as string, mainDocumentURL as
string)
584
∗ 7.2.12 sharedHTTPCookieStorage as NSHTTPCookieStorageMBS
585
∗ 7.2.14 Handle as Integer
585
∗ 7.2.15 cookieAcceptPolicy as Integer
585
∗ 7.2.17 NSHTTPCookieAcceptPolicyAlways = 0
586
∗ 7.2.18 NSHTTPCookieAcceptPolicyNever = 1
586
∗ 7.2.19 NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2
586
76
CHAPTER 1. LIST OF TOPICS
• 6 Cocoa Controls
– 6.19.1 class NSImageViewMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.19.3 Constructor
6.19.4 Constructor(Handle as Integer)
6.19.5 Constructor(left as Double, top as Double, width as Double, height as Double)
6.19.7 allowsCutCopyPaste as Boolean
6.19.8 animates as Boolean
6.19.9 image as NSImageMBS
6.19.10 imageAlignment as Integer
6.19.11 imageFrameStyle as Integer
6.19.12 imageScaling as Integer
6.19.13 isEditable as Boolean
6.19.15 NSImageAlignBottom = 5
6.19.16 NSImageAlignBottomLeft = 6
6.19.17 NSImageAlignBottomRight = 7
6.19.18 NSImageAlignCenter = 0
6.19.19 NSImageAlignLeft = 4
6.19.20 NSImageAlignRight = 8
6.19.21 NSImageAlignTop = 1
6.19.22 NSImageAlignTopLeft = 2
6.19.23 NSImageAlignTopRight = 3
6.19.24 NSImageFrameButton = 4
6.19.25 NSImageFrameGrayBezel = 2
6.19.26 NSImageFrameGroove = 3
6.19.27 NSImageFrameNone = 0
6.19.28 NSImageFramePhoto = 1
6.19.29 NSScaleNone = 2
6.19.30 NSScaleProportionally = 0
6.19.31 NSScaleToFit = 1
189
339
339
339
340
340
340
341
341
341
342
342
342
342
343
343
343
343
343
343
344
344
344
344
344
344
345
345
345
77
• 5 Cocoa
151
– 5.3.1 class NSLevelIndicatorMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
5.3.3 Constructor
5.3.4 Constructor(Handle as Integer)
5.3.5 Constructor(left as Double, top as Double, width as Double, height as Double)
5.3.6 rectOfTickMarkAtIndex(index as Integer) as NSRectMBS
5.3.7 tickMarkValueAtIndex(index as Integer) as Double
5.3.9 criticalValue as Double
5.3.10 levelIndicatorStyle as Integer
5.3.11 maxValue as Double
5.3.12 minValue as Double
5.3.13 numberOfMajorTickMarks as Integer
5.3.14 numberOfTickMarks as Integer
5.3.15 tickMarkPosition as Integer
5.3.16 warningValue as Double
5.3.18 NSContinuousCapacityLevelIndicatorStyle = 1
5.3.19 NSDiscreteCapacityLevelIndicatorStyle = 2
5.3.20 NSRatingLevelIndicatorStyle = 3
5.3.21 NSRelevancyLevelIndicatorStyle = 0
5.3.22 NSTickMarkAbove = 1
5.3.23 NSTickMarkBelow = 0
5.3.24 NSTickMarkLeft = 0
5.3.25 NSTickMarkRight = 1
158
158
159
159
159
160
160
160
160
160
160
161
161
161
161
162
162
162
162
162
162
162
78
CHAPTER 1. LIST OF TOPICS
• 6 Cocoa Controls
– 6.20.1 control NSOutlineControlMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
189
346
6.20.3 AcceptTabs as Boolean
346
6.20.4 allowsColumnReordering as Boolean
346
6.20.5 allowsColumnResizing as Boolean
346
6.20.6 allowsColumnSelection as Boolean
347
6.20.7 allowsEmptySelection as Boolean
347
6.20.8 allowsMultipleSelection as Boolean
347
6.20.9 autohidesScrollers as Boolean
347
6.20.10 hasHorizontalScroller as Boolean
348
6.20.11 hasVerticalScroller as Boolean
348
6.20.12 ScrollView as NSScrollViewMBS
348
6.20.13 View as NSOutlineViewMBS
348
6.20.15 acceptDrop(info as NSDraggingInfoMBS, item as NSOutlineViewItemMBS, index as
Integer) as Boolean
349
6.20.16 BoundsChanged
349
6.20.17 childOfItem(index as Integer, item as NSOutlineViewItemMBS) as NSOutlineViewItemMBS
349
6.20.18 ColumnDidMove(notification as NSNotificationMBS, OldColumn as Integer, NewColumn as Integer)
350
6.20.19 ColumnDidResize(notification as NSNotificationMBS, tableColumn as NSTableColumnMBS, OldWidth as Double)
350
6.20.20 concludeDragOperation(info as NSDraggingInfoMBS)
350
6.20.21 dataCell(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS) as
NSCellMBS
350
6.20.22 didAddRowView(rowView as NSTableRowViewMBS, row as Integer)
351
6.20.23 didClickTableColumn(tableColumn as NSTableColumnMBS)
351
6.20.24 didDragTableColumn(tableColumn as NSTableColumnMBS)
351
6.20.25 didRemoveRowView(rowView as NSTableRowViewMBS, row as Integer)
352
6.20.26 didTile
352
6.20.27 DoubleClick
352
6.20.28 draggingEnded(info as NSDraggingInfoMBS)
352
6.20.29 draggingExited(info as NSDraggingInfoMBS)
352
6.20.30 draggingSessionEnded(session as NSDraggingSessionMBS, screenPoint as NSPointMBS,
operation as Integer)
353
6.20.31 draggingSessionWillBegin(session as NSDraggingSessionMBS, screenPoint as NSPointMBS,
draggedItems() as NSOutlineViewItemMBS)
353
6.20.32 EnableMenuItems
354
6.20.33 FrameChanged
354
6.20.34 GotFocus
354
6.20.35 heightOfRowByItem(item as NSOutlineViewItemMBS) as Double
354
6.20.36 isGroupItem(item as NSOutlineViewItemMBS) as Boolean
355
79
∗ 6.20.37 isItemExpandable(item as NSOutlineViewItemMBS) as Boolean
355
∗ 6.20.38 ItemDidCollapse(notification as NSNotificationMBS, item as NSOutlineViewItemMBS)
356
∗ 6.20.39 ItemDidExpand(notification as NSNotificationMBS, item as NSOutlineViewItemMBS)
356
∗ 6.20.40 itemForPersistentObject(PersistentObject as Variant) as NSOutlineViewItemMBS
356
∗ 6.20.41 ItemWillCollapse(notification as NSNotificationMBS, item as NSOutlineViewItemMBS)
356
∗ 6.20.42 ItemWillExpand(notification as NSNotificationMBS, item as NSOutlineViewItemMBS)
357
∗ 6.20.43 LeftMouseDown(e as NSEventMBS) as Boolean
357
∗ 6.20.44 LeftMouseDragged(e as NSEventMBS) as Boolean
357
∗ 6.20.45 LeftMouseUp(e as NSEventMBS) as Boolean
357
∗ 6.20.46 LostFocus
357
∗ 6.20.47 MenuAction(HitItem as MenuItem) as Boolean
357
∗ 6.20.48 MouseDown(x as Integer, y as Integer, Modifiers as Integer) as Boolean
358
∗ 6.20.49 mouseDownInHeaderOfTableColumn(tableColumn as NSTableColumnMBS)
358
∗ 6.20.50 MouseDrag(x as Integer, y as Integer)
358
∗ 6.20.51 MouseUp(x as Integer, y as Integer)
358
∗ 6.20.52 namesOfPromisedFilesDroppedAtDestination(dropDestination as folderItem, DraggedItems()
as NSOutlineViewItemMBS) as string()
359
∗ 6.20.53 nextTypeSelectMatchFromItem(startItem as NSOutlineViewItemMBS, endItem as
NSOutlineViewItemMBS, searchString as String) as NSOutlineViewItemMBS
359
∗ 6.20.54 numberOfChildrenOfItem(item as NSOutlineViewItemMBS) as Integer
360
∗ 6.20.55 objectValue(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS)
as Variant
360
∗ 6.20.56 OtherMouseDown(e as NSEventMBS) as Boolean
360
∗ 6.20.57 OtherMouseDragged(e as NSEventMBS) as Boolean
361
∗ 6.20.58 OtherMouseUp(e as NSEventMBS) as Boolean
361
∗ 6.20.59 pasteboardWriterForItem(item as NSOutlineViewItemMBS) as NSPasteboardItemMBS
361
∗ 6.20.60 persistentObjectForItem(item as NSOutlineViewItemMBS) as Variant
361
∗ 6.20.61 RightMouseDown(e as NSEventMBS) as Boolean
362
∗ 6.20.62 RightMouseDragged(e as NSEventMBS) as Boolean
362
∗ 6.20.63 RightMouseUp(e as NSEventMBS) as Boolean
362
∗ 6.20.64 rowViewForItem(item as NSOutlineViewItemMBS) as NSTableRowViewMBS 362
∗ 6.20.65 ScaleFactorChanged(NewFactor as Double)
363
∗ 6.20.66 SelectionDidChange(notification as NSNotificationMBS)
363
∗ 6.20.67 selectionIndexesForProposedSelection(proposedSelectionIndexes as NSIndexSetMBS)
as NSIndexSetMBS
363
∗ 6.20.68 SelectionIsChanging(notification as NSNotificationMBS)
363
∗ 6.20.69 selectionShouldChangeInOutlineView as Boolean
364
80
CHAPTER 1. LIST OF TOPICS
∗ 6.20.70 setObjectValue(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS,
value as Variant)
364
∗ 6.20.71 shouldCollapseAutoExpandedItemsForDeposited(deposited as Boolean, superResult
as Boolean) as Boolean
364
∗ 6.20.72 shouldCollapseItem(item as NSOutlineViewItemMBS) as Boolean
365
∗ 6.20.73 shouldEdit(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS)
as Boolean
365
∗ 6.20.74 shouldExpandItem(item as NSOutlineViewItemMBS) as Boolean
366
∗ 6.20.75 shouldReorderColumn(columnIndex as Integer, newColumnIndex as Integer) as Boolean
366
∗ 6.20.76 shouldSelectItem(item as NSOutlineViewItemMBS) as Boolean
366
∗ 6.20.77 shouldSelectTableColumn(tableColumn as NSTableColumnMBS) as Boolean
367
∗ 6.20.78 shouldShowCellExpansion(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS) as Boolean
367
∗ 6.20.79 shouldShowOutlineCellForItem(item as NSOutlineViewItemMBS) as Boolean
367
∗ 6.20.80 shouldTrackCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, item as
NSOutlineViewItemMBS) as Boolean
368
∗ 6.20.81 shouldTypeSelectForEvent(e as NSEventMBS, searchString as String) as Boolean 368
∗ 6.20.82 sizeToFitWidthOfColumn(Column as Integer) as Double
369
∗ 6.20.83 sortDescriptorsDidChange(oldDescriptors() as NSSortDescriptorMBS)
369
∗ 6.20.84 textShouldBeginEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as
Boolean
369
∗ 6.20.85 textShouldEndEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as Boolean
369
∗ 6.20.86 toolTipForCell(cell as NSCellMBS, byref rect as NSRectMBS, tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS, mouseLocation as NSPointMBS) as String
370
∗ 6.20.87 typeSelectString(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS)
as String
370
∗ 6.20.88 updateDraggingItemsForDrag(draggingInfo as NSDraggingInfoMBS)
371
∗ 6.20.89 validateDrop(info as NSDraggingInfoMBS, proposedItem as NSOutlineViewItemMBS,
proposedChildIndex as Integer) as Integer
371
∗ 6.20.90 view(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS) as
NSViewMBS
371
∗ 6.20.91 willDisplayCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, item as
NSOutlineViewItemMBS)
372
∗ 6.20.92 willDisplayOutlineCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS,
item as NSOutlineViewItemMBS)
372
∗ 6.20.93 willTile
373
∗ 6.20.94 writeItems(items() as NSOutlineViewItemMBS, pasteboard as NSPasteboardMBS)
as Boolean
373
– 6.21.1 class NSOutlineViewItemMBS
∗ 6.21.3 Constructor
374
374
81
∗ 6.21.4 sortedArrayUsingDescriptor(values() as NSOutlineViewItemMBS, sortDescriptor as
NSSortDescriptorMBS) as NSOutlineViewItemMBS()
374
∗ 6.21.5 sortedArrayUsingDescriptors(values() as NSOutlineViewItemMBS, sortDescriptor() as
NSSortDescriptorMBS) as NSOutlineViewItemMBS()
374
∗ 6.21.7 Description as String
375
∗ 6.21.8 Handle as Integer
375
∗ 6.21.9 valueForKey(key as String) as Variant
375
∗ 6.21.11 Description as String
375
∗ 6.21.12 setValueForKey(key as string, value as Variant)
375
∗ 6.21.13 setValueForUndefinedKey(key as string, value as Variant)
376
∗ 6.21.14 valueForKey(key as string) as Variant
376
∗ 6.21.15 valueForUndefinedKey(key as string) as Variant
377
– 6.22.1 class NSOutlineViewMBS
378
∗ 6.22.3 child(index as Integer, ofItem as NSOutlineViewItemMBS) as NSOutlineViewItemMBS
378
∗ 6.22.4 childIndexForItem(item as NSOutlineViewItemMBS) as Integer
379
∗ 6.22.5 collapseItem(item as NSOutlineViewItemMBS)
379
∗ 6.22.6 collapseItem(item as NSOutlineViewItemMBS, collapseChildren as Boolean)
379
∗ 6.22.7 Constructor
380
∗ 6.22.8 Constructor(Handle as Integer)
380
∗ 6.22.9 Constructor(left as Double, top as Double, width as Double, height as Double) 380
∗ 6.22.10 expandItem(item as NSOutlineViewItemMBS)
381
∗ 6.22.11 expandItem(item as NSOutlineViewItemMBS, expandChildren as Boolean)
381
∗ 6.22.12 frameOfOutlineCellAtRow(row as Integer) as NSRectMBS
381
∗ 6.22.13 insertItemsAtIndexes(indexes as NSIndexSetMBS, Parent as NSOutlineViewItemMBS,
animationOptions as Integer)
382
∗ 6.22.14 insertRowsAtIndexes(indexes as NSIndexSetMBS, animationOptions as Integer) 382
∗ 6.22.15 isExpandable(item as NSOutlineViewItemMBS) as Boolean
383
∗ 6.22.16 isItemExpanded(item as NSOutlineViewItemMBS) as Boolean
383
∗ 6.22.17 itemAtRow(row as Integer) as NSOutlineViewItemMBS
383
∗ 6.22.18 levelForItem(item as NSOutlineViewItemMBS) as Integer
383
∗ 6.22.19 levelForRow(row as Integer) as Integer
383
∗ 6.22.20 moveItemAtIndex(oldIndex as Integer, oldParent as NSOutlineViewItemMBS, newIndex
as Integer, newParent as NSOutlineViewItemMBS)
384
∗ 6.22.21 moveRowAtIndex(oldIndex as Integer, newIndex as Integer)
384
∗ 6.22.22 NSOutlineViewColumnDidMoveNotification as String
384
∗ 6.22.23 NSOutlineViewColumnDidResizeNotification as String
385
∗ 6.22.24 NSOutlineViewDisclosureButtonKey as String
385
∗ 6.22.25 NSOutlineViewItemDidCollapseNotification as String
385
∗ 6.22.26 NSOutlineViewItemDidExpandNotification as String
385
∗ 6.22.27 NSOutlineViewItemWillCollapseNotification as String
386
∗ 6.22.28 NSOutlineViewItemWillExpandNotification as String
386
82
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.22.29 NSOutlineViewSelectionDidChangeNotification as String
386
6.22.30 NSOutlineViewSelectionIsChangingNotification as String
386
6.22.31 NSOutlineViewShowHideButtonKey as String
387
6.22.32 numberOfChildrenOfItem(item as NSOutlineViewItemMBS) as Integer
387
6.22.33 parentForItem(item as NSOutlineViewItemMBS) as NSOutlineViewItemMBS 387
6.22.34 reloadItem(item as NSOutlineViewItemMBS)
387
6.22.35 reloadItem(item as NSOutlineViewItemMBS, reloadChildren as Boolean)
388
6.22.36 removeItemsAtIndexes(indexes as NSIndexSetMBS, Parent as NSOutlineViewItemMBS,
animationOptions as Integer)
388
6.22.37 removeRowsAtIndexes(indexes as NSIndexSetMBS, animationOptions as Integer) 389
6.22.38 rowForItem(item as NSOutlineViewItemMBS) as Integer
389
6.22.39 setDropItem(item as NSOutlineViewItemMBS, dropChildIndex as Integer)
389
6.22.41 autoresizesOutlineColumn as Boolean
389
6.22.42 autosaveExpandedItems as Boolean
390
6.22.43 indentationMarkerFollowsCell as Boolean
390
6.22.44 indentationPerLevel as Double
390
6.22.45 outlinetableColumn as NSTableColumnMBS
390
6.22.46 stronglyReferencesItems as Boolean
391
6.22.47 userInterfaceLayoutDirection as Integer
391
6.22.49 NSOutlineViewDropOnItemIndex = -1
391
– 6.23.1 control NSPopUpButtonControlMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.23.3 View as NSPopUpButtonMBS
6.23.5 Action
6.23.6 BoundsChanged
6.23.7 EnableMenuItems
6.23.8 FrameChanged
6.23.9 GotFocus
6.23.10 LostFocus
6.23.11 MenuAction(HitItem as MenuItem) As Boolean
6.23.12 MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
6.23.13 MouseDrag(x as Integer, y as Integer)
6.23.14 MouseUp(x as Integer, y as Integer)
6.23.15 ScaleFactorChanged(NewFactor as Double)
– 6.24.1 class NSPopUpButtonMBS
∗
∗
∗
∗
∗
∗
392
392
392
392
392
393
393
393
393
393
394
394
394
395
6.24.3 addItemsWithTitles(titles() as string)
395
6.24.4 addItemWithTitle(title as string)
396
6.24.5 Constructor
396
6.24.6 Constructor(Handle as Integer)
397
6.24.7 Constructor(left as Double, top as Double, width as Double, height as Double) 397
6.24.8 Constructor(left as Double, top as Double, width as Double, height as Double, pullsDown as boolean)
397
83
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.24.9 indexOfItem(item as NSMenuItemMBS) as Integer
6.24.10 indexOfItemWithTag(tag as Integer) as Integer
6.24.11 indexOfItemWithTitle(title as string) as Integer
6.24.12 indexOfSelectedItem as Integer
6.24.13 insertItemWithTitle(title as string, atIndex as Integer)
6.24.14 itemAtIndex(index as Integer) as NSMenuItemMBS
6.24.15 itemWithTitle(title as string) as NSMenuItemMBS
6.24.16 lastItem as NSMenuItemMBS
6.24.17 removeAllItems
6.24.18 removeItemAtIndex(index as Integer)
6.24.19 removeItemWithTitle(title as string)
6.24.20 selectItem(item as NSMenuItemMBS)
6.24.21 selectItemAtIndex(index as Integer)
6.24.22 selectItemWithTag(tag as Integer) as boolean
6.24.23 selectItemWithTitle(title as string)
6.24.24 setTitle(title as string)
6.24.25 synchronizeTitleAndSelectedItem
6.24.26 titleOfSelectedItem as string
6.24.28 arrowPosition as Integer
6.24.29 autoenablesItems as boolean
6.24.30 menu as NSMenuMBS
6.24.31 numberOfItems as Integer
6.24.32 pullsDown as boolean
6.24.33 selectedItem as NSMenuItemMBS
6.24.35 NSPopUpArrowAtBottom = 2
6.24.36 NSPopUpArrowAtCenter = 1
6.24.37 NSPopUpNoArrow = 0
– 6.25.1 class NSProgressIndicatorMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.25.3 Constructor
6.25.4 Constructor(Handle as Integer)
6.25.5 Constructor(left as Double, top as Double, width as Double, height as Double)
6.25.6 incrementBy(delta as Double)
6.25.7 sizeToFit
6.25.8 startAnimation
6.25.9 stopAnimation
6.25.11 controlSize as Integer
6.25.12 controlTint as Integer
6.25.13 doubleValue as Double
6.25.14 isBezeled as boolean
6.25.15 isDisplayedWhenStopped as boolean
6.25.16 isIndeterminate as boolean
398
398
398
399
399
399
400
400
400
400
400
401
401
401
402
402
402
402
402
403
403
403
403
404
404
404
404
405
405
405
406
406
406
407
407
407
407
407
408
408
408
84
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.25.17
6.25.18
6.25.19
6.25.20
6.25.22
6.25.23
6.25.24
6.25.25
6.25.26
6.25.27
6.25.28
6.25.29
6.25.30
6.25.31
6.25.32
6.25.33
6.25.34
maxValue as Double
minValue as Double
style as Integer
usesThreadedAnimation as boolean
NSBlueControlTint=1
NSClearControlTint=7
NSDefaultControlTint=0
NSGraphiteControlTint=6
NSMiniControlSize=2
NSProgressIndicatorBarStyle=0
NSProgressIndicatorPreferredAquaThickness=12
NSProgressIndicatorPreferredLargeThickness=18
NSProgressIndicatorPreferredSmallThickness=10
NSProgressIndicatorPreferredThickness=14
NSProgressIndicatorSpinningStyle=1
NSRegularControlSize=0
NSSmallControlSize=1
– 6.26.1 class NSScrollerMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.26.3 checkSpaceForParts
6.26.4 Constructor
6.26.5 Constructor(Handle as Integer)
6.26.6 Constructor(left as Double, top as Double, width as Double, height as Double)
6.26.7 drawArrow(Arrow as Integer, highlight as boolean)
6.26.8 drawKnob
6.26.9 drawKnobSlotInRect(slotRect as NSRectMBS, highlight as boolean)
6.26.10 drawParts
6.26.11 highlight(flag as boolean)
6.26.12 hitPart as Integer
6.26.13 isCompatibleWithOverlayScrollers as boolean
6.26.14 NSPreferredScrollerStyleDidChangeNotification as string
6.26.15 preferredScrollerStyle as Integer
6.26.16 rectForPart(part as Integer) as NSRectMBS
6.26.17 scrollerWidth as Double
6.26.18 scrollerWidthForControlSize(controlsize as Integer) as Double
6.26.19 setFloatValue(aFloat as Double, proportion as Double)
6.26.20 testPart(p as NSPointMBS) as Integer
6.26.21 trackKnob(theEvent as NSEventMBS)
6.26.22 trackScrollButtons(theEvent as NSEventMBS)
6.26.23 usableParts as Integer
6.26.25 arrowsPosition as Integer
6.26.26 controlSize as Integer
408
409
409
409
409
410
410
410
410
410
410
410
411
411
411
411
411
412
412
412
413
413
413
414
414
414
414
415
415
415
415
416
416
416
417
417
417
417
417
418
418
85
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.26.27
6.26.28
6.26.29
6.26.30
6.26.32
6.26.33
6.26.34
6.26.35
6.26.36
6.26.37
6.26.38
6.26.39
6.26.40
6.26.41
6.26.42
6.26.43
6.26.44
6.26.45
6.26.46
6.26.47
6.26.48
6.26.49
6.26.50
6.26.51
6.26.52
6.26.53
6.26.54
6.26.55
6.26.56
6.26.57
6.26.58
6.26.59
controlTint as Integer
knobProportion as Double
knobStyle as Integer
scrollerStyle as Integer
NSAllScrollerParts = 2
NSBlueControlTint = 1
NSClearControlTint = 7
NSDefaultControlTint = 0
NSGraphiteControlTint = 6
NSMiniControlSize = 2
NSNoScrollerParts = 0
NSOnlyScrollerArrows = 1
NSRegularControlSize = 0
NSScrollerArrowsDefaultSetting = 0
NSScrollerArrowsMaxEnd = 0
NSScrollerArrowsMinEnd = 1
NSScrollerArrowsNone = 2
NSScrollerDecrementArrow = 1
NSScrollerDecrementLine = 4
NSScrollerDecrementPage = 1
NSScrollerIncrementArrow = 0
NSScrollerIncrementLine = 5
NSScrollerIncrementPage = 3
NSScrollerKnob = 2
NSScrollerKnobSlot = 6
NSScrollerKnobStyleDark = 1
NSScrollerKnobStyleDefault = 0
NSScrollerKnobStyleLight = 2
NSScrollerNoPart = 0
NSScrollerStyleLegacy = 0
NSScrollerStyleOverlay = 1
NSSmallControlSize = 1
– 6.27.1 class NSScrollViewMBS
∗
∗
∗
∗
∗
∗
∗
∗
6.27.3 Constructor
6.27.4 Constructor(Handle as Integer)
6.27.5 Constructor(left as Double, top as Double, width as Double, height as Double)
6.27.6 flashScrollers
6.27.7 reflectScrolledClipView(clipView as NSClipViewMBS)
6.27.8 tile
6.27.10 autohidesScrollers as boolean
6.27.11 backgroundColor as NSColorMBS
418
418
419
419
419
419
420
420
420
420
420
420
420
421
421
421
421
421
421
422
422
422
422
422
422
422
423
423
423
423
423
424
425
425
425
426
426
426
427
427
427
86
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.27.12
6.27.13
6.27.14
6.27.15
6.27.16
6.27.17
6.27.18
6.27.19
6.27.20
6.27.21
6.27.22
6.27.23
6.27.24
6.27.25
6.27.26
6.27.27
6.27.28
6.27.29
6.27.30
6.27.31
6.27.32
6.27.33
6.27.34
6.27.35
6.27.36
6.27.37
6.27.39
6.27.40
6.27.41
6.27.42
6.27.43
6.27.44
borderType as Integer
contentSize as NSSizeMBS
contentView as NSClipViewMBS
documentCursor as NSCursorMBS
documentView as NSViewMBS
documentVisibleRect as NSRectMBS
drawsBackground as boolean
hasHorizontalRuler as boolean
hasHorizontalScroller as boolean
hasVerticalRuler as boolean
hasVerticalScroller as boolean
horizontalLineScroll as Double
horizontalPageScroll as Double
horizontalScrollElasticity as Integer
horizontalScroller as NSScrollerMBS
lineScroll as Double
pageScroll as Double
rulersVisible as boolean
scrollerKnobStyle as Integer
scrollerStyle as Integer
scrollsDynamically as boolean
usesPredominantAxisScrolling as boolean
verticalLineScroll as Double
verticalPageScroll as Double
verticalScrollElasticity as Integer
verticalScroller as NSScrollerMBS
NSScrollElasticityAllowed = 2
NSScrollElasticityAutomatic = 0
NSScrollElasticityNone = 1
NSScrollViewFindBarPositionAboveContent = 1
NSScrollViewFindBarPositionAboveHorizontalRuler = 0
NSScrollViewFindBarPositionBelowContent = 2
– 6.28.1 class NSSliderMBS
∗
∗
∗
∗
∗
∗
∗
∗
6.28.3 acceptsFirstMouse(event as NSEventMBS) as boolean
6.28.4 closestTickMarkValueToValue(value as Double) as Double
6.28.5 Constructor
6.28.6 Constructor(Handle as Integer)
6.28.7 Constructor(left as Double, top as Double, width as Double, height as Double)
6.28.8 indexOfTickMarkAtPoint(p as NSPointMBS) as Integer
6.28.9 indexOfTickMarkAtPoint(x as Double, y as Double) as Integer
6.28.10 isVertical as Integer
427
428
428
428
428
428
429
429
429
429
429
429
430
430
431
431
431
432
432
432
432
433
433
433
434
434
434
435
435
435
435
436
437
437
437
438
438
438
439
439
439
87
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.28.11
6.28.12
6.28.14
6.28.15
6.28.16
6.28.17
6.28.18
6.28.19
6.28.20
6.28.21
6.28.22
6.28.23
6.28.24
6.28.25
6.28.26
6.28.28
6.28.29
6.28.30
6.28.31
6.28.32
6.28.33
rectOfTickMarkAtIndex(index as Integer) as NSRectMBS
tickMarkValueAtIndex(index as Integer) as Double
allowsTickMarkValuesOnly as boolean
altIncrementValue as Double
image as NSImageMBS
knobThickness as Double
maxValue as Double
minValue as Double
numberOfTickMarks as Integer
sliderType as Integer
tickMarkPosition as Integer
title as string
titleCell as NSCellMBS
titleColor as NSColorMBS
titleFont as NSFontMBS
NSCircularSlider=1
NSLinearSlider=0
NSTickMarkAbove=1
NSTickMarkBelow=0
NSTickMarkLeft=1
NSTickMarkRight=0
439
440
440
440
440
441
441
441
441
442
442
442
442
443
443
443
443
443
444
444
444
88
CHAPTER 1. LIST OF TOPICS
• 15 Statusitem
– 15.1.1 class NSStatusBarButtonMBS
∗ 15.1.3 Available as boolean
∗ 15.1.5 appearsDisabled as Boolean
1279
1279
1279
1280
89
• 6 Cocoa Controls
– 6.29.1 class NSStepperMBS
∗
∗
∗
∗
∗
∗
∗
∗
6.29.3 Constructor
6.29.4 Constructor(Handle as Integer)
6.29.5 Constructor(left as Double, top as Double, width as Double, height as Double)
6.29.7 autorepeat as boolean
6.29.8 increment as Double
6.29.9 maxValue as Double
6.29.10 minValue as Double
6.29.11 valueWraps as boolean
– 6.30.1 class NSTableColumnMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.30.3 Constructor(identifier as string)
6.30.4 dataCellForRow(row as Integer) as NSCellMBS
6.30.5 sizeToFit
6.30.7 dataCell as NSCellMBS
6.30.8 Editable as boolean
6.30.9 headerCell as NSTableHeaderCellMBS
6.30.10 headerToolTip as string
6.30.11 Hidden as boolean
6.30.12 identifier as string
6.30.13 maxWidth as Double
6.30.14 minWidth as Double
6.30.15 Resizable as boolean
6.30.16 resizingMask as Integer
6.30.17 sortDescriptorPrototype as NSSortDescriptorMBS
6.30.18 tableView as NSTableViewMBS
6.30.19 title as String
6.30.20 width as Double
6.30.22 NSTableColumnAutoresizingMask=1
6.30.23 NSTableColumnNoResizing=0
6.30.24 NSTableColumnUserResizingMask=2
– 6.31.1 control NSTableControlMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.31.3 AcceptTabs as Boolean
6.31.4 allowsColumnReordering as Boolean
6.31.5 allowsColumnResizing as Boolean
6.31.6 allowsColumnSelection as Boolean
6.31.7 allowsEmptySelection as Boolean
6.31.8 allowsMultipleSelection as Boolean
6.31.9 autohidesScrollers as Boolean
6.31.10 disableCellEvents as Boolean
6.31.11 disableViewEvents as Boolean
189
445
445
445
446
446
446
447
447
447
448
448
448
448
449
449
449
449
449
450
450
450
450
450
451
451
451
451
451
452
452
453
453
453
453
454
454
454
454
455
455
90
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.31.12 hasHorizontalScroller as Boolean
455
6.31.13 hasVerticalScroller as Boolean
455
6.31.14 ScrollView as NSScrollViewMBS
456
6.31.15 View as NSTableViewMBS
456
6.31.17 acceptDrop(info as NSDraggingInfoMBS, row as Integer, dropOperation as Integer)
as boolean
456
6.31.18 BoundsChanged
456
6.31.19 ColumnDidMove(notification as NSNotificationMBS, oldColumn as Integer, newColumn as Integer)
457
6.31.20 ColumnDidResize(notification as NSNotificationMBS, tableColumn as NSTableColumnMBS, OldWidth as Double)
457
6.31.21 dataCell(tableColumn as NSTableColumnMBS, row as Int64) as NSCellMBS
457
6.31.22 didAddRowView(rowView as NSTableRowViewMBS, row as Integer)
457
6.31.23 didClickTableColumn(tableColumn as NSTableColumnMBS)
458
6.31.24 didDragTableColumn(tableColumn as NSTableColumnMBS)
458
6.31.25 didRemoveRowView(rowView as NSTableRowViewMBS, row as Integer)
458
6.31.26 didTile
458
6.31.27 DoubleClick
459
6.31.28 draggingSessionEnded(session as NSDraggingSessionMBS, screenPoint as NSPointMBS,
operation as Integer)
459
6.31.29 draggingSessionWillBegin(session as NSDraggingSessionMBS, screenPoint as NSPointMBS,
rowIndexes as NSIndexSetMBS)
459
6.31.30 EnableMenuItems
460
6.31.31 FrameChanged
460
6.31.32 GotFocus
460
6.31.33 heightOfRow(row as Int64) as Double
460
6.31.34 isGroupRow(row as Int64) as boolean
460
6.31.35 LeftMouseDown(e as NSEventMBS) as boolean
461
6.31.36 LeftMouseDragged(e as NSEventMBS) as boolean
461
6.31.37 LeftMouseUp(e as NSEventMBS) as boolean
461
6.31.38 LostFocus
461
6.31.39 MenuAction(HitItem as MenuItem) As Boolean
462
6.31.40 MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
462
6.31.41 mouseDownInHeaderOfTableColumn(tableColumn as NSTableColumnMBS)
462
6.31.42 MouseDrag(x as Integer, y as Integer)
462
6.31.43 MouseUp(x as Integer, y as Integer)
463
6.31.44 namesOfPromisedFilesDroppedAtDestination(dropDestination as folderItem, DraggedRowsWithIndexes as NSIndexSetMBS) as string()
463
6.31.45 nextTypeSelectMatchFromRow(startRow as Int64, endRow as Int64, searchString as
string) as Int64
463
6.31.46 numberOfRowsInTableView as Integer
464
6.31.47 objectValue(column as NSTableColumnMBS, row as Integer) as Variant
464
6.31.48 OtherMouseDown(e as NSEventMBS) as boolean
464
91
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.31.49 OtherMouseDragged(e as NSEventMBS) as boolean
464
6.31.50 OtherMouseUp(e as NSEventMBS) as boolean
464
6.31.51 pasteboardItemForRow(row as Integer) as NSPasteboardItemMBS
464
6.31.52 RightMouseDown(e as NSEventMBS) as boolean
465
6.31.53 RightMouseDragged(e as NSEventMBS) as boolean
465
6.31.54 RightMouseUp(e as NSEventMBS) as boolean
465
6.31.55 rowActionsForRow(row as Integer, edge as Integer) as NSTableViewRowActionMBS()
465
6.31.56 rowViewForRow(row as Integer) as NSTableRowViewMBS
466
6.31.57 ScaleFactorChanged(NewFactor as Double)
466
6.31.58 SelectionDidChange(notification as NSNotificationMBS)
467
6.31.59 selectionIndexesForProposedSelection(proposedSelectionIndexes as NSIndexSetMBS)
as NSIndexSetMBS
467
6.31.60 SelectionIsChanging(notification as NSNotificationMBS)
467
6.31.61 selectionShouldChangeInTableView as boolean
467
6.31.62 setObjectValue(value as Variant, column as NSTableColumnMBS, row as Integer)
468
6.31.63 shouldEditTableColumn(tableColumn as NSTableColumnMBS, row as Int64) as boolean
468
6.31.64 shouldReorderColumn(columnIndex as Int64, newColumnIndex as Int64) as boolean
468
6.31.65 shouldSelectRow(row as Int64) as boolean
469
6.31.66 shouldSelectTableColumn(tableColumn as NSTableColumnMBS) as boolean
469
6.31.67 shouldShowCellExpansion(tableColumn as NSTableColumnMBS, row as Int64) as
Boolean
469
6.31.68 shouldTrackCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, row as
Int64) as Boolean
470
6.31.69 shouldTypeSelectForEvent(e as NSEventMBS, searchString as string) as Boolean 470
6.31.70 sizeToFitWidthOfColumn(column as Int64) as Double
471
6.31.71 sortDescriptorsDidChange(oldDescriptors() as NSSortDescriptorMBS)
471
6.31.72 textShouldBeginEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as
boolean
472
6.31.73 textShouldEndEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as boolean
472
6.31.74 toolTipForCell(cell as NSCellMBS, r as NSRectMBS, tableColumn as NSTableColumnMBS, row as Int64, mouseLocation as NSPointMBS) as string
472
6.31.75 typeSelectString(tableColumn as NSTableColumnMBS, row as Int64) as string 472
6.31.76 updateDraggingItemsForDrag(draggingInfo as NSDraggingInfoMBS)
473
6.31.77 validateDrop(info as NSDraggingInfoMBS, proposedRow as Integer, dropOperation
as Integer) as Integer
473
6.31.78 view(tableColumn as NSTableColumnMBS, row as Integer) as NSViewMBS
474
6.31.79 willDisplayCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, row as
Int64)
474
92
CHAPTER 1. LIST OF TOPICS
∗ 6.31.80 willTile
474
∗ 6.31.81 writeRowsWithIndexes(rowIndexes as NSIndexSetMBS, pboard as NSPasteboardMBS)
as boolean
475
– 6.32.1 class NSTableDataSourceMBS
∗
∗
∗
∗
∗
6.32.3
6.32.4
6.32.5
6.32.6
6.32.7
476
Close
476
numberOfRowsInTableView as Integer
476
objectValue(column as NSTableColumnMBS, row as Integer) as Variant
476
setObjectValue(value as Variant, column as NSTableColumnMBS, row as Integer) 476
sortDescriptorsDidChange(oldDescriptors() as NSSortDescriptorMBS)
477
– 6.33.1 class NSTableHeaderCellMBS
478
∗ 6.33.3 drawSortIndicatorWithFrame(cellFrame as NSRectMBS, inView as NSViewMBS, ascending as boolean, priority as Integer)
478
∗ 6.33.4 sortIndicatorRectForBounds(r as NSRectMBS) as NSRectMBS
478
– 6.34.1 class NSTableHeaderViewMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.34.3 columnAtPoint(point as NSPointMBS) as Integer
6.34.4 Constructor
6.34.5 Constructor(Handle as Integer)
6.34.6 Constructor(left as Double, top as Double, width as Double, height as Double)
6.34.7 draggedColumn as Integer
6.34.8 draggedDistance as Double
6.34.9 headerRectOfColumn(Column as Integer) as NSRectMBS
6.34.10 resizedColumn as Integer
6.34.12 tableView as NSTableViewMBS
– 6.35.1 class NSTableRowViewMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.35.3 Constructor
6.35.5 backgroundColor as NSColorMBS
6.35.6 emphasized as Boolean
6.35.7 Floating as Boolean
6.35.8 groupRowStyle as Boolean
6.35.9 NextRowSelected as Boolean
6.35.10 PreviousRowSelected as Boolean
6.35.11 selected as Boolean
6.35.12 selectionHighlightStyle as Integer
– 6.36.1 class NSTableViewMBS
479
479
479
479
480
480
480
481
481
481
482
482
482
482
483
483
483
483
483
484
485
∗ 6.36.3 addTableColumn(column as NSTableColumnMBS)
485
∗ 6.36.4 beginUpdates
485
∗ 6.36.5 canDragRowsWithIndexes(rowIndexes as NSIndexSetMBS, mouseDownPoint as NSPointMBS) as Boolean
486
∗ 6.36.6 columnAtPoint(p as NSPointMBS) as Integer
486
∗ 6.36.7 columnAtPoint(x as Double, y as Double) as Integer
486
∗ 6.36.8 columnForView(view as NSViewMBS) as Integer
486
93
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.36.9 columnIndexesInRect(rect as NSRectMBS) as NSIndexSetMBS
487
6.36.10 columnWithIdentifier(identifier as string) as Integer
487
6.36.11 Constructor
487
6.36.12 Constructor(Handle as Integer)
487
6.36.13 Constructor(left as Double, top as Double, width as Double, height as Double) 488
6.36.14 deselectAll
488
6.36.15 deselectColumn(column as Integer)
488
6.36.16 deselectRow(row as Integer)
489
6.36.17 Destructor
489
6.36.18 dragImageForRowsWithIndexes(dragRows as NSIndexSetMBS, tableColumns() as
NSTableColumnMBS, theEvent as NSEventMBS, byref dragImageOffset as NSPointMBS)
as NSImageMBS
489
6.36.19 edit(column as Integer, row as Integer, selectit as boolean)
489
6.36.20 endUpdates
490
6.36.21 frameOfCellAtColumnRow(column as Integer, row as Integer) as NSRectMBS 490
6.36.22 hiddenRowIndexes as NSIndexSetMBS
490
6.36.23 hideRowsAtIndexes(indexes as NSIndexSetMBS, animationOptions as Integer) 491
6.36.24 insertRowsAtIndexes(indexes as NSIndexSetMBS, animationOptions as Integer) 491
6.36.25 isColumnSelected(column as Integer) as boolean
491
6.36.26 isRowSelected(row as Integer) as boolean
492
6.36.27 moveColumn(column as Integer, toIndex as Integer)
492
6.36.28 moveRowAtIndex(oldIndex as Integer, newIndex as Integer)
492
6.36.29 noteHeightOfRowsWithIndexesChanged(indexSet as NSIndexSetMBS)
492
6.36.30 noteNumberOfRowsChanged
493
6.36.31 rectOfColumn(column as Integer) as NSRectMBS
493
6.36.32 rectOfRow(row as Integer) as NSRectMBS
493
6.36.33 reloadData
494
6.36.34 reloadData(rowIndexes as NSIndexSetMBS, columnIndexes as NSIndexSetMBS) 494
6.36.35 removeRowsAtIndexes(indexes as NSIndexSetMBS, animationOptions as Integer) 494
6.36.36 removeTableColumn(column as NSTableColumnMBS)
495
6.36.37 rowAtPoint(p as NSPointMBS) as Integer
495
6.36.38 rowAtPoint(x as Double, y as Double) as Integer
495
6.36.39 rowForView(view as NSViewMBS) as Integer
496
6.36.40 rowsInRect(rect as NSRectMBS) as NSRangeMBS
496
6.36.41 rowViewAtRow(row as Integer, makeIfNecessary as Boolean) as NSViewMBS
496
6.36.42 scrollColumnToVisible(column as Integer)
497
6.36.43 scrollRowToVisible(row as Integer)
497
6.36.44 ScrollToLine(Line as Integer, Animated as Boolean)
497
6.36.45 selectAll
497
6.36.46 selectColumnIndexes(indexes as NSIndexSetMBS, extend as boolean)
498
6.36.47 selectedColumnIndexes as NSIndexSetMBS
498
6.36.48 selectedRowIndexes as NSIndexSetMBS
498
94
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.36.49 selectRowIndexes(indexes as NSIndexSetMBS, extend as boolean)
498
6.36.50 setDraggingSourceOperationMask(mask as Integer, isLocal as Boolean)
498
6.36.51 setDropRow(row as Integer, dropOperation as Integer)
499
6.36.52 setSortDescriptor(sortDescriptor as NSSortDescriptorMBS)
499
6.36.53 setSortDescriptors(sortDescriptors() as NSSortDescriptorMBS)
499
6.36.54 sizeLastColumnToFit
500
6.36.55 sizeToFit
500
6.36.56 sortDescriptors as NSSortDescriptorMBS()
500
6.36.57 tableColumns as NSTableColumnMBS()
500
6.36.58 tableColumnWithIdentifier(identifier as string) as NSTableColumnMBS
500
6.36.59 tile
501
6.36.60 unhideRowsAtIndexes(indexes as NSIndexSetMBS, animationOptions as Integer) 501
6.36.61 viewAtColumn(column as Integer, row as Integer, makeIfNecessary as Boolean) as
NSViewMBS
501
6.36.63 allowsColumnReordering as boolean
502
6.36.64 allowsColumnResizing as boolean
502
6.36.65 allowsColumnSelection as boolean
502
6.36.66 allowsEmptySelection as boolean
502
6.36.67 allowsMultipleSelection as boolean
502
6.36.68 allowsTypeSelect as boolean
503
6.36.69 autosaveName as string
503
6.36.70 autosaveTableColumns as boolean
503
6.36.71 backgroundColor as NSColorMBS
504
6.36.72 clickedColumn as Integer
504
6.36.73 clickedRow as Integer
504
6.36.74 columnAutoresizingStyle as Integer
504
6.36.75 cornerView as NSViewMBS
505
6.36.76 dataSource as NSTableDataSourceMBS
505
6.36.77 draggingDestinationFeedbackStyle as Integer
505
6.36.78 editedColumn as Integer
505
6.36.79 editedRow as Integer
506
6.36.80 effectiveRowSizeStyle as Integer
506
6.36.81 floatsGroupRows as Boolean
506
6.36.82 focusedColumn as Integer
506
6.36.83 gridColor as NSColorMBS
507
6.36.84 gridStyleMask as Integer
507
6.36.85 headerView as NSTableHeaderViewMBS
507
6.36.86 highlightedtableColumn as NSTableColumnMBS
508
6.36.87 intercellSpacing as NSSizeMBS
508
6.36.88 numberOfColumns as Integer
508
6.36.89 numberOfRows as Integer
508
6.36.90 numberOfSelectedColumns as Integer
509
95
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.36.91 numberOfSelectedRows as Integer
509
6.36.92 rowActionsVisible as Boolean
509
6.36.93 rowHeight as Double
509
6.36.94 rowSizeStyle as Integer
509
6.36.95 selectedColumn as Integer
510
6.36.96 selectedRow as Integer
510
6.36.97 selectionHighlightStyle as Integer
510
6.36.98 usesAlternatingRowBackgroundColors as boolean
511
6.36.99 usesStaticContents as Boolean
511
6.36.100 verticalMotionCanBeginDrag as boolean
511
6.36.101 indicatorImageInTableColumn(column as NSTableColumnMBS) as NSImageMBS
512
6.36.103 ColumnDidMove(notification as NSNotificationMBS, oldColumn as Integer, newColumn as Integer)
512
6.36.104 ColumnDidResize(notification as NSNotificationMBS, column as NSTableColumnMBS, index as Integer)
512
6.36.105 dataCell(tableColumn as NSTableColumnMBS, row as Int64) as NSCellMBS 513
6.36.106 didAddRowView(rowView as NSTableRowViewMBS, row as Integer)
513
6.36.107 didClickTableColumn(tableColumn as NSTableColumnMBS)
513
6.36.108 didDragTableColumn(tableColumn as NSTableColumnMBS)
513
6.36.109 didRemoveRowView(rowView as NSTableRowViewMBS, row as Integer)
514
6.36.110 DoubleClick
514
6.36.111 heightOfRow(row as Int64) as Double
514
6.36.112 isGroupRow(row as Int64) as boolean
515
6.36.113 mouseDownInHeaderOfTableColumn(tableColumn as NSTableColumnMBS)
515
6.36.114 nextTypeSelectMatchFromRow(startRow as Int64, endRow as Int64, searchString
as string) as Int64
515
6.36.115 rowViewForRow(row as Integer) as NSTableRowViewMBS
516
6.36.116 SelectionDidChange(notification as NSNotificationMBS)
516
6.36.117 selectionIndexesForProposedSelection(proposedSelectionIndexes as NSIndexSetMBS)
as NSIndexSetMBS
516
6.36.118 SelectionIsChanging(notification as NSNotificationMBS)
517
6.36.119 selectionShouldChangeInTableView as boolean
517
6.36.120 shouldEditTableColumn(tableColumn as NSTableColumnMBS, row as Int64) as
boolean
517
6.36.121 shouldReorderColumn(columnIndex as Int64, newColumnIndex as Int64) as boolean
518
6.36.122 shouldSelectRow(row as Int64) as boolean
518
6.36.123 shouldSelectTableColumn(tableColumn as NSTableColumnMBS) as boolean
518
6.36.124 shouldShowCellExpansion(tableColumn as NSTableColumnMBS, row as Int64) as
Boolean
519
6.36.125 shouldTrackCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, row as
Int64) as Boolean
519
96
CHAPTER 1. LIST OF TOPICS
∗ 6.36.126 shouldTypeSelectForEvent(e as NSEventMBS, searchString as string) as Boolean
520
∗ 6.36.127 sizeToFitWidthOfColumn(column as Int64) as Double
520
∗ 6.36.128 textShouldBeginEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as
boolean
521
∗ 6.36.129 textShouldEndEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as
boolean
521
∗ 6.36.130 toolTipForCell(cell as NSCellMBS, r as NSRectMBS, tableColumn as NSTableColumnMBS, row as Int64, mouseLocation as NSPointMBS) as string
521
∗ 6.36.131 typeSelectString(tableColumn as NSTableColumnMBS, row as Int64) as string 522
∗ 6.36.132 view(tableColumn as NSTableColumnMBS, row as Integer) as NSViewMBS
522
∗ 6.36.133 willDisplayCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, row as
Int64)
522
∗ 6.36.135 NSTableRowActionEdgeLeading = 0
523
∗ 6.36.136 NSTableRowActionEdgeTrailing = 1
523
∗ 6.36.137 NSTableViewAnimationEffectFade = 1
523
∗ 6.36.138 NSTableViewAnimationEffectGap = 2
523
∗ 6.36.139 NSTableViewAnimationEffectNone = 0
523
∗ 6.36.140 NSTableViewAnimationSlideDown = & h20
524
∗ 6.36.141 NSTableViewAnimationSlideLeft = & h30
524
∗ 6.36.142 NSTableViewAnimationSlideRight = & h40
524
∗ 6.36.143 NSTableViewAnimationSlideUp = & h10
524
∗ 6.36.144 NSTableViewDashedHorizontalGridLineMask=8
524
∗ 6.36.145 NSTableViewDraggingDestinationFeedbackStyleGap=2
524
∗ 6.36.146 NSTableViewDraggingDestinationFeedbackStyleNone=-1
525
∗ 6.36.147 NSTableViewDraggingDestinationFeedbackStyleRegular=0
525
∗ 6.36.148 NSTableViewDraggingDestinationFeedbackStyleSourceList=1
525
∗ 6.36.149 NSTableViewDropAbove=1
525
∗ 6.36.150 NSTableViewDropOn=0
526
∗ 6.36.151 NSTableViewFirstColumnOnlyAutoresizingStyle=5
526
∗ 6.36.152 NSTableViewGridNone=0
526
∗ 6.36.153 NSTableViewLastColumnOnlyAutoresizingStyle=4
526
∗ 6.36.154 NSTableViewNoColumnAutoresizing=0
527
∗ 6.36.155 NSTableViewReverseSequentialColumnAutoresizingStyle=3
527
∗ 6.36.156 NSTableViewRowSizeStyleCustom = 0
527
∗ 6.36.157 NSTableViewRowSizeStyleDefault = -1
527
∗ 6.36.158 NSTableViewRowSizeStyleLarge = 3
528
∗ 6.36.159 NSTableViewRowSizeStyleMedium = 2
528
∗ 6.36.160 NSTableViewRowSizeStyleSmall = 1
528
∗ 6.36.161 NSTableViewSelectionHighlightStyleNone=-1
529
∗ 6.36.162 NSTableViewSelectionHighlightStyleRegular=0
529
∗ 6.36.163 NSTableViewSelectionHighlightStyleSourceList=1
529
97
∗
∗
∗
∗
6.36.164
6.36.165
6.36.166
6.36.167
NSTableViewSequentialColumnAutoresizingStyle=2
NSTableViewSolidHorizontalGridLineMask=2
NSTableViewSolidVerticalGridLineMask=1
NSTableViewUniformColumnAutoresizingStyle=1
– 6.37.1 class NSTableViewRowActionMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.37.3 available as boolean
6.37.4 Constructor(Style as Integer, Title as String)
6.37.6 BackgroundColor as NSColorMBS
6.37.7 Handle as Integer
6.37.8 Image as NSImageMBS
6.37.9 Style as Integer
6.37.10 Title as String
6.37.12 Action(row as Integer)
6.37.14 NSTableViewRowActionStyleDestructive = 1
6.37.15 NSTableViewRowActionStyleRegular = 0
– 6.38.1 control NSTokenFieldControlMBS
529
530
530
530
531
531
531
532
532
532
532
533
533
533
533
534
∗ 6.38.3 View as NSTokenFieldMBS
534
∗ 6.38.5 BoundsChanged
534
∗ 6.38.6 completionsForSubstring(substring as string, tokenIndex as Integer, byref selectedIndex
as Integer) as Variant()
534
∗ 6.38.7 displayStringForRepresentedObject(representedObject as Variant) as string
535
∗ 6.38.8 editingStringForRepresentedObject(representedObject as Variant) as string
535
∗ 6.38.9 EnableMenuItems
535
∗ 6.38.10 FrameChanged
535
∗ 6.38.11 GotFocus
535
∗ 6.38.12 hasMenuForRepresentedObject(representedObject as Variant) as boolean
536
∗ 6.38.13 LostFocus
536
∗ 6.38.14 MenuAction(HitItem as MenuItem) As Boolean
536
∗ 6.38.15 menuForRepresentedObject(representedObject as Variant) as NSMenuMBS
536
∗ 6.38.16 MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
536
∗ 6.38.17 MouseDrag(x as Integer, y as Integer)
537
∗ 6.38.18 MouseUp(x as Integer, y as Integer)
537
∗ 6.38.19 readFromPasteboard(pboard as NSPasteboardMBS) as Variant()
537
∗ 6.38.20 representedObjectForEditingString(editingString as string) as Variant
538
∗ 6.38.21 ScaleFactorChanged(NewFactor as Double)
538
∗ 6.38.22 shouldAddObjects(tokens() as Variant, index as Integer) as Variant()
538
∗ 6.38.23 styleForRepresentedObject(representedObject as Variant) as Integer
538
∗ 6.38.24 TextDidBeginEditing(fieldEditor as NSTextMBS, notification as NSNotificationMBS)
539
∗ 6.38.25 TextDidChange(fieldEditor as NSTextMBS, notification as NSNotificationMBS) 539
∗ 6.38.26 TextDidEndEditing(fieldEditor as NSTextMBS, notification as NSNotificationMBS)
540
98
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
6.38.27 textShouldBeginEditing(fieldEditor as NSTextMBS) as boolean
540
6.38.28 textShouldEndEditing(fieldEditor as NSTextMBS) as boolean
540
6.38.29 tokenFieldAction
541
6.38.30 tokenFieldTextShouldBeginEditing(fieldEditor as NSTextMBS) as boolean
541
6.38.31 tokenFieldTextShouldEndEditing(fieldEditor as NSTextMBS) as boolean
541
6.38.32 writeRepresentedObjects(objects() as Variant, pboard as NSPasteboardMBS) as boolean
541
99
• 5 Cocoa
151
– 5.4.1 class NSTokenFieldMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
– 5.5.1 class NSToolbarItemGroupMBS
∗ 5.5.3 Constructor(itemIdentifier as string)
∗ 5.5.4 SetSubItems(items() as NSToolbarItemMBS)
∗ 5.5.5 subitems as NSToolbarItemMBS()
– 5.6.1 class NSToolbarItemMBS
∗
∗
∗
∗
∗
∗
163
5.4.3 Constructor
163
5.4.4 Constructor(Handle as Integer)
164
5.4.5 Constructor(left as Double, top as Double, width as Double, height as Double)
164
5.4.6 defaultCompletionDelay as Double
164
5.4.7 defaultTokenizingCharacterSet as NSCharacterSetMBS
165
5.4.8 objects as Variant()
165
5.4.9 setObjects(objects() as Variant)
165
5.4.11 completionDelay as Double
165
5.4.12 tokenizingCharacterSet as NSCharacterSetMBS
165
5.4.13 tokenStyle as Integer
165
5.4.15 completionsForSubstring(substring as string, tokenIndex as Integer, byref selectedIndex
as Integer) as Variant()
166
5.4.16 displayStringForRepresentedObject(representedObject as Variant) as string
166
5.4.17 editingStringForRepresentedObject(representedObject as Variant) as string
166
5.4.18 hasMenuForRepresentedObject(representedObject as Variant) as boolean
167
5.4.19 menuForRepresentedObject(representedObject as Variant) as NSMenuMBS
167
5.4.20 readFromPasteboard(pboard as NSPasteboardMBS) as Variant()
167
5.4.21 representedObjectForEditingString(editingString as string) as Variant
167
5.4.22 shouldAddObjects(tokens() as Variant, index as Integer) as Variant()
168
5.4.23 styleForRepresentedObject(representedObject as Variant) as Integer
168
5.4.24 tokenFieldAction
169
5.4.25 tokenFieldTextShouldBeginEditing(fieldEditor as NSTextMBS) as boolean
169
5.4.26 tokenFieldTextShouldEndEditing(fieldEditor as NSTextMBS) as boolean
169
5.4.27 writeRepresentedObjects(objects() as Variant, pboard as NSPasteboardMBS) as boolean
169
5.4.29 NSDefaultTokenStyle = 0
169
5.4.30 NSPlainTextTokenStyle = 1
170
5.4.31 NSRoundedTokenStyle = 2
170
5.6.3
5.6.4
5.6.5
5.6.6
5.6.7
5.6.8
Constructor(itemIdentifier as string)
NSToolbarCustomizeToolbarItemIdentifier as string
NSToolbarFlexibleSpaceItemIdentifier as string
NSToolbarPrintItemIdentifier as string
NSToolbarSeparatorItemIdentifier as string
NSToolbarShowColorsItemIdentifier as string
171
171
171
171
172
172
172
172
173
173
173
100
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
5.6.9 NSToolbarShowFontsItemIdentifier as string
5.6.10 NSToolbarSpaceItemIdentifier as string
5.6.11 validate
5.6.13 allowsDuplicatesInToolbar as boolean
5.6.14 autovalidates as boolean
5.6.15 ClassName as String
5.6.16 ClassPath as String
5.6.17 Enabled as boolean
5.6.18 Handle as Integer
5.6.19 image as NSImageMBS
5.6.20 itemIdentifier as string
5.6.21 label as string
5.6.22 MaxSize as NSSizeMBS
5.6.23 menuFormRepresentation as NSMenuItemMBS
5.6.24 MinSize as NSSizeMBS
5.6.25 paletteLabel as string
5.6.26 tag as Integer
5.6.27 toolbar as NSToolbarMBS
5.6.28 toolTip as string
5.6.29 view as NSViewMBS
5.6.30 visibilityPriority as Integer
5.6.32 NSToolbarItemVisibilityPriorityHigh = 1000
5.6.33 NSToolbarItemVisibilityPriorityLow = -1000
5.6.34 NSToolbarItemVisibilityPriorityStandard = 0
5.6.35 NSToolbarItemVisibilityPriorityUser = 2000
– 5.7.1 class NSToolbarMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
5.7.3 Constructor(Identifier as string)
5.7.4 insertItemWithItemIdentifier(identifier as string, atIndex as Integer)
5.7.5 items as NSToolbarItemMBS()
5.7.6 NSToolbarDidRemoveItemNotification as string
5.7.7 NSToolbarWillAddItemNotification as string
5.7.8 removeItemAtIndex(index as Integer)
5.7.9 runCustomizationPalette
5.7.10 validateVisibleItems
5.7.11 visibleItems as NSToolbarItemMBS()
5.7.13 allowsUserCustomization as boolean
5.7.14 autosavesConfiguration as boolean
5.7.15 configurationDictionary as dictionary
5.7.16 configurationDictionaryData as Memoryblock
5.7.17 customizationPaletteIsRunning as boolean
5.7.18 displayMode as Integer
173
173
173
174
174
174
174
175
175
175
175
175
176
176
176
176
176
177
177
177
177
178
178
178
178
180
180
180
180
180
181
181
181
181
182
182
182
183
183
183
183
101
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
5.7.19
5.7.20
5.7.21
5.7.22
5.7.23
5.7.24
5.7.25
5.7.26
5.7.27
5.7.28
5.7.30
5.7.31
5.7.32
5.7.33
5.7.34
5.7.35
5.7.36
fullScreenAccessoryView as NSViewMBS
fullScreenAccessoryViewMaxHeight as Double
fullScreenAccessoryViewMinHeight as Double
Handle as Integer
identifier as string
selectedItemIdentifier as string
showsBaselineSeparator as boolean
sizeMode as Integer
toolbarView as NSViewMBS
visible as boolean
NSToolbarDisplayModeDefault = 0
NSToolbarDisplayModeIconAndLabel = 1
NSToolbarDisplayModeIconOnly = 2
NSToolbarDisplayModeLabelOnly = 3
NSToolbarSizeModeDefault = 0
NSToolbarSizeModeRegular = 1
NSToolbarSizeModeSmall = 2
184
184
184
184
184
185
185
185
185
186
186
186
186
186
187
187
187
102
CHAPTER 1. LIST OF TOPICS
• 6 Cocoa Controls
– 6.39.1 control NSViewControlMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
189
542
6.39.3 View as NSViewMBS
542
6.39.5 acceptsFirstMouse(e as NSEventMBS) as boolean
542
6.39.6 acceptsFirstResponder as boolean
542
6.39.7 becomeFirstResponder as boolean
543
6.39.8 beginGestureWithEvent(e as NSEventMBS) as boolean
543
6.39.9 canBecomeKeyView as boolean
543
6.39.10 Close
543
6.39.11 concludeDragOperation(sender as NSDraggingInfoMBS)
543
6.39.12 draggingEnded(sender as NSDraggingInfoMBS)
544
6.39.13 draggingEntered(sender as NSDraggingInfoMBS) as Integer
544
6.39.14 draggingExited(sender as NSDraggingInfoMBS)
545
6.39.15 draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
545
6.39.16 draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
545
6.39.17 draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
546
6.39.18 draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as
NSPointMBS)
546
6.39.19 draggingSourceOperationMaskForLocal(flag as boolean) as Integer
546
6.39.20 draggingUpdated(sender as NSDraggingInfoMBS) as Integer
547
6.39.21 drawFocusRingMask(g as NSGraphicsMBS) as boolean
548
6.39.22 DrawRect(g as NSGraphicsMBS, left as Double, top as Double, width as Double,
height as Double)
548
6.39.23 EnableMenuItems
548
6.39.24 endGestureWithEvent(e as NSEventMBS) as boolean
548
6.39.25 focusRingMaskBounds as NSRectMBS
549
6.39.26 ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
549
6.39.27 isOpaque as boolean
549
6.39.28 keyDown(e as NSEventMBS) as boolean
550
6.39.29 keyUp(e as NSEventMBS) as boolean
550
6.39.30 magnifyWithEvent(e as NSEventMBS) as boolean
550
6.39.31 MenuAction(HitItem as MenuItem) As Boolean
550
6.39.32 menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS
551
6.39.33 mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
551
6.39.34 mouseDownCanMoveWindow as boolean
551
6.39.35 mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
551
6.39.36 mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
552
103
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
6.39.37
6.39.38
6.39.39
6.39.40
6.39.41
6.39.42
6.39.43
6.39.44
6.39.45
6.39.46
6.39.47
6.39.48
6.39.49
6.39.50
6.39.51
6.39.52
6.39.53
6.39.54
6.39.55
6.39.56
6.39.57
mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Open
otherMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
performDragOperation(sender as NSDraggingInfoMBS) as boolean
prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
pressureChange(e as NSEventMBS) as boolean
resignFirstResponder as boolean
rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
rotateWithEvent(e as NSEventMBS) as boolean
ScaleFactorChanged(NewFactor as Double)
scrollWheel(e as NSEventMBS) as boolean
swipeWithEvent(e as NSEventMBS) as boolean
updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
viewDidMoveToWindow
wantsPeriodicDraggingUpdates as boolean
552
552
552
552
552
553
553
553
554
554
554
554
555
555
555
555
555
556
556
556
557
104
CHAPTER 1. LIST OF TOPICS
• 13 PDFKit
1095
– 13.2.1 class PDFActionGoToMBS
∗ 13.2.3 Constructor(destination as PDFDestinationMBS)
∗ 13.2.5 destination as PDFDestinationMBS
– 13.3.1 class PDFActionMBS
∗
∗
∗
∗
1112
1112
1113
Constructor
copy as PDFActionMBS
type as string
Handle as Integer
1113
1113
1114
1114
– 13.4.1 class PDFActionNamedMBS
1115
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
13.3.3
13.3.4
13.3.5
13.3.7
1112
13.4.3 Constructor(name as Integer)
13.4.5 name as Integer
13.4.7 kPDFActionNamedFind = 8
13.4.8 kPDFActionNamedFirstPage = 3
13.4.9 kPDFActionNamedGoBack = 5
13.4.10 kPDFActionNamedGoForward = 6
13.4.11 kPDFActionNamedGoToPage = 7
13.4.12 kPDFActionNamedLastPage = 4
13.4.13 kPDFActionNamedNextPage = 1
13.4.14 kPDFActionNamedNone = 0
13.4.15 kPDFActionNamedPreviousPage = 2
13.4.16 kPDFActionNamedPrint = 9
13.4.17 kPDFActionNamedZoomIn = 10
13.4.18 kPDFActionNamedZoomOut = 11
– 13.5.1 class PDFActionRemoteGoToMBS
∗
∗
∗
∗
∗
13.5.3
13.5.4
13.5.6
13.5.7
13.5.8
Constructor(PageIndex as Integer, atPoint as NSPointMBS, file as folderitem)
Constructor(PageIndex as Integer, atPoint as NSPointMBS, url as string)
pageIndex as Integer
point as NSPointMBS
URL as string
– 13.6.1 class PDFActionResetFormMBS
∗
∗
∗
∗
13.6.3
13.6.4
13.6.5
13.6.7
Constructor
fields as string()
setFields(fields() as string)
fieldsIncludedAreCleared as boolean
– 13.7.1 class PDFActionURLMBS
∗ 13.7.3 Constructor(url as string)
∗ 13.7.5 URL as string
– 13.8.1 class PDFAnnotationButtonWidgetMBS
1115
1115
1115
1116
1116
1116
1116
1116
1117
1117
1117
1117
1117
1118
1119
1119
1119
1120
1120
1120
1121
1121
1121
1121
1122
1123
1123
1123
1124
105
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
13.8.3 Constructor(left as single, top as single, width as single, height as single)
13.8.5 allowsToggleToOff as boolean
13.8.6 backgroundColor as NSColorMBS
13.8.7 caption as string
13.8.8 controlType as Integer
13.8.9 fieldName as string
13.8.10 font as NSFontMBS
13.8.11 fontColor as NSColorMBS
13.8.12 Highlighted as boolean
13.8.13 onStateValue as string
13.8.14 state as Integer
13.8.16 drawWithBox(box as Integer, g as NSGraphicsMBS) as boolean
13.8.18 kPDFWidgetCheckBoxControl = 2
13.8.19 kPDFWidgetPushButtonControl = 0
13.8.20 kPDFWidgetRadioButtonControl = 1
13.8.21 kPDFWidgetUnknownControl = -1
13.8.22 NSOffState = 0
13.8.23 NSOnState = 1
– 13.9.1 class PDFAnnotationChoiceWidgetMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
13.9.3 choices as string()
13.9.4 Constructor(left as single, top as single, width as single, height as single)
13.9.5 setChoices(choices() as string)
13.9.7 backgroundColor as NSColorMBS
13.9.8 fieldName as string
13.9.9 font as NSFontMBS
13.9.10 fontColor as NSColorMBS
13.9.11 isListChoice as boolean
13.9.12 stringValue as string
13.9.14 drawWithBox(box as Integer, g as NSGraphicsMBS) as boolean
– 13.10.1 class PDFAnnotationCircleMBS
∗ 13.10.3 Constructor(left as single, top as single, width as single, height as single)
∗ 13.10.5 interiorColor as NSColorMBS
∗ 13.10.7 drawWithBox(box as Integer, g as NSGraphicsMBS) as boolean
– 13.11.1 class PDFAnnotationFreeTextMBS
∗
∗
∗
∗
∗
∗
∗
13.11.3 Constructor(left as single, top as single, width as single, height as single)
13.11.5 alignment as Integer
13.11.6 font as NSFontMBS
13.11.7 fontColor as NSColorMBS
13.11.9 drawWithBox(box as Integer, g as NSGraphicsMBS) as boolean
13.11.11 NSCenterTextAlignment=2
13.11.12 NSJustifiedTextAlignment=3
1124
1124
1124
1124
1125
1125
1125
1126
1126
1126
1126
1127
1127
1127
1127
1127
1127
1128
1129
1129
1129
1129
1130
1130
1130
1130
1131
1131
1131
1132
1132
1133
1133
1134
1134
1134
1135
1135
1135
1136
1136
106
CHAPTER 1. LIST OF TOPICS
∗ 13.11.13 NSLeftTextAlignment=0
∗ 13.11.14 NSNaturalTextAlignment=4
∗ 13.11.15 NSRightTextAlignment=1
– 13.12.1 class PDFAnnotationInkMBS
∗
∗
∗
∗
∗
13.12.3
13.12.4
13.12.5
13.12.6
13.12.8
addBezierPath(path as NSBezierPathMBS)
Constructor(left as single, top as single, width as single, height as single)
paths as NSBezierPathMBS()
removeBezierPath(path as NSBezierPathMBS)
drawWithBox(box as Integer, g as NSGraphicsMBS) as boolean
– 13.13.1 class PDFAnnotationLineMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
13.13.3 Constructor(left as single, top as single, width as single, height as single)
13.13.5 endLineStyle as Integer
13.13.6 endPoint as NSPointMBS
13.13.7 interiorColor as NSColorMBS
13.13.8 startLineStyle as Integer
13.13.9 startPoint as NSPointMBS
13.13.11 drawWithBox(box as Integer, g as NSGraphicsMBS) as boolean
13.13.13 kPDFLineStyleCircle=2
13.13.14 kPDFLineStyleClosedArrow=5
13.13.15 kPDFLineStyleDiamond=3
13.13.16 kPDFLineStyleNone=0
13.13.17 kPDFLineStyleOpenArrow=4
13.13.18 kPDFLineStyleSquare=1
– 13.14.1 class PDFAnnotationLinkMBS
∗
∗
∗
∗
∗
13.14.3
13.14.4
13.14.6
13.14.7
13.14.9
Constructor(left as single, top as single, width as single, height as single)
setHighlighted(value as boolean)
destination as PDFDestinationMBS
URL as string
drawWithBox(box as Integer, g as NSGraphicsMBS) as boolean
– 13.15.1 class PDFAnnotationMarkupMBS
∗
∗
∗
∗
∗
∗
∗
∗
13.15.3 Constructor(left as single, top as single, width as single, height as single)
13.15.4 quadrilateralPoints as NSPointMBS()
13.15.5 setQuadrilateralPoints(points() as NSPointMBS)
13.15.7 markupType as Integer
13.15.9 drawWithBox(box as Integer, g as NSGraphicsMBS) as boolean
13.15.11 kPDFMarkupTypeHighlight=0
13.15.12 kPDFMarkupTypeStrikeOut=1
13.15.13 kPDFMarkupTypeUnderline=2
– 13.16.1 class PDFAnnotationMBS
∗ 13.16.3 Constructor
1136
1136
1136
1137
1137
1137
1137
1138
1138
1139
1139
1139
1140
1140
1141
1141
1142
1142
1142
1143
1143
1143
1144
1145
1145
1146
1146
1146
1146
1147
1147
1147
1148
1148
1149
1149
1149
1150
1151
1151
107
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
13.16.4 copy as PDFAnnotationMBS
13.16.5 Destructor
13.16.6 drawWithBox(box as Integer)
13.16.7 removeAllAppearanceStreams
13.16.9 border as PDFBorderMBS
13.16.10 bounds as NSRectMBS
13.16.11 colorValue as NSColorMBS
13.16.12 contents as string
13.16.13 Handle as Integer
13.16.14 hasAppearanceStream as boolean
13.16.15 modificationDate as date
13.16.16 mouseUpAction as PDFActionMBS
13.16.17 page as PDFPageMBS
13.16.18 popup as Variant
13.16.19 shouldDisplay as boolean
13.16.20 shouldPrint as boolean
13.16.21 toolTip as string
13.16.22 type as string
13.16.23 userName as string
– 13.17.1 class PDFAnnotationPopupMBS
∗ 13.17.3 Constructor(left as single, top as single, width as single, height as single)
∗ 13.17.5 isOpen as boolean
∗ 13.17.7 drawWithBox(box as Integer, g as NSGraphicsMBS) as boolean
– 13.18.1 class PDFAnnotationSquareMBS
∗ 13.18.3 Constructor(left as single, top as single, width as single, height as single)
∗ 13.18.5 interiorColor as NSColorMBS
∗ 13.18.7 drawWithBox(box as Integer, g as NSGraphicsMBS) as boolean
– 13.19.1 class PDFAnnotationStampMBS
∗ 13.19.3 Constructor(left as single, top as single, width as single, height as single)
∗ 13.19.5 name as string
∗ 13.19.7 drawWithBox(box as Integer, g as NSGraphicsMBS) as boolean
– 13.20.1 class PDFAnnotationTextMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
13.20.3 Constructor(left as single, top as single, width as single, height as single)
13.20.5 iconType as Integer
13.20.7 drawWithBox(box as Integer, g as NSGraphicsMBS) as boolean
13.20.9 kPDFTextAnnotationIconComment=0
13.20.10 kPDFTextAnnotationIconHelp=3
13.20.11 kPDFTextAnnotationIconInsert=6
13.20.12 kPDFTextAnnotationIconKey=1
13.20.13 kPDFTextAnnotationIconNewParagraph=4
13.20.14 kPDFTextAnnotationIconNote=2
1151
1151
1152
1152
1152
1153
1153
1154
1154
1155
1155
1155
1155
1155
1156
1156
1156
1156
1157
1158
1158
1158
1158
1159
1159
1160
1160
1161
1161
1161
1162
1163
1163
1163
1163
1164
1164
1164
1164
1164
1164
108
CHAPTER 1. LIST OF TOPICS
∗ 13.20.15 kPDFTextAnnotationIconParagraph=5
– 13.21.1 class PDFAnnotationTextWidgetMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
13.21.3 Constructor(left as single, top as single, width as single, height as single)
13.21.5 alignment as Integer
13.21.6 attributedStringValue as NSAttributedStringMBS
13.21.7 backgroundColor as NSColorMBS
13.21.8 fieldName as string
13.21.9 font as NSFontMBS
13.21.10 fontColor as NSColorMBS
13.21.11 maximumLength as Integer
13.21.12 rotation as Integer
13.21.13 stringValue as string
13.21.15 drawWithBox(box as Integer, g as NSGraphicsMBS) as boolean
13.21.17 NSCenterTextAlignment=2
13.21.18 NSJustifiedTextAlignment=3
13.21.19 NSLeftTextAlignment=0
13.21.20 NSNaturalTextAlignment=4
13.21.21 NSRightTextAlignment=1
– 13.22.1 class PDFBorderMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
13.22.3 Constructor
13.22.4 copy as PDFBorderMBS
13.22.5 dashPattern as Double()
13.22.6 setDashPattern(values() as Double)
13.22.8 horizontalCornerRadius as single
13.22.9 lineWidth as single
13.22.10 style as Integer
13.22.11 verticalCornerRadius as single
13.22.13 kPDFBorderStyleBeveled = 2
13.22.14 kPDFBorderStyleDashed = 1
13.22.15 kPDFBorderStyleInset = 3
13.22.16 kPDFBorderStyleSolid = 0
13.22.17 kPDFBorderStyleUnderline = 4
– 13.23.1 class PDFDestinationMBS
∗
∗
∗
∗
∗
∗
∗
13.23.3 compare(dest as PDFDestinationMBS) as Integer
13.23.4 Constructor(page as PDFPageMBS, point as NSPointMBS)
13.23.5 copy as PDFDestinationMBS
13.23.6 kPDFDestinationUnspecifiedValue as single
13.23.7 page as PDFPageMBS
13.23.8 point as NSPointMBS
13.23.10 Zoom as Double
– 13.24.1 class PDFDocumentDelegateMBS
1164
1165
1165
1165
1165
1165
1166
1166
1166
1166
1167
1167
1167
1167
1168
1168
1168
1168
1169
1169
1169
1169
1169
1170
1170
1170
1171
1171
1172
1172
1172
1173
1174
1174
1174
1175
1175
1175
1175
1176
1177
109
∗
∗
∗
∗
∗
∗
∗
∗
∗
13.24.3 Close
13.24.4 didMatchString(selection as PDFSelectionMBS)
13.24.5 documentDidBeginDocumentFind
13.24.6 documentDidBeginPageFind(PageIndex as Integer)
13.24.7 documentDidEndDocumentFind
13.24.8 documentDidEndPageFind(PageIndex as Integer)
13.24.9 documentDidFindMatch(selection as PDFSelectionMBS)
13.24.10 documentDidUnlock
13.24.11 Open
– 13.25.1 class PDFDocumentMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
1177
1177
1177
1177
1177
1178
1178
1178
1178
1179
13.25.3 appendPage(page as PDFPageMBS)
1179
13.25.4 beginFindString(text as string, options as Integer)
1179
13.25.5 cancelFindString
1179
13.25.6 Constructor
1179
13.25.7 Constructor(data as memoryblock)
1180
13.25.8 Constructor(file as folderitem)
1180
13.25.9 copy as PDFDocumentMBS
1181
13.25.10 dataRepresentation(QuartzFilter as Variant = nil) as memoryblock
1181
13.25.11 documentRef as Integer
1182
13.25.12 exchangePageAtIndexWithPageAtIndex(indexA as Integer, indexB as Integer) 1182
13.25.13 findString(text as string, options as Integer) as PDFSelectionMBS()
1182
13.25.14 findStringFromSelection(text as string, selection as PDFSelectionMBS, options as
Integer) as PDFSelectionMBS
1183
13.25.15 indexForPage(page as PDFPageMBS) as Integer
1184
13.25.16 insertPage(page as PDFPageMBS, index as Integer)
1184
13.25.17 Keywords as string()
1185
13.25.18 outlineItemForSelection(selection as PDFSelectionMBS) as PDFOutlineMBS 1185
13.25.19 pageAtIndex(index as Integer) as PDFPageMBS
1185
13.25.20 PrintOperation(PrintInfo as Variant, AutoRotate as boolean = true, scalingMode
as Integer = 0) as Variant
1186
13.25.21 removePageAtIndex(index as Integer)
1186
13.25.22 selectionForEntireDocument as PDFSelectionMBS
1186
13.25.23 selectionFromPage(StartPage as PDFPageMBS, StartCharacterIndex as Integer,
EndPage as PDFPageMBS, EndCharacterIndex as Integer) as PDFSelectionMBS
1187
13.25.24 selectionFromPage(StartPage as PDFPageMBS, StartPointX as single, StartPointY
as single, EndPage as PDFPageMBS, EndPointX as single, EndPointY as single) as PDFSelectionMBS
1187
13.25.25 SetDelegate(d as PDFDocumentDelegateMBS)
1187
13.25.26 SetKeywords(keywords() as string)
1187
13.25.27 unlockWithPassword(password as string) as boolean
1187
13.25.28 write(file as folderitem, QuartzFilter as Variant = nil) as boolean
1188
13.25.30 allowsCopying as boolean
1189
110
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
13.25.31
13.25.32
13.25.33
13.25.34
13.25.35
13.25.36
13.25.37
13.25.38
13.25.39
13.25.40
13.25.41
13.25.42
13.25.43
13.25.44
13.25.45
13.25.46
13.25.47
13.25.48
13.25.49
13.25.50
13.25.52
13.25.53
13.25.54
13.25.55
13.25.56
13.25.57
13.25.58
13.25.59
13.25.60
allowsPrinting as boolean
Author as string
CreationDate as Date
Creator as string
documentURL as string
Handle as Integer
isEncrypted as boolean
isFinding as boolean
isLocked as boolean
majorVersion as Integer
minorVersion as Integer
ModificationDate as Date
outlineRoot as PDFOutlineMBS
pageCount as Integer
permissionsStatus as Integer
Producer as string
stringValue as string
Subject as string
Title as string
documentAttributes as Dictionary
kPDFDocumentPermissionsNone=0
kPDFDocumentPermissionsOwner=2
kPDFDocumentPermissionsUser=1
kPDFPrintPageScaleDownToFit=2
kPDFPrintPageScaleNone=0
kPDFPrintPageScaleToFit=1
NSBackwardsSearch=4
NSCaseInsensitiveSearch=1
NSLiteralSearch=2
– 13.26.1 class PDFOutlineMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
13.26.3 childAtIndex(index as Integer) as PDFOutlineMBS
13.26.4 Constructor
13.26.5 document as PDFDocumentMBS
13.26.6 index as Integer
13.26.7 insertChild(child as PDFOutlineMBS, index as Integer)
13.26.8 numberOfChildren as Integer
13.26.9 parent as PDFOutlineMBS
13.26.10 removeFromParent
13.26.12 action as PDFActionMBS
13.26.13 destination as PDFDestinationMBS
13.26.14 isOpen as boolean
1189
1189
1190
1190
1190
1191
1191
1191
1191
1192
1192
1193
1193
1193
1193
1194
1194
1195
1195
1196
1196
1196
1197
1197
1197
1197
1198
1198
1198
1199
1199
1199
1199
1200
1200
1200
1200
1201
1201
1201
1201
111
∗ 13.26.15 label as string
1202
– 13.27.1 class PDFPageMBS
1203
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
13.27.3 addAnnotation(annotation as PDFAnnotationMBS)
1204
13.27.4 annotationAtPoint(x as single, y as single) as PDFAnnotationMBS
1204
13.27.5 annotations as PDFAnnotationMBS()
1204
13.27.6 CalcTransformForBox(box as Integer) as Variant
1205
13.27.7 CGPDFPageHandle as Integer
1205
13.27.8 characterBoundsAtIndex(index as Integer) as NSRectMBS
1205
13.27.9 characterIndexAtPoint(x as single, y as single) as Integer
1205
13.27.10 Constructor
1205
13.27.11 Constructor(image as NSImageMBS)
1206
13.27.12 copy as PDFPageMBS
1206
13.27.13 Destructor
1207
13.27.14 Draw(g as NSGraphicsMBS, box as Integer = 0)
1207
13.27.15 drawWithBox(box as Integer)
1207
13.27.16 removeAnnotation(annotation as PDFAnnotationMBS)
1207
13.27.17 Render(dpi as Double = 72.0, box as Integer = 0, background as NSColorMBS =
nil) as NSImageMBS
1207
13.27.18 selectionForLineAtPoint(left as single, top as single) as PDFSelectionMBS
1208
13.27.19 selectionForRange(position as Integer, length as Integer) as PDFSelectionMBS 1208
13.27.20 selectionForRect(left as single, top as single, width as single, height as single) as
PDFSelectionMBS
1209
13.27.21 selectionForWordAtPoint(left as single, top as single) as PDFSelectionMBS 1209
13.27.22 selectionFromPointToPoint(startleft as single, starttop as single, endleft as single,
endtop as single) as PDFSelectionMBS
1209
13.27.23 transformContextForBox(box as Integer)
1209
13.27.25 attributedString as NSAttributedStringMBS
1209
13.27.26 dataRepresentation as memoryblock
1210
13.27.27 displaysAnnotations as boolean
1210
13.27.28 document as PDFDocumentMBS
1210
13.27.29 label as string
1210
13.27.30 numberOfCharacters as Integer
1210
13.27.31 rotation as Integer
1211
13.27.32 stringValue as string
1211
13.27.33 boundsForBox(box as Integer) as NSRectMBS
1211
13.27.35 drawRect(box as Integer, g as NSGraphicsMBS)
1212
13.27.37 kPDFDisplayBoxArtBox=4
1213
13.27.38 kPDFDisplayBoxBleedBox=2
1213
13.27.39 kPDFDisplayBoxCropBox=1
1213
13.27.40 kPDFDisplayBoxMediaBox=0
1213
13.27.41 kPDFDisplayBoxTrimBox=3
1213
– 13.28.1 class PDFSelectionMBS
1214
112
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
13.28.3 addSelection(selection as PDFSelectionMBS)
13.28.4 addSelections(selection() as PDFSelectionMBS)
13.28.5 attributedString as NSAttributedStringMBS
13.28.6 boundsForPage(page as PDFPageMBS) as NSRectMBS
13.28.7 Constructor(doc as PDFDocumentMBS)
13.28.8 copy as PDFSelectionMBS
13.28.9 drawForPage(page as PDFPageMBS, active as boolean)
13.28.10 drawForPage(page as PDFPageMBS, box as Integer, active as boolean)
13.28.11 extendSelectionAtEnd(chars as Integer)
13.28.12 extendSelectionAtStart(chars as Integer)
13.28.13 numberOfTextRangesOnPage(page as PDFPageMBS) as UInt32
13.28.14 pages as PDFPageMBS()
13.28.15 rangeAtIndex(page as PDFPageMBS, index as Integer) as NSRangeMBS
13.28.16 selectionsByLine as PDFSelectionMBS()
13.28.17 stringValue as string
13.28.19 Handle as Integer
13.28.20 colorValue as NSColorMBS
– 13.29.1 control PDFThumbnailViewControlMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
13.29.3 View as PDFThumbnailViewMBS
13.29.5 BoundsChanged
13.29.6 EnableMenuItems
13.29.7 FrameChanged
13.29.8 GotFocus
13.29.9 LostFocus
13.29.10 MenuAction(HitItem as MenuItem) As Boolean
13.29.11 MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
13.29.12 MouseDrag(x as Integer, y as Integer)
13.29.13 MouseUp(x as Integer, y as Integer)
13.29.14 ScaleFactorChanged(NewFactor as Double)
– 13.30.1 class PDFThumbnailViewMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
1214
1214
1214
1215
1215
1215
1215
1215
1216
1216
1216
1217
1217
1217
1217
1218
1218
1219
1219
1219
1219
1219
1220
1220
1220
1220
1221
1221
1221
1222
13.30.3 Constructor
1222
13.30.4 Constructor(Handle as Integer)
1222
13.30.5 Constructor(left as Double, top as Double, width as Double, height as Double) 1223
13.30.6 selectedPages as PDFPageMBS()
1223
13.30.8 allowsDragging as boolean
1223
13.30.9 allowsMultipleSelection as boolean
1224
13.30.10 backgroundColor as NSColorMBS
1224
13.30.11 labelFont as NSFontMBS
1224
13.30.12 maximumNumberOfColumns as Integer
1224
13.30.13 PDFView as PDFViewMBS
1225
13.30.14 thumbnailSize as NSSizeMBS
1225
113
– 13.31.1 control PDFViewControlMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
– 13.32.1 class PDFViewMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
1226
13.31.3 View as PDFViewMBS
1226
13.31.5 AfterDrawPage(graphics as NSGraphicsMBS, page as PDFPageMBS)
1226
13.31.6 AfterDrawPagePost(graphics as NSGraphicsMBS, page as PDFPageMBS)
1226
13.31.7 AfterDrawRect(graphics as NSGraphicsMBS, x as Double, y as Double, w as Double,
h as Double)
1227
13.31.8 BeforeDrawPage(graphics as NSGraphicsMBS, page as PDFPageMBS) as boolean
1227
13.31.9 BeforeDrawPagePost(graphics as NSGraphicsMBS, page as PDFPageMBS) as boolean
1227
13.31.10 BeforeDrawRect(graphics as NSGraphicsMBS, x as Double, y as Double, w as Double, h as Double) as boolean
1227
13.31.11 BoundsChanged
1227
13.31.12 EnableMenuItems
1228
13.31.13 FrameChanged
1228
13.31.14 GotFocus
1228
13.31.15 LostFocus
1228
13.31.16 MenuAction(HitItem as MenuItem) As Boolean
1228
13.31.17 MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
1228
13.31.18 MouseDrag(x as Integer, y as Integer)
1229
13.31.19 MouseUp(x as Integer, y as Integer)
1229
13.31.20 ScaleFactorChanged(NewFactor as Double)
1229
1230
13.32.3 annotationsChangedOnPage(page as PDFPageMBS)
1230
13.32.4 areaOfInterestForMouse(e as NSEventMBS) as Integer
1230
13.32.5 canGoBack as Boolean
1231
13.32.6 canGoForward as Boolean
1231
13.32.7 canGoToFirstPage as Boolean
1231
13.32.8 canGoToLastPage as Boolean
1231
13.32.9 canGoToNextPage as Boolean
1231
13.32.10 canGoToPreviousPage as Boolean
1231
13.32.11 canZoomIn as Boolean
1232
13.32.12 canZoomOut as Boolean
1232
13.32.13 clearSelection
1232
13.32.14 Constructor
1232
13.32.15 Constructor(Handle as Integer)
1232
13.32.16 Constructor(left as Double, top as Double, width as Double, height as Double) 1233
13.32.17 convertPointFromPage(point as NSPointMBS, page as PDFPageMBS) as NSPointMBS
1233
∗ 13.32.18 convertPointToPage(point as NSPointMBS, page as PDFPageMBS) as NSPointMBS
1233
∗ 13.32.19 convertRectFromPage(rect as NSRectMBS, page as PDFPageMBS) as NSRectMBS
1234
114
CHAPTER 1. LIST OF TOPICS
∗ 13.32.20
1234
∗ 13.32.21
∗ 13.32.22
∗ 13.32.23
∗ 13.32.24
∗ 13.32.25
∗ 13.32.26
∗ 13.32.27
∗ 13.32.28
∗ 13.32.29
∗ 13.32.30
∗ 13.32.31
∗ 13.32.32
∗ 13.32.33
∗ 13.32.34
∗ 13.32.35
∗ 13.32.36
∗ 13.32.37
∗ 13.32.38
∗ 13.32.39
∗ 13.32.40
∗ 13.32.41
∗ 13.32.42
∗ 13.32.43
∗ 13.32.44
∗ 13.32.45
∗ 13.32.46
∗ 13.32.47
∗ 13.32.48
∗ 13.32.49
∗ 13.32.50
∗ 13.32.51
∗ 13.32.52
∗ 13.32.53
∗ 13.32.54
∗ 13.32.55
∗ 13.32.56
∗ 13.32.57
∗ 13.32.58
∗ 13.32.60
∗ 13.32.61
convertRectToPage(rect as NSRectMBS, page as PDFPageMBS) as NSRectMBS
copy
currentDestination as PDFDestinationMBS
currentPage as PDFPageMBS
documentView as NSViewMBS
drawPage(page as PDFPageMBS)
drawPagePost(page as PDFPageMBS)
goBack
goForward
goToDestination(page as PDFDestinationMBS)
goToFirstPage
goToLastPage
goToNextPage
goToPage(page as PDFPageMBS)
goToPreviousPage
goToRect(rect as NSRectMBS, page as PDFPageMBS)
goToSelection(page as PDFSelectionMBS)
layoutDocumentView
pageForPoint(point as NSPointMBS, nearest as boolean) as PDFPageMBS
PDFViewAnnotationHitNotification as string
PDFViewAnnotationWillHitNotification as string
PDFViewChangedHistoryNotification as string
PDFViewCopyPermissionNotification as string
PDFViewDisplayBoxChangedNotification as string
PDFViewDisplayModeChangedNotification as string
PDFViewDocumentChangedNotification as string
PDFViewPageChangedNotification as string
PDFViewPrintPermissionNotification as string
PDFViewScaleChangedNotification as string
PDFViewSelectionChangedNotification as string
performAction(action as PDFActionMBS)
rowSizeForPage(page as PDFPageMBS) as NSSizeMBS
scrollSelectionToVisible
selectAll
setCurrentSelection(selection as PDFSelectionMBS, animate as boolean)
setCursorForAreaOfInterest(area as Integer)
visiblePages as PDFPageMBS()
zoomIn
zoomOut
allowsDragging as Boolean
autoScales as Boolean
1234
1234
1234
1235
1235
1235
1235
1236
1236
1236
1236
1236
1236
1237
1237
1237
1237
1238
1238
1238
1238
1239
1239
1239
1239
1239
1240
1240
1240
1240
1240
1240
1241
1241
1241
1241
1241
1242
1242
1242
115
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
13.32.62
13.32.63
13.32.64
13.32.65
13.32.66
13.32.67
13.32.68
13.32.69
13.32.70
13.32.71
13.32.72
13.32.73
13.32.75
13.32.76
13.32.77
13.32.78
13.32.79
13.32.80
13.32.81
13.32.82
13.32.83
13.32.84
13.32.85
13.32.86
13.32.87
13.32.88
13.32.89
13.32.90
backgroundColor as NSColorMBS
currentSelection as PDFSelectionMBS
displayBox as Integer
displayMode as Integer
displaysAsBook as Boolean
displaysPageBreaks as Boolean
document as PDFDocumentMBS
enableDataDetectors as Boolean
greekingThreshold as Double
interpolationQuality as Integer
scaleFactor as Double
shouldAntiAlias as Boolean
kPDFAnnotationArea=4
kPDFControlArea=16
kPDFDisplaySinglePage=0
kPDFDisplaySinglePageContinuous=1
kPDFDisplayTwoUp=2
kPDFDisplayTwoUpContinuous=3
kPDFIconArea=64
kPDFInterpolationQualityHigh = 2
kPDFInterpolationQualityLow = 1
kPDFInterpolationQualityNone = 0
kPDFLinkArea=8
kPDFNoArea=0
kPDFPageArea=1
kPDFPopupArea=128
kPDFTextArea=2
kPDFTextFieldArea=32
1242
1242
1243
1243
1243
1244
1244
1244
1244
1244
1245
1245
1245
1245
1245
1246
1246
1246
1246
1246
1246
1247
1247
1247
1247
1247
1247
1247
116
CHAPTER 1. LIST OF TOPICS
• 6 Cocoa Controls
– 12.1.1 class Popupmenu
∗ 12.1.3 NSButtonMBS as NSButtonMBS
∗ 12.1.4 NSPopUpButtonMBS as NSPopUpButtonMBS
– 6.40.1 class ProgressBar
∗ 6.40.3 NSProgressIndicatorMBS as NSProgressIndicatorMBS
– 6.41.1 class ProgressWheel
∗ 6.41.3 NSProgressIndicatorMBS as NSProgressIndicatorMBS
– 6.42.1 class PushButton
∗ 6.42.3 NSButtonMBS as NSButtonMBS
189
1093
1093
1094
558
558
559
559
560
560
117
• 14 Quartz Composer
– 14.1.1 class QCCompositionMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
14.1.3 compositionWithData(data as MemoryBlock) as QCCompositionMBS
14.1.4 compositionWithData(data as string) as QCCompositionMBS
14.1.5 compositionWithFile(file as folderitem) as QCCompositionMBS
14.1.6 compositionWithFile(path as string) as QCCompositionMBS
14.1.7 Constructor
14.1.8 copy as QCCompositionMBS
14.1.9 getAttributes as dictionary
14.1.10 inputKeys as string()
14.1.11 outputKeys as string()
14.1.12 protocols as string()
14.1.13 QCCompositionAttributeBuiltInKey as string
14.1.14 QCCompositionAttributeCategoryKey as string
14.1.15 QCCompositionAttributeCopyrightKey as string
14.1.16 QCCompositionAttributeDescriptionKey as string
14.1.17 QCCompositionAttributeHasConsumersKey as string
14.1.18 QCCompositionAttributeIsTimeDependentKey as string
14.1.19 QCCompositionAttributeNameKey as string
14.1.20 QCCompositionCategoryDistortion as string
14.1.21 QCCompositionCategoryStylize as string
14.1.22 QCCompositionCategoryUtility as string
14.1.23 QCCompositionInputAudioPeakKey as string
14.1.24 QCCompositionInputAudioSpectrumKey as string
14.1.25 QCCompositionInputDestinationImageKey as string
14.1.26 QCCompositionInputImageKey as string
14.1.27 QCCompositionInputPaceKey as string
14.1.28 QCCompositionInputPreviewModeKey as string
14.1.29 QCCompositionInputPrimaryColorKey as string
14.1.30 QCCompositionInputRSSArticleDurationKey as string
14.1.31 QCCompositionInputRSSFeedURLKey as string
14.1.32 QCCompositionInputScreenImageKey as string
14.1.33 QCCompositionInputSecondaryColorKey as string
14.1.34 QCCompositionInputSourceImageKey as string
14.1.35 QCCompositionInputTrackInfoKey as string
14.1.36 QCCompositionInputTrackPositionKey as string
14.1.37 QCCompositionInputTrackSignalKey as string
14.1.38 QCCompositionInputXKey as string
14.1.39 QCCompositionInputYKey as string
14.1.40 QCCompositionOutputImageKey as string
14.1.41 QCCompositionOutputWebPageURLKey as string
1249
1249
1250
1250
1251
1251
1251
1252
1252
1252
1252
1252
1252
1253
1253
1253
1254
1254
1254
1255
1255
1255
1255
1255
1255
1256
1256
1256
1256
1256
1257
1257
1257
1257
1257
1257
1258
1258
1258
1258
1258
118
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
14.1.42
14.1.43
14.1.44
14.1.45
14.1.46
14.1.47
14.1.49
14.1.50
14.1.51
14.1.52
QCCompositionProtocolGraphicAnimation as string
QCCompositionProtocolGraphicTransition as string
QCCompositionProtocolImageFilter as string
QCCompositionProtocolMusicVisualizer as string
QCCompositionProtocolRSSVisualizer as string
QCCompositionProtocolScreenSaver as string
Description as String
Handle as Integer
identifier as String
Name as String
– 14.2.1 class QCCompositionRepositoryMBS
1258
1259
1259
1259
1260
1260
1260
1261
1261
1261
1262
∗ 14.2.3 allCompositions as QCCompositionMBS()
1262
∗ 14.2.4 Compositions(protocols() as String = nil, attributes as Dictionary = nil) as QCCompositionMBS()
1262
∗ 14.2.5 compositionWithIdentifier(identifier as string) as QCCompositionMBS
1263
∗ 14.2.6 Constructor
1263
∗ 14.2.7 loadPlugIn(file as folderitem) as Boolean
1264
∗ 14.2.8 loadPlugIn(path as string) as Boolean
1264
∗ 14.2.9 QCCompositionRepositoryDidUpdateNotification as string
1264
∗ 14.2.10 sharedCompositionRepository as QCCompositionRepositoryMBS
1264
∗ 14.2.12 Handle as Integer
1265
– 14.3.1 control QCViewControlMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
14.3.3 View as QCViewMBS
14.3.5 BoundsChanged
14.3.6 DidStartRendering
14.3.7 DidStopRendering
14.3.8 EnableMenuItems
14.3.9 FrameChanged
14.3.10 GotFocus
14.3.11 LostFocus
14.3.12 MenuAction(HitItem as MenuItem) As Boolean
14.3.13 MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
14.3.14 MouseDrag(x as Integer, y as Integer)
14.3.15 MouseUp(x as Integer, y as Integer)
14.3.16 ScaleFactorChanged(NewFactor as Double)
– 14.4.1 class QCViewMBS
∗
∗
∗
∗
∗
14.4.3
14.4.4
14.4.5
14.4.6
14.4.7
1266
1266
1266
1266
1266
1267
1267
1267
1267
1267
1267
1268
1268
1268
1269
Constructor
1269
Constructor(Handle as Integer)
1269
Constructor(left as Double, top as Double, width as Double, height as Double) 1270
erase
1270
getAttributes as dictionary
1270
119
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
14.4.8 inputKeys as string()
14.4.9 loadComposition(composition as QCCompositionMBS) as boolean
14.4.10 loadCompositionFromData(data as MemoryBlock) as boolean
14.4.11 loadCompositionFromData(data as string) as boolean
14.4.12 loadCompositionFromFile(file as folderitem) as boolean
14.4.13 loadCompositionFromFile(filepath as string) as boolean
14.4.14 outputKeys as string()
14.4.15 pauseRendering
14.4.16 resumeRendering
14.4.17 setValueForInputKey(value as Variant, key as string) as boolean
14.4.18 startRendering as boolean
14.4.19 stopRendering
14.4.20 unloadComposition
14.4.21 valueForInputKey(key as string) as Variant
14.4.22 valueForOutputKey(key as string) as Variant
14.4.24 autostartsRendering as boolean
14.4.25 eraseColor as NSColorMBS
14.4.26 eventForwardingMask as Integer
14.4.27 isPausedRendering as boolean
14.4.28 isRendering as boolean
14.4.29 loadedComposition as QCCompositionMBS
14.4.30 maxRenderingFrameRate as Double
14.4.31 snapshotImage as NSImageMBS
1271
1271
1271
1271
1272
1272
1272
1273
1273
1273
1273
1274
1274
1274
1274
1275
1275
1275
1275
1276
1276
1276
1277
120
CHAPTER 1. LIST OF TOPICS
• 9 CoreGraphics
– 9.1.1 class QuartzFilterManagerMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
9.1.3 filterPanel as NSPanelMBS
9.1.4 filters as QuartzFilterMBS()
9.1.5 filtersInDomains(domains() as string) as QuartzFilterMBS()
9.1.6 filterView as QuartzFilterViewMBS
9.1.7 selectedFilter as QuartzFilterMBS
9.1.8 selectFilter(filter as QuartzFilterMBS) as boolean
9.1.10 Handle as Integer
9.1.12 didAddFilter(filter as QuartzFilterMBS)
9.1.13 didModifyFilter(filter as QuartzFilterMBS)
9.1.14 didRemoveFilter(filter as QuartzFilterMBS)
9.1.15 didSelectFilter(filter as QuartzFilterMBS)
9.1.17 kQuartzFilterApplicationDomain=”kQuartzFilterApplicationDomain”
9.1.18 kQuartzFilterPDFWorkflowDomain=”kQuartzFilterPDFWorkflowDomain”
9.1.19 kQuartzFilterPrintingDomain=”kQuartzFilterPrintingDomain”
– 9.2.1 class QuartzFilterMBS
∗
∗
∗
∗
∗
∗
∗
∗
9.2.3 applyToContext(CGContextHandle as Integer) as boolean
9.2.4 Constructor
9.2.5 localizedName as string
9.2.6 quartzFilterWithFile(file as folderitem) as QuartzFilterMBS
9.2.7 quartzFilterWithURL(url as string) as QuartzFilterMBS
9.2.8 removeFromContext(CGContextHandle as Integer)
9.2.9 url as string
9.2.11 Handle as Integer
– 9.3.1 class QuartzFilterViewMBS
∗
∗
∗
∗
9.3.3
9.3.4
9.3.5
9.3.6
Constructor
Constructor(Handle as Integer)
Constructor(left as Double, top as Double, width as Double, height as Double)
sizeToFit
591
591
591
592
592
592
592
593
593
593
593
593
593
594
594
594
595
596
596
596
597
597
597
597
598
599
599
599
600
600
121
• 6 Cocoa Controls
– 8.4.1 class Radiobutton
∗ 8.4.3 NSButtonMBS as NSButtonMBS
– 6.43.1 class ScrollBar
∗ 6.43.3 NSScrollerMBS as NSScrollerMBS
– 6.44.1 class Separator
∗ 6.44.3 NSBoxMBS as NSBoxMBS
– 6.45.1 class Slider
∗ 6.45.3 NSSliderMBS as NSSliderMBS
– 6.46.1 class TextArea
∗ 6.46.3 NSScrollViewMBS as NSScrollViewMBS
– 6.47.1 class UpDownArrows
∗ 6.47.3 NSStepperMBS as NSStepperMBS
189
590
590
561
561
562
562
563
563
564
564
566
566
122
CHAPTER 1. LIST OF TOPICS
• 11 HTMLViewer Mac
– 11.100.1 class WebArchiveMBS
731
955
∗ 11.100.3 Constructor(data as Memoryblock)
955
∗ 11.100.4 Constructor(mainResource as WebResourceMBS)
956
∗ 11.100.5 Constructor(mainResource as WebResourceMBS, subresources() as WebResourceMBS)
956
∗ 11.100.6 Constructor(mainResource as WebResourceMBS, subresources() as WebResourceMBS,
subframeArchives() as WebArchiveMBS)
956
∗ 11.100.7 data as Memoryblock
957
∗ 11.100.8 mainResource as WebResourceMBS
957
∗ 11.100.9 subframeArchives as WebArchiveMBS()
957
∗ 11.100.10 subresources as WebResourceMBS()
957
∗ 11.100.12 Handle as Integer
957
– 11.101.1 class WebBackForwardListMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.101.3 addItem(item as WebHistoryItemMBS)
11.101.4 backItem as WebHistoryItemMBS
11.101.5 backListCount as Integer
11.101.6 backListWithLimit(limit as Integer) as WebHistoryItemMBS()
11.101.7 Constructor
11.101.8 containsItem(item as WebHistoryItemMBS) as boolean
11.101.9 currentItem as WebHistoryItemMBS
11.101.10 forwardItem as WebHistoryItemMBS
11.101.11 forwardListCount as Integer
11.101.12 forwardListWithLimit(limit as Integer) as WebHistoryItemMBS()
11.101.13 goBack
11.101.14 goForward
11.101.15 goToItem(item as WebHistoryItemMBS)
11.101.16 itemAtIndex(index as Integer) as WebHistoryItemMBS
11.101.18 Handle as Integer
11.101.19 capacity as Integer
11.101.20 PageCacheSize as Integer
– 11.102.1 class WebDataSourceMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.102.3 addSubresource(Subresource as WebResourceMBS)
11.102.4 Constructor(request as NSURLRequestMBS)
11.102.5 data as MemoryBlock
11.102.6 initialRequest as NSURLRequestMBS
11.102.7 isLoading as boolean
11.102.8 mainResource as WebResourceMBS
11.102.9 pageTitle as string
11.102.10 representation as WebDocumentRepresentationMBS
11.102.11 request as NSURLRequestMBS
958
958
958
958
959
959
959
959
959
959
960
960
960
960
960
961
961
961
962
962
962
962
963
963
963
963
963
964
123
∗
∗
∗
∗
∗
∗
∗
∗
11.102.12
11.102.13
11.102.14
11.102.15
11.102.16
11.102.17
11.102.18
11.102.20
response as NSURLResponseMBS
subresourceForURL(url as string) as WebResourceMBS
subresources as WebResourceMBS()
textEncodingName as string
unreachableURL as String
webArchive as WebArchiveMBS
webFrame as WebFrameMBS
Handle as Integer
– 11.103.1 class WebDocumentRepresentationMBS
∗
∗
∗
∗
∗
11.103.3
11.103.4
11.103.5
11.103.6
11.103.8
canProvideDocumentSource as boolean
Constructor
documentSource as string
title as string
Handle as Integer
– 11.104.1 class WebDocumentViewMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
964
964
964
964
964
965
965
965
966
966
966
966
966
967
968
11.104.3 attributedString as NSAttributedStringMBS
968
11.104.4 dataSourceUpdated(dataSource as WebDataSourceMBS)
969
11.104.5 deselectAll
969
11.104.6 Image as NSImageMBS
969
11.104.7 layout
970
11.104.8 print
970
11.104.9 SearchFor(text as string, Forward as boolean, CaseSensitive as boolean, Wrap as
Boolean) as boolean
970
11.104.10 SearchFunctionsAvailable as boolean
970
11.104.11 selectAll
971
11.104.12 selectedAttributedString as NSAttributedStringMBS
971
11.104.13 SelectedString as String
971
11.104.14 setDataSource(dataSource as WebDataSourceMBS)
971
11.104.15 setNeedsLayout(flag as boolean)
971
11.104.16 stringValue as String
972
11.104.17 supportsTextEncoding as boolean
972
11.104.18 TextFunctionsAvailable as boolean
972
– 11.105.1 class WebDownloadDelegateMBS
973
∗ 11.105.3 canAuthenticateAgainstProtectionSpace(download as NSURLDownloadMBS, protectionSpace as NSURLProtectionSpaceMBS) as boolean
974
∗ 11.105.4 Close
974
∗ 11.105.5 decideDestinationWithSuggestedFilename(download as NSURLDownloadMBS, filename as string)
974
∗ 11.105.6 DidBegin(download as NSURLDownloadMBS)
975
∗ 11.105.7 didCancelAuthenticationChallenge(download as NSURLDownloadMBS, challenge as
NSURLAuthenticationChallengeMBS)
975
124
CHAPTER 1. LIST OF TOPICS
∗ 11.105.8 didCreateDestination(download as NSURLDownloadMBS, path as string, file as
folderitem)
975
∗ 11.105.9 didFailWithError(download as NSURLDownloadMBS, error as NSErrorMBS) 976
∗ 11.105.10 DidFinish(download as NSURLDownloadMBS)
976
∗ 11.105.11 didReceiveAuthenticationChallenge(download as NSURLDownloadMBS, challenge
as NSURLAuthenticationChallengeMBS)
976
∗ 11.105.12 didReceiveDataOfLength(download as NSURLDownloadMBS, length as UInt64)
977
∗ 11.105.13 didReceiveResponse(download as NSURLDownloadMBS, response as NSURLResponseMBS)
978
∗ 11.105.14 Open
978
∗ 11.105.15 shouldDecodeSourceDataOfMIMEType(download as NSURLDownloadMBS, encodingType as string) as boolean
978
∗ 11.105.16 ShouldUseCredentialStorage(download as NSURLDownloadMBS) as boolean 979
∗ 11.105.17 willResumeWithResponse(download as NSURLDownloadMBS, response as NSURLResponseMBS, startingByte as Int64)
979
∗ 11.105.18 willSendRequest(download as NSURLDownloadMBS, request as NSURLRequestMBS,
redirectResponse as NSURLResponseMBS) as NSURLRequestMBS
979
∗ 11.105.19 WindowForAuthenticationSheet(download as NSURLDownloadMBS) as NSWindowMBS
980
– 11.106.1 class WebFrameLoadDelegateMBS
981
∗ 11.106.3 Close
981
∗ 11.106.4 didCancelClientRedirectForFrame(WebView as WebViewMBS, frame as WebFrameMBS)
as boolean
981
∗ 11.106.5 didChangeLocationWithinPageForFrame(WebView as WebViewMBS, frame as WebFrameMBS)
as boolean
982
∗ 11.106.6 didCommitLoadForFrame(WebView as WebViewMBS, frame as WebFrameMBS) as
boolean
982
∗ 11.106.7 didFailLoadWithError(WebView as WebViewMBS, ErrorString as string, frame as
WebFrameMBS) as boolean
982
∗ 11.106.8 didFailProvisionalLoadWithError(WebView as WebViewMBS, ErrorString as string,
frame as WebFrameMBS) as boolean
983
∗ 11.106.9 didFinishLoadForFrame(WebView as WebViewMBS, frame as WebFrameMBS) as
boolean
983
∗ 11.106.10 didReceiveIcon(WebView as WebViewMBS, image as NSImageMBS, frame as WebFrameMBS)
as boolean
984
∗ 11.106.11 didReceiveServerRedirectForProvisionalLoadForFrame(WebView as WebViewMBS,
frame as WebFrameMBS) as boolean
984
∗ 11.106.12 didReceiveTitle(WebView as WebViewMBS, title as string, frame as WebFrameMBS)
as boolean
984
∗ 11.106.13 didStartProvisionalLoadForFrame(WebView as WebViewMBS, frame as WebFrameMBS)
as boolean
985
∗ 11.106.14 Open
985
125
∗ 11.106.15 willCloseFrame(WebView as WebViewMBS, frame as WebFrameMBS) as boolean
985
∗ 11.106.16 willPerformClientRedirectToURL(WebView as WebViewMBS, URL as String, delay as Double, fireDate as Date, frame as WebFrameMBS) as boolean
986
∗ 11.106.17 windowScriptObjectAvailable(WebView as WebViewMBS, windowScriptObject as
WebScriptObjectMBS) as boolean
986
– 11.107.1 class WebFrameMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.107.3 childFrames as WebFrameMBS()
987
11.107.4 Constructor
987
11.107.5 dataSource as WebDataSourceMBS
987
11.107.6 DOMDocument as Variant
988
11.107.7 findFrameNamed(name as string) as WebFrameMBS
988
11.107.8 frameElement as Variant
988
11.107.9 frameView as WebFrameViewMBS
988
11.107.10 loadArchive(archive as WebArchiveMBS)
989
11.107.11 LoadHTMLString(data as memoryblock, mime as string, encoding as string, url as
string)
989
11.107.12 LoadHTMLString(text as string, url as string)
989
11.107.13 LoadURL(url as string)
989
11.107.14 LoadURL(url as string, CachePolicy as Integer, TimeOut as Double)
989
11.107.15 name as String
990
11.107.16 parentFrame as WebFrameMBS
990
11.107.17 provisionalDataSource as WebDataSourceMBS
990
11.107.18 reload
991
11.107.19 reloadFromOrigin
991
11.107.20 stopLoading
991
11.107.21 webView as WebViewMBS
991
11.107.23 Handle as Integer
991
– 11.108.1 class WebFrameViewMBS
∗
∗
∗
∗
∗
∗
11.108.3
11.108.4
11.108.5
11.108.6
11.108.7
11.108.9
11.109.3
11.109.4
11.109.5
11.109.6
11.109.7
992
Constructor
992
Constructor(Handle as Integer)
992
Constructor(left as Double, top as Double, width as Double, height as Double) 993
documentView as WebDocumentViewMBS
993
webFrame as WebFrameMBS
993
allowsScrolling as boolean
994
– 11.109.1 class WebHistoryItemMBS
∗
∗
∗
∗
∗
987
Constructor(URLstring as String, title as string, lastVisited as date)
Constructor(URLstring as String, title as string, lastVisited as Double)
icon as NSImageMBS
lastVisited as date
lastVisitedTimeInterval as Double
995
995
995
996
996
996
126
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
11.109.8 originalURLString as String
11.109.9 title as String
11.109.10 URLString as String
11.109.12 Handle as Integer
11.109.13 alternateTitle as String
– 11.110.1 class WebHistoryMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.110.3 addItem(item as WebHistoryItemMBS)
11.110.4 addItems(items() as WebHistoryItemMBS)
11.110.5 Constructor
11.110.6 itemForURL(url as string) as WebHistoryItemMBS
11.110.7 loadFromURL(file as folderitem, byref description as string) as boolean
11.110.8 loadFromURL(url as string, byref description as string) as boolean
11.110.9 optionalSharedHistory as WebHistoryMBS
11.110.10 orderedItemsLastVisitedOnDay(day as date) as WebHistoryItemMBS()
11.110.11 orderedLastVisitedDays as date()
11.110.12 removeAllItems
11.110.13 removeItem(item as WebHistoryItemMBS)
11.110.14 removeItems(items() as WebHistoryItemMBS)
11.110.15 saveToURL(file as folderitem, byref description as string) as boolean
11.110.16 saveToURL(url as string, byref description as string) as boolean
11.110.18 Handle as Integer
11.110.19 historyAgeInDaysLimit as Integer
11.110.20 historyItemLimit as Integer
– 11.111.1 class WebOpenPanelResultListenerMBS
∗
∗
∗
∗
∗
∗
∗
∗
11.111.3 cancel
11.111.4 chooseFilename(file as folderitem)
11.111.5 chooseFilename(filename as string)
11.111.6 chooseFilenames(filenames() as string)
11.111.7 chooseFilenames(files() as folderitem)
11.111.8 Constructor
11.111.10 allowMultipleFiles as Boolean
11.111.11 Handle as Integer
– 11.112.1 class WebPolicyDecisionListenerMBS
∗
∗
∗
∗
∗
11.112.3
11.112.4
11.112.5
11.112.6
11.112.8
Constructor
download
ignore
use
Handle as Integer
– 11.113.1 class WebPolicyDelegateMBS
∗ 11.113.3 Close
996
996
997
997
997
998
998
998
998
998
999
999
999
999
1000
1000
1000
1000
1000
1000
1001
1001
1001
1002
1002
1002
1002
1002
1003
1003
1003
1003
1004
1004
1004
1004
1005
1005
1006
1006
127
∗ 11.113.4 decidePolicyForMIMEType(type as string,request as NSURLRequestMBS, frame as
WebFrameMBS, decisionListener as WebPolicyDecisionListenerMBS) as boolean
1007
∗ 11.113.5 decidePolicyForNavigationAction(request as NSURLRequestMBS, frame as WebFrameMBS,
decisionListener as WebPolicyDecisionListenerMBS, NavigationType as Integer, ModifierFlags as Integer, OriginalURL as string) as boolean
1007
∗ 11.113.6 decidePolicyForNewWindowAction(request as NSURLRequestMBS, framename as
string, decisionListener as WebPolicyDecisionListenerMBS, NavigationType as Integer, ModifierFlags as Integer, OriginalURL as string) as boolean
1008
∗ 11.113.7 Open
1008
∗ 11.113.8 unableToImplementPolicyWithError(errorString as string, frame as WebFrameMBS)
as boolean
1009
– 11.114.1 class WebPreferencesMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.114.3 Constructor(identifier as String)
11.114.4 standardPreferences as WebPreferencesMBS
11.114.6 allowsAnimatedImageLooping as boolean
11.114.7 allowsAnimatedImages as boolean
11.114.8 arePlugInsEnabled as boolean
11.114.9 autosaves as boolean
11.114.10 cacheModel as Integer
11.114.11 cursiveFontFamily as String
11.114.12 databasesEnabled as Boolean
11.114.13 defaultFixedFontSize as Integer
11.114.14 defaultFontSize as Integer
11.114.15 defaultTextEncodingName as String
11.114.16 fantasyFontFamily as String
11.114.17 fixedFontFamily as String
11.114.18 Handle as Integer
11.114.19 identifier as String
11.114.20 isJavaEnabled as boolean
11.114.21 isJavaScriptEnabled as boolean
11.114.22 javaScriptCanOpenWindowsAutomatically as boolean
11.114.23 loadsImagesAutomatically as boolean
11.114.24 localStorageDatabasePath as String
11.114.25 localStorageEnabled as Boolean
11.114.26 minimumFontSize as Integer
11.114.27 minimumLogicalFontSize as Integer
11.114.28 privateBrowsingEnabled as boolean
11.114.29 sansSerifFontFamily as String
11.114.30 serifFontFamily as String
11.114.31 shouldPrintBackgrounds as boolean
11.114.32 standardFontFamily as String
11.114.33 suppressesIncrementalRendering as boolean
1010
1010
1010
1011
1011
1011
1012
1012
1013
1013
1013
1014
1014
1014
1014
1015
1015
1015
1016
1016
1016
1016
1017
1017
1018
1018
1018
1018
1019
1019
1019
128
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
11.114.34
11.114.35
11.114.36
11.114.37
11.114.38
11.114.40
11.114.41
11.114.42
tabsToLinks as boolean
textAreasAreResizable as Boolean
userStyleSheetEnabled as boolean
userStyleSheetLocation as string
usesPageCache as boolean
WebCacheModelDocumentBrowser=1
WebCacheModelDocumentViewer=0
WebCacheModelPrimaryWebBrowser=2
– 11.115.1 class WebPrintMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.115.3 Constructor(view as htmlviewer)
11.115.4 Constructor(WebViewHandle as Integer)
11.115.5 GetPageFormat as string
11.115.6 PageSetup as boolean
11.115.7 Print as boolean
11.115.8 PrintDialog as boolean
11.115.9 PrintingEnd
11.115.10 PrintingPage(index as UInt32) as Memoryblock
11.115.11 PrintingStart(width as Double, height as Double) as Integer
11.115.12 SetPageFormat(data as string) as boolean
11.115.14 DialogOpen as Boolean
11.115.15 HTMLViewer as HTMLViewer
11.115.16 PageFormatHandle as Integer
11.115.17 PDFFile as Folderitem
11.115.18 PrintSessionHandle as Integer
11.115.19 PrintSettingsHandle as Integer
11.115.20 SheetTarget as Window
11.115.22 PageSetupDialogDone(accepted as boolean)
11.115.23 PrintDialogDone(accepted as boolean)
– 11.116.1 class WebResourceLoadDelegateMBS
1020
1020
1020
1021
1021
1021
1022
1022
1023
1023
1023
1023
1023
1024
1024
1024
1025
1025
1026
1026
1026
1026
1027
1027
1027
1027
1027
1028
1029
∗ 11.116.3 Close
1029
∗ 11.116.4 didCancelAuthenticationChallenge(id as Variant, challenge as NSURLAuthenticationChallengeMBS, dataSource as WebDataSourceMBS)
1029
∗ 11.116.5 didFailLoadingWithError(id as Variant, errorString as string, dataSource as WebDataSourceMBS)
1030
∗ 11.116.6 didFinishLoadingFromDataSource(id as Variant, dataSource as WebDataSourceMBS)
1030
∗ 11.116.7 didReceiveAuthenticationChallenge(id as Variant, challenge as NSURLAuthenticationChallengeMBS, dataSource as WebDataSourceMBS)
1030
∗ 11.116.8 didReceiveContentLength(id as Variant, length as Integer, dataSource as WebDataSourceMBS)
1030
∗ 11.116.9 didReceiveResponse(id as Variant, response as NSURLResponseMBS, dataSource as
WebDataSourceMBS)
1031
129
∗ 11.116.10 identifierForInitialRequest(request as NSURLRequestMBS, dataSource as WebDataSourceMBS) as Variant
1031
∗ 11.116.11 Open
1031
∗ 11.116.12 plugInFailedWithError(errorString as string, dataSource as WebDataSourceMBS)
1032
∗ 11.116.13 willSendRequest(id as Variant, request as NSURLRequestMBS, redirectResponse
as NSURLResponseMBS, dataSource as WebDataSourceMBS) as NSURLRequestMBS 1032
– 11.117.1 class WebResourceMBS
1033
∗ 11.117.3 Constructor(data as MemoryBlock, url as string, mimeType as string, TextEncodingName as string=””, frameName as string=””)
1033
∗ 11.117.4 data as MemoryBlock
1034
∗ 11.117.5 frameName as String
1034
∗ 11.117.6 MIMEType as String
1034
∗ 11.117.7 textEncodingName as String
1035
∗ 11.117.8 URL as String
1035
∗ 11.117.10 Handle as Integer
1035
– 11.118.1 class WebScriptCallbackMBS
∗
∗
∗
∗
∗
∗
11.118.3 ArgumentValue(index as Integer) as Variant
11.118.4 Constructor
11.118.6 ArgumentCount as Integer
11.118.7 Handle as Integer
11.118.9 Callback(Name as string) as Variant
11.118.10 Close
– 11.119.1 class WebScriptObjectMBS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.119.3 Constructor
11.119.4 evaluateWebScript(script as String) as Variant
11.119.5 getValue(name as String) as Variant
11.119.6 removeValue(name as String)
11.119.7 setValue(name as String, value as Variant)
11.119.8 setWebScriptCallback(name as String, value as WebScriptCallbackMBS)
11.119.9 setWebScriptValueAtIndex(index as Integer, value as Variant)
11.119.10 stringRepresentation as String
11.119.11 webScriptValueAtIndex(index as Integer) as Variant
11.119.13 Handle as Integer
– 11.120.1 class WebUIDelegateMBS
∗
∗
∗
∗
∗
∗
11.120.3 Constructor
11.120.5 DisableContextMenu as Boolean
11.120.6 DisableNewWindow as Boolean
11.120.8 AreToolbarsVisible as boolean
11.120.9 Close
11.120.10 CreateWithRequest(Request as NSURLRequestMBS) as object
1036
1036
1036
1036
1037
1037
1037
1038
1038
1038
1039
1039
1039
1039
1040
1040
1040
1041
1042
1042
1042
1043
1043
1043
1043
130
CHAPTER 1. LIST OF TOPICS
∗ 11.120.11 dragDestinationActionMaskForDraggingInfo(draggingInfo as NSDraggingInfoMBS)
as Integer
1044
∗ 11.120.12 dragSourceActionMaskForPoint(x as Double, y as Double) as Integer
1044
∗ 11.120.13 GetContentRect(byref left as Double, byref top as Double, byref width as Double,
byref height as Double) as boolean
1045
∗ 11.120.14 GetFrame(byref left as Double, byref top as Double, byref width as Double, byref
height as Double) as boolean
1045
∗ 11.120.15 GetStatusText as String
1045
∗ 11.120.16 IsResizable as boolean
1045
∗ 11.120.17 IsStatusBarVisible as boolean
1046
∗ 11.120.18 MouseDidMoveOverElement(elementInformation as Dictionary, modifierFlags as
Integer) as boolean
1046
∗ 11.120.19 Open
1046
∗ 11.120.20 RunJavaScriptAlertPanelWithMessage(message as String)
1047
∗ 11.120.21 RunJavaScriptConfirmPanelWithMessage(message as String) as boolean
1047
∗ 11.120.22 RunJavaScriptTextInputPanelWithPrompt(prompt as String, defaultText as String)
as String
1047
∗ 11.120.23 runOpenPanelForFileButtonWithResultListener(listener as WebOpenPanelResultListenerMBS, allowMultipleFiles as boolean) as boolean
1047
∗ 11.120.24 SetContentRect(left as Double, top as Double, width as Double, height as Double)
as boolean
1048
∗ 11.120.25 SetFrame(left as Double, top as Double, width as Double, height as Double) as
boolean
1048
∗ 11.120.26 SetResizable(resizeable as boolean) as boolean
1048
∗ 11.120.27 SetStatusBarVisible(visible as boolean) as boolean
1049
∗ 11.120.28 SetStatusText(text as String) as boolean
1049
∗ 11.120.29 SetToolbarsVisible(visible as boolean) as boolean
1049
∗ 11.120.30 willPerformDragDestinationAction(WebDragDestinationAction as Integer, draggingInfo as NSDraggingInfoMBS)
1049
∗ 11.120.31 willPerformDragSourceAction(WebDragDestinationAction as Integer, X as Double,
Y as Double, pasteboard as NSPasteboardMBS)
1050
∗ 11.120.32 WindowClose as boolean
1050
∗ 11.120.33 WindowFocus as boolean
1050
∗ 11.120.34 WindowShow as boolean
1050
∗ 11.120.35 WindowUnfocus as boolean
1051
∗ 11.120.37 WebDragDestinationActionAny = -1
1051
∗ 11.120.38 WebDragDestinationActionDHTML = 1
1051
∗ 11.120.39 WebDragDestinationActionEdit = 2
1051
∗ 11.120.40 WebDragDestinationActionLoad = 4
1051
∗ 11.120.41 WebDragDestinationActionNone = 0
1052
– 11.121.1 class WebViewMBS
∗ 11.121.3 alignCenter
∗ 11.121.4 alignJustified
1053
1053
1053
131
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.121.5 alignLeft
1053
11.121.6 alignRight
1054
11.121.7 applyStyle(style as Variant)
1054
11.121.8 backForwardList as WebBackForwardListMBS
1054
11.121.9 canGoBack as boolean
1055
11.121.10 canGoForward as boolean
1055
11.121.11 canMakeTextLarger as boolean
1055
11.121.12 canMakeTextSmaller as boolean
1055
11.121.13 canResetPageZoom as boolean
1055
11.121.14 CanShowMIMEType(mime as string) as boolean
1055
11.121.15 CanShowMIMETypeAsHTML(mime as string) as boolean
1056
11.121.16 canZoomPageIn as boolean
1056
11.121.17 canZoomPageOut as boolean
1056
11.121.18 capitalizeWord
1056
11.121.19 centerSelectionInVisibleArea
1056
11.121.20 changeAttributes
1057
11.121.21 changeCaseOfLetter
1057
11.121.22 changeColor
1057
11.121.23 changeDocumentBackgroundColor
1057
11.121.24 changeFont
1057
11.121.25 checkSpelling
1058
11.121.26 ClearFocus
1058
11.121.27 complete
1058
11.121.28 Constructor
1058
11.121.29 Constructor(Handle as Integer)
1059
11.121.30 Constructor(left as Double, top as Double, width as Double, height as Double) 1059
11.121.31 Constructor(x as Double, y as Double, w as Double, h as Double, FrameName as
string, GroupName as string)
1060
11.121.32 copy
1061
11.121.33 copyFont
1061
11.121.34 cut
1061
11.121.35 delete
1062
11.121.36 deleteBackward
1062
11.121.37 deleteBackwardByDecomposingPreviousCharacter
1062
11.121.38 deleteForward
1062
11.121.39 deleteSelection
1062
11.121.40 deleteToBeginningOfLine
1063
11.121.41 deleteToBeginningOfParagraph
1063
11.121.42 deleteToEndOfLine
1063
11.121.43 deleteToEndOfParagraph
1063
11.121.44 deleteWordBackward
1063
11.121.45 deleteWordForward
1063
132
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.121.46
11.121.47
11.121.48
11.121.49
11.121.50
11.121.51
11.121.52
11.121.53
11.121.54
11.121.55
11.121.56
11.121.57
string)
11.121.58
11.121.59
11.121.60
11.121.61
11.121.62
11.121.63
11.121.64
11.121.65
11.121.66
11.121.67
11.121.68
11.121.69
11.121.70
11.121.71
11.121.72
11.121.73
11.121.74
11.121.75
11.121.76
11.121.77
11.121.78
11.121.79
11.121.80
11.121.81
11.121.82
11.121.83
11.121.84
11.121.85
11.121.86
EstimatedProgress as Double
EvaluateJavaScript(code as string) as string
GoBack
GoForward
goToBackForwardItem(item as WebHistoryItemMBS) as boolean
HTMLText as string
indent
insertBacktab
insertNewline
insertParagraphSeparator
insertTab
LoadHTMLString(data as memoryblock, mime as string, encoding as string,
LoadHTMLString(text as string, url as string)
LoadRequest(request as NSURLRequestMBS)
LoadURL(url as string)
LoadURL(url as string, CachePolicy as Integer, TimeOut as Double)
lowercaseWord
mainFrame as WebFrameMBS
makeTextLarger
makeTextSmaller
mediaVolume as single
moveBackward
moveBackwardAndModifySelection
moveDown
moveDownAndModifySelection
moveForward
moveForwardAndModifySelection
moveLeft
moveLeftAndModifySelection
moveRight
moveRightAndModifySelection
moveToBeginningOfDocument
moveToBeginningOfDocumentAndModifySelection
moveToBeginningOfLine
moveToBeginningOfLineAndModifySelection
moveToBeginningOfParagraph
moveToBeginningOfParagraphAndModifySelection
moveToBeginningOfSentence
moveToBeginningOfSentenceAndModifySelection
moveToEndOfDocument
moveToEndOfDocumentAndModifySelection
1064
1064
1065
1065
1065
1065
1066
1066
1066
1066
1066
url as
1066
1067
1067
1067
1068
1069
1069
1069
1069
1069
1069
1070
1070
1070
1070
1070
1071
1071
1071
1071
1072
1072
1072
1072
1072
1073
1073
1073
1073
1073
133
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.121.87 moveToEndOfLine
1073
11.121.88 moveToEndOfLineAndModifySelection
1073
11.121.89 moveToEndOfParagraph
1074
11.121.90 moveToEndOfParagraphAndModifySelection
1074
11.121.91 moveToEndOfSentence
1074
11.121.92 moveToEndOfSentenceAndModifySelection
1074
11.121.93 moveUp
1074
11.121.94 moveUpAndModifySelection
1074
11.121.95 moveWordBackward
1075
11.121.96 moveWordBackwardAndModifySelection
1075
11.121.97 moveWordForward
1075
11.121.98 moveWordForwardAndModifySelection
1075
11.121.99 moveWordLeft
1076
11.121.100 moveWordLeftAndModifySelection
1076
11.121.101 moveWordRight
1076
11.121.102 moveWordRightAndModifySelection
1077
11.121.103 NSScrollView as NSScrollViewMBS
1078
11.121.104 pageDown
1078
11.121.105 pageSizeMultiplier as single
1078
11.121.106 pageUp
1078
11.121.107 paste
1078
11.121.108 pasteAsPlainText
1078
11.121.109 pasteAsRichText
1079
11.121.110 pasteFont
1079
11.121.111 performFindPanelAction
1079
11.121.112 PrintToPDFFile(PDFFile as folderitem, LeftMargin as Double = 50.0, TopMargin
as Double = 50.0, RightMargin as Double = 50.0, BottomMargin as Double = 50.0) as boolean
1079
11.121.113 Reload
1080
11.121.114 reloadFromOrigin
1080
11.121.115 RenderDocumentToEPS as Memoryblock
1080
11.121.116 RenderDocumentToPDF as Memoryblock
1081
11.121.117 RenderWebsiteImage as NSImageMBS
1081
11.121.118 replaceSelectionWithMarkupString(html as string)
1082
11.121.119 replaceSelectionWithText(text as string)
1082
11.121.120 resetPageZoom
1082
11.121.121 scrollLineDown
1082
11.121.122 scrollLineUp
1083
11.121.123 scrollPageDown
1083
11.121.124 scrollPageUp
1083
11.121.125 SearchFor(text as string, Forward as boolean, CaseSensitive as boolean, Wrap as
Boolean) as boolean
1083
134
CHAPTER 1. LIST OF TOPICS
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
∗
11.121.126
11.121.127
11.121.128
11.121.129
11.121.130
11.121.131
11.121.132
11.121.133
11.121.134
11.121.135
11.121.136
11.121.137
11.121.138
11.121.139
11.121.140
11.121.141
11.121.142
11.121.144
11.121.145
11.121.146
11.121.147
11.121.148
11.121.149
11.121.150
11.121.151
11.121.152
11.121.153
11.121.154
11.121.155
11.121.156
11.121.157
11.121.158
11.121.159
11.121.160
11.121.161
11.121.162
– ?? Globals
selectAll
selectLine
selectParagraph
selectSentence
selectWord
setMaintainsBackForwardList(value as boolean)
setMediaVolume(value as single)
setPageSizeMultiplier(value as single)
showGuessPanel
startSpeaking
StopLoading
stopSpeaking
SupportsTextEncoding as boolean
uppercaseWord
userAgentForURL(url as string) as String
zoomPageIn
zoomPageOut
ApplicationNameForUserAgent as String
ContinuousSpellCheckingEnabled as boolean
CustomTextEncodingName as String
CustomUserAgent as String
dashboardBehavior(behavior as Integer) as boolean
DrawsBackground as Boolean
Editable as boolean
GroupName as string
mediaStyle as String
preferences as WebPreferencesMBS
PreferencesIdentifier as string
ScrollHeight as single
ScrollLeft as single
ScrollTop as single
ScrollWidth as single
ShouldUpdateWhileOffscreen as boolean
smartInsertDeleteEnabled as boolean
TextSizeMultiplier as single
typingStyle as Variant
1083
1084
1084
1084
1084
1084
1084
1085
1085
1085
1085
1086
1086
1086
1086
1086
1087
1087
1087
1088
1088
1088
1089
1089
1089
1090
1090
1090
1090
1091
1091
1091
1091
1092
1092
1092
??
∗ 11.99.1 InstallWebDownloadDelegate(extends w as WebViewMBS, theDelegate as WebDownloadDelegateMBS)
954
∗ 11.99.2 InstallWebFrameLoadDelegate(extends w as WebViewMBS, theDelegate as WebFrameLoadDelegateMBS)
954
135
∗ 11.99.3 InstallWebPolicyDelegate(extends w as WebViewMBS, theDelegate as WebPolicyDelegateMBS)
954
∗ 11.99.4 InstallWebResourceLoadDelegate(extends w as WebViewMBS, theDelegate as WebResourceLoadDelegateMBS)
954
∗ 11.99.5 InstallWebUIDelegate(extends w as WebViewMBS, theDelegate as WebUIDelegateMBS)
955
136
CHAPTER 1. LIST OF TOPICS
• 5 Cocoa
– 16.1.1 class Window
∗ 16.1.3 NSToolbarMBS as NSToolbarMBS
151
1281
1281
Chapter 2
List of all classes
• Bevelbutton
587
• Checkbox
588
• ComboBox
189
• CustomNSScrollerMBS
190
• CustomNSSearchFieldMBS
205
• CustomNSTextFieldMBS
220
• CustomNSTextViewMBS
235
• CustomNSTokenFieldMBS
250
• CustomNSToolbarItemMBS
151
• CustomNSToolbarMBS
153
• CustomNSViewMBS
265
• CustomPDFViewMBS
1095
• DisclosureTriangle
281
• DOMAbstractViewMBS
731
• DOMAttrMBS
732
• DOMCDATASectionMBS
734
• DOMCharacterDataMBS
735
• DOMCommentMBS
737
• DOMCounterMBS
738
137
138
CHAPTER 2. LIST OF ALL CLASSES
• DOMCSSCharsetRuleMBS
739
• DOMCSSFontFaceRuleMBS
740
• DOMCSSImportRuleMBS
741
• DOMCSSMediaRuleMBS
742
• DOMCSSPageRuleMBS
743
• DOMCSSPrimitiveValueMBS
744
• DOMCSSRuleListMBS
749
• DOMCSSRuleMBS
750
• DOMCSSStyleDeclarationMBS
752
• DOMCSSStyleRuleMBS
775
• DOMCSSStyleSheetMBS
776
• DOMCSSUnknownRuleMBS
777
• DOMCSSValueListMBS
778
• DOMCSSValueMBS
779
• DOMDocumentFragmentMBS
781
• DOMDocumentMBS
782
• DOMDocumentTypeMBS
786
• DOMElementMBS
788
• DOMEntityMBS
791
• DOMEntityReferenceMBS
792
• DOMHTMLAnchorElementMBS
793
• DOMHTMLAppletElementMBS
796
• DOMHTMLAreaElementMBS
799
• DOMHTMLBaseElementMBS
801
• DOMHTMLBaseFontElementMBS
802
• DOMHTMLBodyElementMBS
803
• DOMHTMLBRElementMBS
805
• DOMHTMLButtonElementMBS
806
• DOMHTMLCollectionMBS
808
139
• DOMHTMLDirectoryElementMBS
809
• DOMHTMLDivElementMBS
810
• DOMHTMLDListElementMBS
811
• DOMHTMLDocumentMBS
812
• DOMHTMLElementMBS
816
• DOMHTMLEmbedElementMBS
819
• DOMHTMLFieldSetElementMBS
821
• DOMHTMLFontElementMBS
822
• DOMHTMLFormElementMBS
823
• DOMHTMLFrameElementMBS
826
• DOMHTMLFrameSetElementMBS
828
• DOMHTMLHeadElementMBS
829
• DOMHTMLHeadingElementMBS
830
• DOMHTMLHRElementMBS
831
• DOMHTMLHtmlElementMBS
833
• DOMHTMLIFrameElementMBS
834
• DOMHTMLImageElementMBS
837
• DOMHTMLInputElementMBS
840
• DOMHTMLIsIndexElementMBS
844
• DOMHTMLLabelElementMBS
845
• DOMHTMLLegendElementMBS
846
• DOMHTMLLIElementMBS
847
• DOMHTMLLinkElementMBS
848
• DOMHTMLMapElementMBS
850
• DOMHTMLMenuElementMBS
851
• DOMHTMLMetaElementMBS
852
• DOMHTMLModElementMBS
854
• DOMHTMLObjectElementMBS
855
• DOMHTMLOListElementMBS
859
140
CHAPTER 2. LIST OF ALL CLASSES
• DOMHTMLOptGroupElementMBS
860
• DOMHTMLOptionElementMBS
861
• DOMHTMLOptionsCollectionMBS
863
• DOMHTMLParagraphElementMBS
864
• DOMHTMLParamElementMBS
865
• DOMHTMLPreElementMBS
867
• DOMHTMLQuoteElementMBS
868
• DOMHTMLScriptElementMBS
869
• DOMHTMLSelectElementMBS
871
• DOMHTMLStyleElementMBS
874
• DOMHTMLTableCaptionElementMBS
875
• DOMHTMLTableCellElementMBS
876
• DOMHTMLTableColElementMBS
879
• DOMHTMLTableElementMBS
881
• DOMHTMLTableRowElementMBS
886
• DOMHTMLTableSectionElementMBS
888
• DOMHTMLTextAreaElementMBS
890
• DOMHTMLTitleElementMBS
893
• DOMHTMLUListElementMBS
894
• DOMImplementationMBS
895
• DOMMediaListMBS
896
• DOMNamedNodeMapMBS
898
• DOMNodeListMBS
900
• DOMNodeMBS
901
• DOMNotationMBS
907
• DOMObjectMBS
908
• DOMProcessingInstructionMBS
909
• DOMRangeMBS
910
• DOMRectMBS
915
141
• DOMRGBColorMBS
916
• DOMStyleSheetListMBS
917
• DOMStyleSheetMBS
918
• DOMTextMBS
920
• DRBurnMBS
601
• DRBurnProgressPanelMBS
619
• DRBurnSetupPanelMBS
626
• DRCDTextBlockMBS
630
• DRDeviceMBS
631
• DREraseMBS
661
• DREraseProgressPanelMBS
664
• DREraseSetupPanelMBS
667
• DRFileMBS
668
• DRFolderMBS
676
• DRFSObjectMBS
679
• DRMSFMBS
693
• DRSetupPanelMBS
697
• DRTrackMBS
701
• Groupbox
282
• HTMLViewer
921
• ImageWell
283
• KeyValueCodingMBS
284
• Listbox
589
• NSBoxMBS
288
• NSButtonMBS
301
• NSClipViewMBS
315
• NSComboBoxMBS
322
• NSDatePickerMBS
332
• NSHTTPCookieMBS
567
142
CHAPTER 2. LIST OF ALL CLASSES
• NSHTTPCookieStorageMBS
581
• NSImageViewMBS
339
• NSLevelIndicatorMBS
158
• NSOutlineViewItemMBS
374
• NSOutlineViewMBS
378
• NSPopUpButtonMBS
395
• NSProgressIndicatorMBS
405
• NSScrollerMBS
412
• NSScrollViewMBS
425
• NSSliderMBS
437
• NSStatusBarButtonMBS
1279
• NSStepperMBS
445
• NSTableColumnMBS
448
• NSTableDataSourceMBS
476
• NSTableHeaderCellMBS
478
• NSTableHeaderViewMBS
479
• NSTableRowViewMBS
482
• NSTableViewMBS
485
• NSTableViewRowActionMBS
531
• NSTokenFieldMBS
163
• NSToolbarItemGroupMBS
171
• NSToolbarItemMBS
172
• NSToolbarMBS
180
• PDFActionGoToMBS
1112
• PDFActionMBS
1113
• PDFActionNamedMBS
1115
• PDFActionRemoteGoToMBS
1119
• PDFActionResetFormMBS
1121
• PDFActionURLMBS
1123
143
• PDFAnnotationButtonWidgetMBS
1124
• PDFAnnotationChoiceWidgetMBS
1129
• PDFAnnotationCircleMBS
1132
• PDFAnnotationFreeTextMBS
1134
• PDFAnnotationInkMBS
1137
• PDFAnnotationLineMBS
1139
• PDFAnnotationLinkMBS
1145
• PDFAnnotationMarkupMBS
1147
• PDFAnnotationMBS
1151
• PDFAnnotationPopupMBS
1158
• PDFAnnotationSquareMBS
1159
• PDFAnnotationStampMBS
1161
• PDFAnnotationTextMBS
1163
• PDFAnnotationTextWidgetMBS
1165
• PDFBorderMBS
1169
• PDFDestinationMBS
1174
• PDFDocumentDelegateMBS
1177
• PDFDocumentMBS
1179
• PDFOutlineMBS
1199
• PDFPageMBS
1203
• PDFSelectionMBS
1214
• PDFThumbnailViewMBS
1222
• PDFViewMBS
1230
• Popupmenu
1093
• ProgressBar
558
• ProgressWheel
559
• PushButton
560
• QCCompositionMBS
1249
• QCCompositionRepositoryMBS
1262
144
• QCViewMBS
CHAPTER 2. LIST OF ALL CLASSES
1269
• QuartzFilterManagerMBS
591
• QuartzFilterMBS
595
• QuartzFilterViewMBS
599
• Radiobutton
590
• ScrollBar
561
• Separator
562
• Slider
563
• TextArea
564
• UpDownArrows
566
• WebArchiveMBS
955
• WebBackForwardListMBS
958
• WebDataSourceMBS
962
• WebDocumentRepresentationMBS
966
• WebDocumentViewMBS
968
• WebDownloadDelegateMBS
973
• WebFrameLoadDelegateMBS
981
• WebFrameMBS
987
• WebFrameViewMBS
992
• WebHistoryItemMBS
995
• WebHistoryMBS
998
• WebOpenPanelResultListenerMBS
1002
• WebPolicyDecisionListenerMBS
1004
• WebPolicyDelegateMBS
1006
• WebPreferencesMBS
1010
• WebPrintMBS
1023
• WebResourceLoadDelegateMBS
1029
• WebResourceMBS
1033
• WebScriptCallbackMBS
1036
145
• WebScriptObjectMBS
1038
• WebUIDelegateMBS
1042
• WebViewMBS
1053
• Window
1281
146
CHAPTER 2. LIST OF ALL CLASSES
Chapter 3
List of all controls
• NSButtonControlMBS
297
• NSDatePickerControlMBS
329
• NSOutlineControlMBS
346
• NSPopUpButtonControlMBS
392
• NSTableControlMBS
453
• NSTokenFieldControlMBS
534
• NSViewControlMBS
542
• PDFThumbnailViewControlMBS
1219
• PDFViewControlMBS
1226
• QCViewControlMBS
1266
147
148
CHAPTER 3. LIST OF ALL CONTROLS
Chapter 4
List of all global methods
• 11.99.1 InstallWebDownloadDelegate(extends w as WebViewMBS, theDelegate as WebDownloadDelegateMBS)
954
• 11.99.2 InstallWebFrameLoadDelegate(extends w as WebViewMBS, theDelegate as WebFrameLoadDelegateMBS)
954
• 11.99.3 InstallWebPolicyDelegate(extends w as WebViewMBS, theDelegate as WebPolicyDelegateMBS)
954
• 11.99.4 InstallWebResourceLoadDelegate(extends w as WebViewMBS, theDelegate as WebResourceLoadDelegateMBS)
954
• 11.99.5 InstallWebUIDelegate(extends w as WebViewMBS, theDelegate as WebUIDelegateMBS) 955
149
150
CHAPTER 4. LIST OF ALL GLOBAL METHODS
Chapter 5
Cocoa
5.1
5.1.1
class CustomNSToolbarItemMBS
class CustomNSToolbarItemMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The class for a
custom toolbar item.
Notes:
Use this class if you need to fill events.
Subclass of the NSToolbarItemMBS class.
5.1.2
Methods
5.1.3
Constructor(itemIdentifier as string)
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor.
Notes:
itemIdentifier: The identifier for the receiver. itemIdentifier is never seen by users and should not be localized.
The identifier is used by the toolbar and its delegate to identify the kind of the toolbar item.
5.1.4
Destructor
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The destructor.
151
152
CHAPTER 5. COCOA
5.1.5
Events
5.1.6
Action
Plugin Version: 11.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The action event
called when user clicks toolbar item.
5.1.7
allowsDuplicatesInToolbar as boolean
Plugin Version: 11.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether the receiver can be represented in the toolbar at more than one position.
Notes:
You use this event to override the default behavior in a subclass.
By default, if an item with the same identifier is already in the toolbar, dragging it in again will effectively
move it to the new position.
If you leave this event empty (no code), you get the default behavior.
5.1.8
validate as boolean
Plugin Version: 11.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Validates a toolbar
item.
Notes:
If this event is implemented and returns false, NSToolbar will disable theItem; returning true causes theItem
to be enabled.
NSToolbar only calls this method for image items.
validateis called very frequently, so it must be efficient.
If you don’t have code in this event, the plugin will simply return enabled value.
This methods may not be called if you set Autovalidates to true.
5.2. CLASS CUSTOMNSTOOLBARMBS
5.2
5.2.1
153
class CustomNSToolbarMBS
class CustomNSToolbarMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The toolbar class
for the case you need to use the events.
Notes: Subclass of the NSToolbarMBS class.
5.2.2
Methods
5.2.3
Constructor(Identifier as string)
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the standard
toolbar item identifiers.
5.2.4
Destructor
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The destructor.
5.2.5
Events
5.2.6
allowsSizeMode(mode as Integer, SuperAllows as boolean) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether to allow
the given size mode.
Example:
Function allowsSizeMode(mode as Integer, SuperAllows as boolean) As boolean
# if DebugBuild then
System.DebugLog CurrentMethodName+” ”+str(SuperAllows)
# endif
if mode = NSToolbarMBS.NSToolbarSizeModeSmall then
Return false
else
Return SuperAllows
end if
End Function
154
CHAPTER 5. COCOA
Notes:
If you have nothing in the event, the default behavior is to allow all.
You can return false for a mode to disable it. e.g. NSToolbarSizeModeSmall
SuperAllows parameter tells you if mode is enabled by default.
5.2.7
itemForItemIdentifier(identifier as string, willBeInsertedIntoToolbar as
boolean) as NSToolbarItemMBS
Plugin Version: 11.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent to request a
new toolbar item; returns a toolbar item of the identified kind for the specified toolbar.
Notes:
itemIdentifier: The identifier for the requested item.
willBeInsertedIntoToolbar: True if the item will be immediately inserted into the toolbar. If flag is false the
toolbar item is being requested for display in the toolbar customization sheet and should always be enabled
or provide some other canonical representation. If you ignore this parameter the same toolbar item will be
used in the toolbar and in the customization sheet.
Return Value
The toolbar item for the specified toolbar and identifier. Return nil to indicate that the identified kind of
toolbar item is not supported. When an item is requested again, you may return the same NSToolbarItem
object returned earlier or a different instance.
Implement this method to create new toolbar item instances. This method is called lazily on behalf of a
toolbar instance, which must be the sole owner of the toolbar item. A toolbar may ask again for a kind of
toolbar item already supplied to it, in which case this method may return the same toolbar item it returned
before or a different one. If your delegate services multiple toolbars, each attached to a different window, it
is best to return a different item for each toolbaran NSToolbarItem object can only be in one toolbar at a time.
If the item is a custom view item, the NSView object must be fully formed when the item is returned. Do
not assume that the returned item is going to be added as an active item in the toolbar, as it could be that it
will be used only in the customization palette. (The customization palette makes a copy of the returned item.)
This event must be implemented if the associated toolbar is created programatically.
5.2.8
toolbarAllowedItemIdentifiers as string()
Plugin Version: 11.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent to discover the
allowed item identifiers for a toolbar.
Notes:
An array of toolbar item identifiers for toolbar, specifying the contents and the order of the items in the
configuration palette.
5.2. CLASS CUSTOMNSTOOLBARMBS
155
Every allowed item must be explicitly listed, even the standard ones. The identifiers returned should include
all of those returned by toolbarDefaultItemIdentifiers:.
This event must be implemented if the associated toolbar is created programatically.
5.2.9
toolbarDefaultItemIdentifiers as string()
Plugin Version: 11.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent to discover the
default item identifiers for a toolbar.
Notes:
Return an array of toolbar item identifiers for toolbar, specifying the contents and the order of the items in
the default toolbar configuration.
During initialization of toolbar, this method is called only if a toolbar configuration for the identifier of
toolbar is not found in the user preferences. This method is called during initialization of the toolbar customization palette.
This event must be implemented if the associated toolbar is created programatically.
5.2.10
toolbarDidRemoveItem(item as NSToolbarItemMBS, notification as NSNotificationMBS)
Plugin Version: 11.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent just after an
item has been removed from a toolbar.
Notes: This method allows you to remove information related to the item that may have been cached.
5.2.11
toolbarItemAction(item as NSToolbarItemMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The action event
called when user clicks toolbar item.
Notes: Only for instances of CustomNSToolbarItemMBS, the plugin can forward the allowsDuplicatesInToolbar event to the CustomNSToolbarMBS, so you can handle it in a central place for all toolbar items.
156
5.2.12
CHAPTER 5. COCOA
toolbarItemAllowsDuplicatesInToolbar(item as NSToolbarItemMBS) as
boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether the receiver can be represented in the toolbar at more than one position.
Notes:
You use this event to override the default behavior in a subclass.
By default, if an item with the same identifier is already in the toolbar, dragging it in again will effectively
move it to the new position.
If you leave this event empty (no code), you get the default behavior.
Only for instances of CustomNSToolbarItemMBS, the plugin can forward the allowsDuplicatesInToolbar
event to the CustomNSToolbarMBS, so you can handle it in a central place for all toolbar items.
5.2.13
toolbarItemValidate(item as NSToolbarItemMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Validates a toolbar
item.
Notes:
If this event is implemented and returns false, NSToolbar will disable theItem; returning true causes theItem
to be enabled.
NSToolbar only calls this method for image items.
validateis called very frequently, so it must be efficient.
If you don’t have code in this event, the plugin will simply return enabled value.
This methods may not be called if you set Autovalidates to true.
Only for instances of CustomNSToolbarItemMBS, the plugin can forward the allowsDuplicatesInToolbar
event to the CustomNSToolbarMBS, so you can handle it in a central place for all toolbar items.
5.2.14
toolbarSelectableItemIdentifiers as string()
Plugin Version: 11.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent to discover the
selectable item identifiers for a toolbar.
Notes:
Return an array of item identifiers that should indicate selection in the specified toolbar.
5.2. CLASS CUSTOMNSTOOLBARMBS
157
Toolbars that need to indicate item selection should return an array containing the identifiers of the selectable toolbar items.
If implemented, toolbar will display the currently selected item with a visual highlight. Clicking on an item
whose identifier is selectable will automatically update the toolbar’s selected item identifier, when possible.
Clicking an item whose identifier is not selectable will not update the toolbar’s selected item identifier.
5.2.15
toolbarWillAddItem(item as NSToolbarItemMBS, notification as NSNotificationMBS)
Plugin Version: 11.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent just before a
new item is added to a toolbar.
Notes: If you need to cache a reference to a toolbar item or need to set up some initial state before a toolbar
item is added, this is where to do it.
158
5.3
5.3.1
CHAPTER 5. COCOA
class NSLevelIndicatorMBS
class NSLevelIndicatorMBS
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: NSLevelIndicatorMBS is a subclass of NSControlMBS that displays a value on a linear scale.
Notes:
Level indicators provide a visual representation of a level or amount of something, using discrete values.
While similar to NSSlider, it provides a more customized visual feedback to the user. Level indicators do not
have a ”knob” indicating the current setting or allowing the user to adjust settings. The supported indicator
styles include:
• A capacity style level indicator. The continuous mode for this style is often used to indicate conditions
such as how much data is on hard disk. The discrete mode is similar to audio level indicators in
audio playback applications. You can specify both a warning value and a critical value that provides
additional visual feedback to the user.
• A ranking style level indicator. This is similar to the star ranking displays provided in iTunes and
iPhoto. You can also specify your own ranking image.
• A relevancy style level indicator. This style is used to display the relevancy of a search result, for
example in Mail.
NSLevelIndicator uses an NSLevelIndicatorCell to implement much of the control’s functionality. NSLevelIndicator provides cover methods for most of NSLevelIndicatorCell’s methods, which invoke the corresponding
cell method.
Subclass of the NSControlMBS class.
5.3.2
Methods
5.3.3
Constructor
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new level
indicator with size 100/100 and position 0/0
Example:
dim t as new NSLevelIndicatorMBS
Notes: On success the handle property is not zero.
See also:
• 5.3.4 Constructor(Handle as Integer)
159
• 5.3.5 Constructor(left as Double, top as Double, width as Double, height as Double)
159
5.3. CLASS NSLEVELINDICATORMBS
5.3.4
159
Constructor(Handle as Integer)
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSLevelIndicator handle.
Example:
dim t as new NSLevelIndicatorMBS(0, 0, 100, 100)
dim v as new NSLevelIndicatorMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSLevelIndicator and the plugin retains this handle.
See also:
• 5.3.3 Constructor
158
• 5.3.5 Constructor(left as Double, top as Double, width as Double, height as Double)
159
5.3.5
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new level
indicator with the given size and position.
Example:
dim x as new NSLevelIndicatorMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.
See also:
• 5.3.3 Constructor
158
• 5.3.4 Constructor(Handle as Integer)
159
5.3.6
rectOfTickMarkAtIndex(index as Integer) as NSRectMBS
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the bounding rectangle of the tick mark identified by index (the minimum-value tick mark is at index 0).
Notes: If no tick mark is associated with index, the method raises a NSExceptionMBS.
160
5.3.7
CHAPTER 5. COCOA
tickMarkValueAtIndex(index as Integer) as Double
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the receiver’s value represented by the tick mark at index (the minimum-value tick mark has an index of 0).
5.3.8
Properties
5.3.9
criticalValue as Double
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The critical value.
Notes: (Read and Write computed property)
5.3.10
levelIndicatorStyle as Integer
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Set style of the
indicator.
Notes: (Read and Write computed property)
5.3.11
maxValue as Double
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The maximum
value the level indicator can represent.
Notes: (Read and Write computed property)
5.3.12
minValue as Double
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The minimum
value.
Notes: (Read and Write computed property)
5.3.13
numberOfMajorTickMarks as Integer
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The number of
major tick marks displayed.
Notes:
The count must be less than or equal to the number of tick marks returned by numberOfTickMarks. For
example, if the number of tick marks is 11 and you specify 3 major tick marks, the resulting level indicator
5.3. CLASS NSLEVELINDICATORMBS
161
will display 3 major tickmarks alternating with 8 minor tick marks.
(Read and Write computed property)
5.3.14
numberOfTickMarks as Integer
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The number of
tick marks displayed by the receiver (which include those assigned to the minimum and maximum values)
to count.
Notes:
By default, this value is 0, and no tick marks appear. The number of tick marks assigned to a slider, along
with the slider’s minimum and maximum values, determines the values associated with the tick marks.
(Read and Write computed property)
5.3.15
tickMarkPosition as Integer
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Where tick marks
appear relative to the indicator.
Notes:
This method has no effect if no tick marks have been assigned (that is, numberOfTickMarks returns 0).
(Read and Write computed property)
5.3.16
warningValue as Double
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The warning value.
Notes: (Read and Write computed property)
5.3.17
Constants
5.3.18
NSContinuousCapacityLevelIndicatorStyle = 1
Plugin Version: 12.2. Function: One of the style constants.
Notes: A style that is often used to indicate conditions such as how much data is on a hard disk.
162
5.3.19
CHAPTER 5. COCOA
NSDiscreteCapacityLevelIndicatorStyle = 2
Plugin Version: 12.2. Function: One of the style constants.
Notes: A style similar to audio level indicators in iTunes.
5.3.20
NSRatingLevelIndicatorStyle = 3
Plugin Version: 12.2. Function: One of the style constants.
Notes: A style similar to the star ranking displays provided in iTunes and iPhoto.
5.3.21
NSRelevancyLevelIndicatorStyle = 0
Plugin Version: 12.2. Function: One of the style constants.
Notes: A style similar to the rank column displayed when searching in Mail.app.
5.3.22
NSTickMarkAbove = 1
Plugin Version: 12.2. Function: One of the tick mark constants.
Notes: Tick marks above (for horizontal sliders).
5.3.23
NSTickMarkBelow = 0
Plugin Version: 12.2. Function: One of the tick mark constants.
Notes: Tick marks below (for horizontal sliders); the default for horizontal sliders.
5.3.24
NSTickMarkLeft = 0
Plugin Version: 12.2. Function: One of the tick mark constants.
Notes: Tick marks to the left (for vertical sliders); the default. for vertical sliders
5.3.25
NSTickMarkRight = 1
Plugin Version: 12.2. Function: One of the tick mark constants.
Notes: Tick marks to the right (for vertical sliders).
5.4. CLASS NSTOKENFIELDMBS
5.4
5.4.1
163
class NSTokenFieldMBS
class NSTokenFieldMBS
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: NSTokenField is a
subclass of NSTextField that provides tokenized editing similar to the address field in the Mail application.
Notes:
NSTokenField uses an NSTokenFieldCell to implement much of the control’s functionality. NSTokenField
provides cover methods for most methods of NSTokenFieldCell, which invoke the corresponding cell method.
In MBS Plugin the objects must be strings or numbers. With plugin version 12.5, you can also use normal
Real Studio objects.
In OS X v10.4, NSTokenField trims whitespace around tokens but it does not trim whitespace in OS X
versions 10.5.0 and 10.5.1. In OS X v10.5.2, you get whitespace-trimming behavior by either linking against
the v10.4 binary or linking against the v10.5 binary and not implementing the representedObjectForEditingString event. If you do not want the whitespace-trimming behavior, link against the v10.5 binary and
implement this method, returning the editing string if you have no represented object.
Please note: Due to the way the plugin is implemented the Action, textShouldEndEditing and textShouldBeginEditing events do nothing, so please use tokenFieldAction, tokenFieldTextShouldEndEditing and tokenFieldTextShouldBeginEditing.
Subclass of the NSTextFieldMBS class.
5.4.2
Methods
5.4.3
Constructor
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
control with size 100/100 and position 0/0
Example:
dim t as new NSTokenFieldMBS
Notes: On success the handle property is not zero.
See also:
• 5.4.4 Constructor(Handle as Integer)
164
• 5.4.5 Constructor(left as Double, top as Double, width as Double, height as Double)
164
164
5.4.4
CHAPTER 5. COCOA
Constructor(Handle as Integer)
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSControl handle.
Example:
dim t as new NSTokenFieldMBS(0, 0, 100, 100)
dim v as new NSTokenFieldMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSControl and the plugin retains this handle.
See also:
• 5.4.3 Constructor
163
• 5.4.5 Constructor(left as Double, top as Double, width as Double, height as Double)
164
5.4.5
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
control with the given size and position.
Example:
dim x as new NSTokenFieldMBS(0, 0, 100, 20)
Notes: On success the handle property is not zero.
See also:
• 5.4.3 Constructor
163
• 5.4.4 Constructor(Handle as Integer)
164
5.4.6
defaultCompletionDelay as Double
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the default
completion delay.
Notes: The default completion delay is 0.
5.4. CLASS NSTOKENFIELDMBS
5.4.7
165
defaultTokenizingCharacterSet as NSCharacterSetMBS
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the default
tokenizing character set.
Notes: The default tokenizing character set is ”,”.
5.4.8
objects as Variant()
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Queries list of
represented objects.
5.4.9
setObjects(objects() as Variant)
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets current objects.
5.4.10
Properties
5.4.11
completionDelay as Double
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The completion
delay.
Notes: (Read and Write computed property)
5.4.12
tokenizingCharacterSet as NSCharacterSetMBS
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The tokenizing
character set.
Notes: (Read and Write computed property)
5.4.13
tokenStyle as Integer
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The token style.
Notes: (Read and Write computed property)
166
CHAPTER 5. COCOA
5.4.14
Events
5.4.15
completionsForSubstring(substring as string, tokenIndex as Integer, byref
selectedIndex as Integer) as Variant()
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to provide an array of appropriate completions for the contents of the receiver.
Notes:
substring: The partial string that is to be completed.
tokenIndex: The index of the token being edited.
selectedIndex: Optionally, you can return by-reference an index into the returned array that specifies which
of the completions should be initially selected. If none are to be selected, return by reference -1.
Returns an array of strings that are possible completions.
If the delegate does not implement this method, no completions are provided.
5.4.16
displayStringForRepresentedObject(representedObject as Variant) as string
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to provide a string to be displayed as a proxy for the given represented object.
Notes:
representedObject: A represented object of the token field.
Returns the string to be used as a proxy for representedObject. If you return nil or do not implement this
method, then representedObject is displayed as the string.
5.4.17
editingStringForRepresentedObject(representedObject as Variant) as string
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to provide a string to be edited as a proxy for a represented object.
Notes:
representedObject: A represented object of the token field.
Returns a string that’s an editable proxy of the represented object, or nil if the token should not be editable.
5.4. CLASS NSTOKENFIELDMBS
5.4.18
167
hasMenuForRepresentedObject(representedObject as Variant) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to specify whether the given represented object provides a menu.
Notes:
representedObject: A represented object of the token field.
Returns true if the represented object has a menu, false otherwise.
By default tokens in a token field have no menus.
5.4.19
menuForRepresentedObject(representedObject as Variant) as NSMenuMBS
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to provide a menu for the specified represented object.
Notes:
representedObject: A represented object of the token field.
Returns the menu associated with the represented object.
By default tokens in a token field do not return menus.
5.4.20
readFromPasteboard(pboard as NSPasteboardMBS) as Variant()
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to return an array of objects representing the data read from the specified pasteboard.
Notes:
pboard: The pasteboard from which to read the represented objects.
Returns an array of represented objects created from the pasteboard data.
5.4.21
representedObjectForEditingString(editingString as string) as Variant
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to provide a represented object for the given editing string.
Notes:
editingString: The edited string representation of a represented object.
168
CHAPTER 5. COCOA
Returns a represented object that is displayed rather than the editing string.
Note: In OS X v10.4, NSTokenField trims whitespace around tokens but it does not trim whitespace in
OS X versions 10.5.0 and 10.5.1. In OS X v10.5.2, you get whitespace-trimming behavior by either linking
against the v10.4 binary or linking against the v10.5 binary and not implementing the this method. If you
do not want the whitespace-trimming behavior, link against the v10.5 binary and implement this method,
returning the editing string if you have no represented object.
5.4.22
shouldAddObjects(tokens() as Variant, index as Integer) as Variant()
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows to validate
the tokens to be added to the receiver at a particular location.
Notes:
tokens: An array of tokens to be inserted in the receiver at index.
index: The index of the receiver in which the array of tokens to be validated (tokens) will be inserted.
Returns an array of validated tokens.
The event can return the array unchanged or return a modified array of tokens. To reject the add completely,
return an empty array. Returning nil causes an error.
5.4.23
styleForRepresentedObject(representedObject as Variant) as Integer
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to return the token style for editing the specified represented object.
Notes:
representedObject: A represented object of the token field.
Returns the style that should be used to display the representedObject. Possible values are shown in NSTokenStyle Values.
If the event implements this method and returns an NSTokenStyle that differs from the style set by setTokenStyle:, the value the event returns is preferred.
If you don’t implement this method, the token field’s tokenStyle is used.
5.4. CLASS NSTOKENFIELDMBS
5.4.24
169
tokenFieldAction
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control’s action
was triggered.
Notes: For a button if it was pressed.
5.4.25
tokenFieldTextShouldBeginEditing(fieldEditor as NSTextMBS) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called to
decide whether text editing should be allowed.
Notes: Return true to allow text editing.
5.4.26
tokenFieldTextShouldEndEditing(fieldEditor as NSTextMBS) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called to
decide whether ending text editing should be allowed.
Notes: Return true to allow text editing.
5.4.27
writeRepresentedObjects(objects() as Variant, pboard as NSPasteboardMBS)
as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent so the delegate
can write represented objects to the pasteboard corresponding to a given array of display strings.
Notes:
objects: An array of represented objects associated with the token field.
pboard: The pasteboard to which to write the represented objects.
Return true if you writes the represented objects to the pasteboard, false otherwise. If false, the token field
writes the display strings to the NSStringPboardType pasteboard.
5.4.28
Constants
5.4.29
NSDefaultTokenStyle = 0
Plugin Version: 12.5. Function: One of the token styles.
Notes:
Style best used for keyword type tokens.
170
CHAPTER 5. COCOA
Available in OS X v10.4 and later.
5.4.30
NSPlainTextTokenStyle = 1
Plugin Version: 12.5. Function: One of the token styles.
Notes:
Style to use for data you want represented as plain-text and without any token background.
Available in OS X v10.4 and later.
5.4.31
NSRoundedTokenStyle = 2
Plugin Version: 12.5. Function: One of the token styles.
Notes:
Style best used for address type tokens.
Available in OS X v10.4 and later.
5.5. CLASS NSTOOLBARITEMGROUPMBS
5.5
5.5.1
171
class NSToolbarItemGroupMBS
class NSToolbarItemGroupMBS
Plugin Version: 15.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: NSToolbarItemGroup is a subclass of NSToolbarItem which contains subitems.
Notes:
The views and labels of the subitems are used, but the parent’s attributes take precedence.
Subclass of the NSToolbarItemMBS class.
5.5.2
Methods
5.5.3
Constructor(itemIdentifier as string)
Plugin Version: 15.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor.
Notes:
itemIdentifier: The identifier for the receiver. itemIdentifier is never seen by users and should not be localized.
The identifier is used by the toolbar and its delegate to identify the kind of the toolbar item.
5.5.4
SetSubItems(items() as NSToolbarItemMBS)
Plugin Version: 15.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets the subitems
for the receiver.
Notes:
subitems: An array of instances of NSToolbarItem objects that form the subitems for the receiver.
You should call this method to set the subitems before returning the item to the toolbar. NSToolbarItemGroup objects cannot contain other NSToolbarItemGroup objects as subitems.
5.5.5
subitems as NSToolbarItemMBS()
Plugin Version: 15.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
subitems for the receiver.
Notes: By default, an NSToolbarItemGroup instance has an empty array of subitems.
172
5.6
5.6.1
CHAPTER 5. COCOA
class NSToolbarItemMBS
class NSToolbarItemMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The class for Cocoa
toolbar items.
Notes: Each item in an NSToolbar is an instance of NSToolbarItem.
5.6.2
Methods
5.6.3
Constructor(itemIdentifier as string)
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor.
Notes:
itemIdentifier: The identifier for the receiver. itemIdentifier is never seen by users and should not be localized.
The identifier is used by the toolbar and its delegate to identify the kind of the toolbar item.
5.6.4
NSToolbarCustomizeToolbarItemIdentifier as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the standard
toolbar item identifiers.
Notes:
The Customize item. Shows the customization palette.
Deprecated. In OS X v10.7 and later the customization icon has been removed from the toolbar and customization palettes. This constant is ignored.
5.6.5
NSToolbarFlexibleSpaceItemIdentifier as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the standard
toolbar item identifiers.
Notes: The Flexible Space item.
5.6. CLASS NSTOOLBARITEMMBS
5.6.6
173
NSToolbarPrintItemIdentifier as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the standard
toolbar item identifiers.
Notes: The Print item. Sends printDocument to firstResponder, but you can change this in toolbarWillAddItem if you need to do so.
5.6.7
NSToolbarSeparatorItemIdentifier as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the standard
toolbar item identifiers.
Notes: The Separator item.
5.6.8
NSToolbarShowColorsItemIdentifier as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the standard
toolbar item identifiers.
Notes: The Colors item. Shows the color panel.
5.6.9
NSToolbarShowFontsItemIdentifier as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the standard
toolbar item identifiers.
Notes: The Fonts item. Shows the font panel.
5.6.10
NSToolbarSpaceItemIdentifier as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the standard
toolbar item identifiers.
Notes: The Space item.
5.6.11
validate
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: This method is
called by the receiver’s toolbar during validation.
Notes: You may invoke this method directly if you have disabled automatic validation for an itemtypically
you do this for performance reasons if your validation code is slow.
174
CHAPTER 5. COCOA
5.6.12
Properties
5.6.13
allowsDuplicatesInToolbar as boolean
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether the receiver can be represented in the toolbar at more than one position.
Notes:
Returns true to allow dragging the receiver into the toolbar at more than one position, otherwise false.
You use this method by overriding it in a subclass to always return true; typically, you wouldn’t call it. By
default, if an item with the same identifier is already in the toolbar, dragging it in again will effectively move
it to the new position.
(Read only property)
5.6.14
autovalidates as boolean
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether this item
auto validates.
Notes:
By default NSToolbar automatically invokes the receiver’s validate method on a regular basis. If your validate method is time consuming, you can disable auto validation on a per toolbar item basis.
(Read and Write property)
5.6.15
ClassName as String
Plugin Version: 15.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The name of this
NSWindow class.
Notes: (Read only property)
5.6.16
ClassPath as String
Plugin Version: 15.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The path of this
NSView class.
Notes:
Useful for debugging to know what super classes the window has.
(Read only property)
5.6. CLASS NSTOOLBARITEMMBS
5.6.17
175
Enabled as boolean
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
that indicates whether the receiver is enabled.
Notes:
For a view item, this method calls isEnabled/setEnabled on the view if it responds and returns the result.
(Read and Write property)
5.6.18
Handle as Integer
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The internal
reference to the NSToolbarItem object.
Notes: (Read and Write property)
5.6.19
image as NSImageMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The image for this
toolbar item.
Notes:
For a custom view item (one whose view has already been set), this method calls setImage on the view if it
responds. If image contains multiple representations, NSToolbarItem chooses the most appropriately sized
representation when displaying.
(Read and Write property)
5.6.20
itemIdentifier as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The receiver’s
identifier.
Notes:
Returns the receiver’s identifier, which was provided in the initializer.
(Read only property)
5.6.21
label as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The label, which
normally appears in the toolbar and in the overflow menu.
Notes:
176
CHAPTER 5. COCOA
The length of the label should be appropriate and not too long. The label may be empty.
(Read and Write property)
5.6.22
MaxSize as NSSizeMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The maximum size.
Notes: (Read and Write property)
5.6.23
menuFormRepresentation as NSMenuItemMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The menu form
representation.
Notes:
By default, this method returns nil, even though there is a default menu form representation.
(Read and Write property)
5.6.24
MinSize as NSSizeMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The minimum size.
Notes: (Read and Write property)
5.6.25
paletteLabel as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The label that
appears when the receiver is in the customization palette.
Notes:
An item must have a palette label if the customization palette is to be used, and for most items it is reasonable to set paletteLabel to be the same value as label. One reason for paletteLabel to be different from
label would be if it’s more descriptive; another might be if there is no label.
(Read and Write property)
5.6.26
tag as Integer
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The tag value.
Notes:
5.6. CLASS NSTOOLBARITEMMBS
177
You can use the tag for your own custom purpose.
(Read and Write property)
5.6.27
toolbar as NSToolbarMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the toolbar
that is using the receiver.
Notes: (Read only property)
5.6.28
toolTip as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The tooltip to be
used when the receiver is displayed in the toolbar.
Notes: (Read and Write property)
5.6.29
view as NSViewMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The custom view
for this item.
Notes:
view: The view for the receiver. The view and all of its contents must conform to the NSCoding protocol if
the toolbar supports customization.
Note that many of the set/get methods are implemented by calls forwarded to view, if it responds to it.
(Read and Write property)
5.6.30
visibilityPriority as Integer
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The visibility
priority.
Notes: (Read and Write property)
178
CHAPTER 5. COCOA
5.6.31
Constants
5.6.32
NSToolbarItemVisibilityPriorityHigh = 1000
Plugin Version: 11.3. Function: One of the visibility priority constants.
Notes:
When a toolbar does not have enough space to fit all its items, it must push some items into the overflow
menu. These values allow you to suggest a priority for a toolbar item.
Items with this priority are less inclined to be pushed to the overflow menu.
5.6.33
NSToolbarItemVisibilityPriorityLow = -1000
Plugin Version: 11.3. Function: One of the visibility priority constants.
Notes:
When a toolbar does not have enough space to fit all its items, it must push some items into the overflow
menu. These values allow you to suggest a priority for a toolbar item.
Items with this priority will be the first items to be pushed to the overflow menu.
5.6.34
NSToolbarItemVisibilityPriorityStandard = 0
Plugin Version: 11.3. Function: One of the visibility priority constants.
Notes:
When a toolbar does not have enough space to fit all its items, it must push some items into the overflow
menu. These values allow you to suggest a priority for a toolbar item.
The default visibility priority.
5.6.35
NSToolbarItemVisibilityPriorityUser = 2000
Plugin Version: 11.3. Function: One of the visibility priority constants.
Notes:
When a toolbar does not have enough space to fit all its items, it must push some items into the overflow
menu. These values allow you to suggest a priority for a toolbar item.
5.6. CLASS NSTOOLBARITEMMBS
179
Items with this priority are the last to be pushed to the overflow menu. Only the user should set items to
this priority.
180
5.7
5.7.1
CHAPTER 5. COCOA
class NSToolbarMBS
class NSToolbarMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: NSToolbar and
NSToolbarItem provide the mechanism for a titled window to display a toolbar just below its title bar.
5.7.2
Methods
5.7.3
Constructor(Identifier as string)
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor.
Notes:
Initializes a newly allocated toolbar with the specified identifier.
identifier is never seen by users and should not be localized.
5.7.4
insertItemWithItemIdentifier(identifier as string, atIndex as Integer)
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Inserts the specified
item at the specified index.
Notes:
Identifier: The identifier of the item to insert.
index: The index at which to insert the item.
If the toolbar needs a new instance, it will get it from itemForItemIdentifier. Typically, you should not call
this method; you should let the user reconfigure the toolbar.
5.7.5
items as NSToolbarItemMBS()
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the receiver’s current items, in order.
5.7.6
NSToolbarDidRemoveItemNotification as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the notification identifiers.
Notes: Posted after an item is removed from a toolbar. The notification item is the NSToolbar object
5.7. CLASS NSTOOLBARMBS
181
that had an item removed from it. The userInfo dictionary contains the following information: item: The
NSToolbarItem object that was removed.
5.7.7
NSToolbarWillAddItemNotification as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the notification identifiers.
Notes: Posted before a new item is added to the toolbar. The notification item is the NSToolbar object
having an item added to it. The userInfo dictionary contains the following information: item: The NSToolbarItem object being added.
5.7.8
removeItemAtIndex(index as Integer)
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Removes the
specified item.
Notes:
Typically, you should not call this method; you should let the user reconfigure the toolbar.
Index is zero based.
5.7.9
runCustomizationPalette
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Runs the receiver’s
customization palette.
5.7.10
validateVisibleItems
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Called on window
updates to validate the visible items.
Notes:
You typically use this method by overriding it in a subclass. The default implementation of this method
iterates through the list of visible items, sending each a validate message. Override it and call super if you
want to know when this method is called.
In Mac OS X v 10.6 and later toolbars no longer automatically validate for some events, including: NSLeftMouseDragged, NSRightMouseDragged, NSOtherMouseDragged, NSMouseEntered, NSMouseExited, NSScrollWheel, NSCursorUpdate, NSKeyDown. In addition, validation for NSKeyUp and NSFlagsChanged
182
CHAPTER 5. COCOA
events is deferred with the timer restarting for every new deferrable event. So a sequence of key events will
not trigger any validation at all, until either a pause of .85 seconds, or an event other than NSKeyUp or
NSFlagsChanged is processed. This change was made as an optimization.
To trigger validation for a single toolbar manually, send the toolbar a validateVisibleItems message. To
trigger validation for all toolbars, invoke NSApplication’s setWindowsNeedUpdate passing true.
5.7.11
visibleItems as NSToolbarItemMBS()
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the receiver’s currently visible items.
Notes: Items in the overflow menu are not considered visible.
5.7.12
Properties
5.7.13
allowsUserCustomization as boolean
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
that indicates whether users are allowed to modify the toolbar.
Notes:
True if users are allowed to modify the toolbar, false otherwise. The default is false.
If the value is false, then the Customize Toolbar menu item is disabled and other modification is disabled.
This attribute does not affect the user’s ability to show or hide the toolbar.
(Read and Write property)
5.7.14
autosavesConfiguration as boolean
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
that indicates whether the receiver autosaves its configuration.
Notes:
True if the receiver autosaves its configuration, otherwise false. The default is false.
When autosaving is enabled, the receiver will automatically write the toolbar settings to user defaults if
the toolbar configuration changes. The toolbar’s configuration is identified in user defaults by the toolbar
identifier. If there are multiple toolbars active with the same identifier, they all share the same configuration.
(Read and Write property)
5.7. CLASS NSTOOLBARMBS
5.7.15
183
configurationDictionary as dictionary
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The receiver’s
configuration as a dictionary.
Notes:
Set/get a dictionary containing configuration information for the toolbar.
Contains displayMode, isVisible, and a list of the item identifiers currently in the toolbar.
Do not depend on any details of the normal contents of a configuration dictionary.
(Read and Write property)
5.7.16
configurationDictionaryData as Memoryblock
Plugin Version: 14.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The receiver’s
configuration as a memoryblock.
Notes:
Set/get a memoryblock containing configuration information for the toolbar.
Contains displayMode, isVisible, and a list of the item identifiers currently in the toolbar.
Do not depend on any details of the normal contents of a configuration dictionary.
you can read/write the data to preferences.
(Read and Write property)
5.7.17
customizationPaletteIsRunning as boolean
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether the receiver’s customization palette is running (in use).
Notes:
True if the receiver’s customization palette is running, otherwise false.
(Read only property)
5.7.18
displayMode as Integer
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The receiver’s
display mode.
Notes: (Read and Write property)
184
5.7.19
CHAPTER 5. COCOA
fullScreenAccessoryView as NSViewMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The fullscreen mode
accessory view.
Notes:
Requires Mac OS X 10.7.
(Read and Write property)
5.7.20
fullScreenAccessoryViewMaxHeight as Double
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The fullscreen mode
accessory view’s maximum height.
Notes:
Requires Mac OS X 10.7.
(Read and Write property)
5.7.21
fullScreenAccessoryViewMinHeight as Double
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The fullscreen mode
accessory view’s minimum height.
Notes:
Requires Mac OS X 10.7.
(Read and Write property)
5.7.22
Handle as Integer
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The internal
reference for this object.
Notes: (Read and Write property)
5.7.23
identifier as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
receiver’s identifier.
Notes:
Returns the receiver’s identifier, a string used by the class to identify the kind of toolbar.
5.7. CLASS NSTOOLBARMBS
185
Within the application all toolbars with the same identifier are synchronized to maintain the same state,
including for example, the display mode and item order. The identifier is used as the autosave name for
toolbars that save their configuration.
(Read only property)
5.7.24
selectedItemIdentifier as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The selected item
to the specified toolbar item.
Notes:
Typically, a toolbar will manage the selection of items automatically. This method can be used to select
identifiers of custom view items, or to force a selection change. See toolbarSelectableItemIdentifiers for more
details. If itemIdentifier is not recognized by the receiver, the current selected item identifier does not change.
(Read and Write property)
5.7.25
showsBaselineSeparator as boolean
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
that indicates whether the toolbar shows the separator between the toolbar and the main window contents.
Notes:
True if the toolbar shows the separator between the toolbar and the main window contents, otherwise false.
The default is true.
(Read and Write property)
5.7.26
sizeMode as Integer
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The size mode.
Notes:
If there is no icon of the given size for a toolbar item, the toolbar item creates one by scaling an icon of
another size.
(Read and Write property)
5.7.27
toolbarView as NSViewMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The internal NSView
used for displaying the toolbar.
Notes:
186
CHAPTER 5. COCOA
Useful to query values like the bounds of the toolbar.
Returns nil on 64 bit targets.
(Read only property)
5.7.28
visible as boolean
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the receiver
is visible or hidden.
Notes:
True to indicate the receiver should be made visible, false to indicate it should be hidden.
(Read and Write property)
5.7.29
Constants
5.7.30
NSToolbarDisplayModeDefault = 0
Plugin Version: 11.3. Function: One of the constants for displayMode property.
Notes: The default display mode.
5.7.31
NSToolbarDisplayModeIconAndLabel = 1
Plugin Version: 11.3. Function: One of the constants for displayMode property.
Notes: The toolbar will display icons and labels.
5.7.32
NSToolbarDisplayModeIconOnly = 2
Plugin Version: 11.3. Function: One of the constants for displayMode property.
Notes: The toolbar will display only icons.
5.7.33
NSToolbarDisplayModeLabelOnly = 3
Plugin Version: 11.3. Function: One of the constants for displayMode property.
Notes: The toolbar will display only labels.
5.7. CLASS NSTOOLBARMBS
5.7.34
NSToolbarSizeModeDefault = 0
Plugin Version: 11.3. Function: One of the constants for the sizeMode property.
Notes: The toolbar uses the system-defined default size, which is NSToolbarSizeModeRegular.
5.7.35
NSToolbarSizeModeRegular = 1
Plugin Version: 11.3. Function: One of the constants for the sizeMode property.
Notes: The toolbar uses regular-sized controls and 32 by 32 pixel icons.
5.7.36
NSToolbarSizeModeSmall = 2
Plugin Version: 11.3. Function: One of the constants for the sizeMode property.
Notes: The toolbar uses small-sized controls and 24 by 24 pixel icons.
187
188
CHAPTER 5. COCOA
Chapter 6
Cocoa Controls
6.1
6.1.1
class ComboBox
class ComboBox
Plugin Version: 10.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The built in ComboBox class in REALbasic.
6.1.2
Methods
6.1.3
NSComboBoxMBS as NSComboBoxMBS
Plugin Version: 10.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Creates a NSComboBoxMBS object for the given control.
Notes: This way you can manipulate Cocoa controls directly.
189
190
6.2
6.2.1
CHAPTER 6. COCOA CONTROLS
class CustomNSScrollerMBS
class CustomNSScrollerMBS
Plugin Version: 12.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The class for a
custom scroller.
Notes: Subclass of the NSScrollerMBS class.
6.2.2
Methods
6.2.3
Constructor
Plugin Version: 12.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor for
a new custom NSScroller object.
See also:
• 6.2.4 Constructor(Handle as Integer)
190
• 6.2.5 Constructor(left as Double, top as Double, width as Double, height as Double)
190
6.2.4
Constructor(Handle as Integer)
Plugin Version: 13.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor.
See also:
• 6.2.3 Constructor
190
• 6.2.5 Constructor(left as Double, top as Double, width as Double, height as Double)
190
6.2.5
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 12.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor for
a new custom NSScroller object.
See also:
• 6.2.3 Constructor
190
• 6.2.4 Constructor(Handle as Integer)
190
6.2. CLASS CUSTOMNSSCROLLERMBS
6.2.6
191
Destructor
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The destructor.
6.2.7
Events
6.2.8
acceptsFirstMouse(e as NSEventMBS) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Overridden by
subclasses to return true if the receiver should be sent a mouseDown event for an initial mouse-down event,
false if not.
Notes:
The receiver can either return a value unconditionally or use the location of event e to determine whether
or not it wants the event. The default implementation ignores the event and returns false.
Implement this event in a subclass to allow instances to respond to click-through. This allows the user to
click on a view in an inactive window, activating the view with one click, instead of clicking first to make the
window active and then clicking the view. Most view objects refuse a click-through attempt, so the event
simply activates the window. Many control objects, however, such as instances of NSButton and NSSlider, do
accept them, so the user can immediately manipulate the control without having to release the mouse button.
6.2.9
acceptsFirstResponder as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether to accept
first responder.
Notes: Return true if your control can have the focus and false if not.
6.2.10
becomeFirstResponder as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when the
object gets focus.
Notes: Return true to accept.
6.2.11
beginGestureWithEvent(e as NSEventMBS) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a touch gesture.
Notes:
192
CHAPTER 6. COCOA CONTROLS
e: An event object representing the gesture beginning.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.2.12
canBecomeKeyView as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the receiver can become key view.
Notes: Returns true if the receiver can become key view, false otherwise.
6.2.13
Close
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the custom view is destroyed.
6.2.14
concludeDragOperation(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging operation is complete, signaling the receiver to perform any necessary clean-up.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
For this method to be invoked, the previous performDragOperation must have returned true.
The destination implements this method to perform any tidying up that it needs to do, such as updating its
visual representation now that it has incorporated the dragged data. This message is the last message sent
from sender to the destination during a dragging session.
If the sender object’s animatesToDestination property was set to true in prepareForDragOperation, then the
drag image is still visible. At this point you should draw the final visual representation in the view. When
this method returns, the drag image is removed form the screen. If your final visual representation matches
the visual representation in the drag, this is a seamless transition.
6.2. CLASS CUSTOMNSSCROLLERMBS
6.2.15
193
draggingEnded(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
event to be notified when a drag operation ends in some other destination.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
This method might be used by a destination doing auto-expansion in order to collapse any auto-expands.
6.2.16
draggingEntered(sender as NSDraggingInfoMBS) as Integer
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragged image enters destination bounds or frame; delegate returns dragging operation to perform.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is
the value returned by the previous draggingEntered message.
Invoked when a dragged image enters the destination but only if the destination has registered for the pasteboard data type involved in the drag operation. Specifically, this method is invoked when the mouse pointer
enters the destination’s bounds rectangle (if it is a view object) or its frame rectangle (if it is a window object).
This method must return a value that indicates which dragging operation the destination will perform when
the image is released. In deciding which dragging operation to return, the method should evaluate the
overlap between both the dragging operations allowed by the source (obtained from sender with the draggingSourceOperationMask method) and the dragging operations and pasteboard data types the destination
itself supports.
If none of the operations is appropriate, this method should return NSDragOperationNone (this is the default
response if the method is not implemented by the destination). A destination will still receive draggingUpdated and draggingExited even if NSDragOperationNone is returned by this method.
6.2.17
draggingExited(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragged image exits the destination’s bounds rectangle (in the case of a view object) or its frame rectangle
(in the case of a window object).
194
CHAPTER 6. COCOA CONTROLS
Notes: sender: The object sending the message; use it to get details about the dragging operation.
6.2.18
draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging session has completed.
Notes:
session: The dragging session.
screenPoint: The point where the drag ended, in screen coordinates.
operation: The drag operation. See constants for drag operation types.
Available in OS X v10.7 and later.
6.2.19
draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
drag moves on the screen.
Notes:
session: The dragging session.
screenPoint: The point where the drag moved to, in screen coordinates.
Available in OS X v10.7 and later.
6.2.20
draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Declares the types
of operations the source allows to be performed. (required)
Notes:
session: The dragging session.
context: The dragging context. See NSDraggingContext constants for the supported values.
Return the appropriate dragging operation as defined in constants.
In the future Apple may provide more specific ”within” values in the future. To account for this, for unrec-
6.2. CLASS CUSTOMNSSCROLLERMBS
195
ognized localities, return the operation mask for the most specific context that you are concerned with.
6.2.21
draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
drag will begin.
Notes:
session: The dragging session.
screenPoint: The point where the drag will begin, in screen coordinates.
Available in OS X v10.7 and later.
6.2.22
draggingSourceOperationMaskForLocal(flag as boolean) as Integer
Plugin Version: 13.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns an integer
bit mask indicating the types of dragging operations the source object will allow to be performed on the
dragged image’s data.
Notes:
(Deprecated in OS X v10.7. This method is informally deprecated. It is only called if the source does not
implement the NSDraggingSource protocol methods. This method will be formally deprecated in a future
OS release.)
isLocal: True indicates that the candidate destination object (the window or view over which the dragged
image is currently poised) is in the same application as the source, while a false value indicates that the
destination object is in a different application.
A mask, created by combining the dragging operations listed in the NSDragOperation section of NSDraggingInfo protocol reference using the C bitwise OR operator.If the source does not permit any dragging
operations, it should return NSDragOperationNone.
If not implemented, the default value is NSDragOperationCopy | NSDragOperationLink | NSDragOperationGeneric | NSDragOperationPrivate.
Available in OS X v10.0 and later. Deprecated in OS X v10.7.
196
6.2.23
CHAPTER 6. COCOA CONTROLS
draggingUpdated(sender as NSDraggingInfoMBS) as Integer
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked periodically
as the image is held within the destination area, allowing modification of the dragging operation or mousepointer position.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is
the value returned by the previous draggingEntered message.
For this to be invoked, the destination must have registered for the pasteboard data type involved in the
drag operation. The messages continue until the image is either released or dragged out of the window or view.
This method provides the destination with an opportunity to modify the dragging operation depending on
the position of the mouse pointer inside of the destination view or window object. For example, you may have
several graphics or areas of text contained within the same view and wish to tailor the dragging operation,
or to ignore the drag event completely, depending upon which object is underneath the mouse pointer at the
time when the user releases the dragged image and the performDragOperation method is invoked.
You typically examine the contents of the pasteboard in the draggingEntered method, where this examination is performed only once, rather than in the draggingUpdated method, which is invoked multiple times.
Only one destination at a time receives a sequence of draggingUpdated messages. If the mouse pointer is
within the bounds of two overlapping views that are both valid destinations, the uppermost view receives
these messages until the image is either released or dragged out.
6.2.24
drawArrow(g as NSGraphicsMBS, Arrow as Integer, highlight as boolean)
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when arrow
need to be drawn.
Notes:
Draw the scroll button indicated by arrow, which is either NSScrollerIncrementArrow (the down or right
scroll button) or NSScrollerDecrementArrow (up or left).
If flag is true, the button is drawn highlighted; otherwise it’s drawn normally. You should never need to
invoke this method directly, but may wish to override it to customize the appearance of scroll buttons.
6.2. CLASS CUSTOMNSSCROLLERMBS
6.2.25
197
drawKnob(g as NSGraphicsMBS)
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Draw the knob.
6.2.26
drawKnobSlotInRect(g as NSGraphicsMBS, slotRect as NSRectMBS,
highlight as boolean)
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Draw the knob slow
in the rectangle.
6.2.27
drawParts(g as NSGraphicsMBS)
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when parts
need to be drawn.
6.2.28
endGestureWithEvent(e as NSEventMBS) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has ended a touch gesture.
Notes:
e: An event object representing the gesture end.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.2.29
ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the modifier keys will be ignored for this dragging session.
Notes:
session: The dragging session.
Return true if the modifier keys will be ignored, false otherwise.
Available in OS X v10.7 and later.
198
6.2.30
CHAPTER 6. COCOA CONTROLS
isOpaque as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether this view
is opaque.
6.2.31
keyDown(e as NSEventMBS) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the key
events.
Notes: Return true if you handled this event.
6.2.32
keyUp(e as NSEventMBS) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the key
events.
Notes: Return true if you handled this event.
6.2.33
magnifyWithEvent(e as NSEventMBS) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a pinch gesture.
Notes:
e: An event object representing the magnify gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.2.34
menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as
NSMenuMBS
Plugin Version: 12.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Overridden by
subclasses to return a context-sensitive pop-up menu for a given mouse-down event.
Notes:
theEvent: An object representing a mouse-down event.
defaultMenu: The menu as constructed by super class.
The receiver can use information in the mouse event, such as its location over a particular element of the
receiver, to determine what kind of menu to return. For example, a text object might display a text-editing
6.2. CLASS CUSTOMNSSCROLLERMBS
199
menu when the cursor lies over text and a menu for changing graphics attributes when the cursor lies over
an embedded image.
The default implementation returns the default menu.
6.2.35
mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.2.36
mouseDownCanMoveWindow as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event is called
so you can decide what happens with mouse down.
Notes:
Return true if you do not need to handle a mouse down and it can pass through to superviews; False if you
need to handle the mouse down.
This allows iApp-type applications to determine the region by which a window can be moved. By default,
this method returns false if the view is opaque; otherwise, it returns true. Subclasses can override this
method to return a different value.
6.2.37
mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.2.38
mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
200
6.2.39
CHAPTER 6. COCOA CONTROLS
mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.2.40
mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.2.41
mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.2.42
Open
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the custom NSView is created.
6.2.43
otherMouseDown(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.2.44
otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
6.2. CLASS CUSTOMNSSCROLLERMBS
201
Notes:
Return true if you handled this event.
Third mouse button.
6.2.45
otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.2.46
performDragOperation(sender as NSDraggingInfoMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked after the
released image has been removed from the screen, signaling the receiver to import the pasteboard data.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return if the destination accepts the data, it returns true; otherwise it returns false. The default is to return
false.
For this method to be invoked, the previous prepareForDragOperation message must have returned true.
The destination should implement this method to do the real work of importing the pasteboard data represented by the image.
If the sender object’s animatesToDestination was set to true in prepareForDragOperation, then setup any
animation to arrange space for the drag items to animate to. Also at this time, enumerate through the
dragging items to set their destination frames and destination images.
6.2.47
prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
image is released, allowing the receiver to agree to or refuse drag operation.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Returns true if the receiver agrees to perform the drag operation and false if not.
This method is invoked only if the most recent draggingEntered or draggingUpdated message returned an
202
CHAPTER 6. COCOA CONTROLS
acceptable drag-operation value.
If you want the drag items to animate from their current location on screen to their final location in your
view, set the sender object’s animatesToDestination property to true in your implementation of this method.
6.2.48
pressureChange(e as NSEventMBS) as boolean
Plugin Version: 15.1, Console & Web: No, Mac: Yes, Win: Yes, Linux: Yes. Function: Informs the current
object that a pressure change occurred on a system that supports pressure sensitivity.
Notes:
This method is invoked automatically in response to user actions. event is the event that initiated the change
in pressure.
Available in OS X v10.10.3 and later.
6.2.49
resignFirstResponder as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Focus is going away.
Notes: Return true to accept.
6.2.50
rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.2.51
rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.2.52
rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.2. CLASS CUSTOMNSSCROLLERMBS
6.2.53
203
rotateWithEvent(e as NSEventMBS) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a rotation gesture.
Notes:
e: An event object representing the rotate gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.2.54
scrollWheel(e as NSEventMBS) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the subclass
that the mouse’s scroll wheel has moved.
Notes:
e: An object encapsulating information about the wheel-scrolling event.
The default implementation simply passes this message to the next responder.
Return true to not pass the event.
6.2.55
swipeWithEvent(e as NSEventMBS) as boolean
Plugin Version: 12.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a swipe gesture.
Notes:
e: An event object representing the swipe gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.2.56
updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging images should be changed.
Notes:
sender: The object sending the message; use this object to get details about the dragging operation.
While a destination may change the dragging images at any time, it is recommended to wait until this
204
CHAPTER 6. COCOA CONTROLS
method is called before updating the dragging images.
This allows the system to delay changing the dragging images until it is likely that the user will drop on
this destination. Otherwise, the dragging images will change too often during the drag which would be
distracting to the user.
6.2.57
viewDidMoveToWindow
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that it has been added to a new view hierarchy.
Notes:
The default implementation does nothing; subclasses can implement this event to perform whatever actions
are necessary.
window may return nil when this method is invoked, indicating that the receiver does not currently reside in
any window. This occurs when the receiver has just been removed from its superview or when the receiver
has just been added to a superview that does not itself have a window. Overrides of this method may choose
to ignore such cases if they are not of interest.
6.2.58
wantsPeriodicDraggingUpdates as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Asks the destination
object whether it wants to receive periodic draggingUpdated messages.
Notes:
Return true if the destination wants to receive periodic draggingUpdated messages, false otherwise.
If the destination returns false, these messages are sent only when the mouse moves or a modifier flag changes.
Otherwise the destination gets the default behavior, where it receives periodic dragging-updated messages
even if nothing changes.
6.3. CLASS CUSTOMNSSEARCHFIELDMBS
6.3
6.3.1
205
class CustomNSSearchFieldMBS
class CustomNSSearchFieldMBS
Plugin Version: 12.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The class for a
custom searchfield.
Notes:
Some events will not fire as Searchfield eats them itself.
Subclass of the NSSearchFieldMBS class.
6.3.2
Methods
6.3.3
Constructor
Plugin Version: 12.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The dummy
constructor doing nothing.
See also:
• 6.3.4 Constructor(Handle as Integer)
205
• 6.3.5 Constructor(left as Double, top as Double, width as Double, height as Double)
205
6.3.4
Constructor(Handle as Integer)
Plugin Version: 13.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor.
See also:
• 6.3.3 Constructor
205
• 6.3.5 Constructor(left as Double, top as Double, width as Double, height as Double)
205
6.3.5
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 12.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor for
a new custom NSView object.
See also:
• 6.3.3 Constructor
205
• 6.3.4 Constructor(Handle as Integer)
205
206
6.3.6
CHAPTER 6. COCOA CONTROLS
Destructor
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The destructor.
6.3.7
Events
6.3.8
acceptsFirstMouse(e as NSEventMBS) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Overridden by
subclasses to return true if the receiver should be sent a mouseDown event for an initial mouse-down event,
false if not.
Notes:
The receiver can either return a value unconditionally or use the location of event e to determine whether
or not it wants the event. The default implementation ignores the event and returns false.
Implement this event in a subclass to allow instances to respond to click-through. This allows the user to
click on a view in an inactive window, activating the view with one click, instead of clicking first to make the
window active and then clicking the view. Most view objects refuse a click-through attempt, so the event
simply activates the window. Many control objects, however, such as instances of NSButton and NSSlider, do
accept them, so the user can immediately manipulate the control without having to release the mouse button.
6.3.9
acceptsFirstResponder as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether to accept
first responder.
Notes: Return true if your control can have the focus and false if not.
6.3.10
becomeFirstResponder as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when the
object gets focus.
Notes: Return true to accept.
6.3.11
beginGestureWithEvent(e as NSEventMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a touch gesture.
Notes:
6.3. CLASS CUSTOMNSSEARCHFIELDMBS
207
e: An event object representing the gesture beginning.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.3.12
canBecomeKeyView as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the receiver can become key view.
Notes: Returns true if the receiver can become key view, false otherwise.
6.3.13
Close
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the custom view is destroyed.
6.3.14
concludeDragOperation(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging operation is complete, signaling the receiver to perform any necessary clean-up.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
For this method to be invoked, the previous performDragOperation must have returned true.
The destination implements this method to perform any tidying up that it needs to do, such as updating its
visual representation now that it has incorporated the dragged data. This message is the last message sent
from sender to the destination during a dragging session.
If the sender object’s animatesToDestination property was set to true in prepareForDragOperation, then the
drag image is still visible. At this point you should draw the final visual representation in the view. When
this method returns, the drag image is removed form the screen. If your final visual representation matches
the visual representation in the drag, this is a seamless transition.
208
6.3.15
CHAPTER 6. COCOA CONTROLS
draggingEnded(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
event to be notified when a drag operation ends in some other destination.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
This method might be used by a destination doing auto-expansion in order to collapse any auto-expands.
6.3.16
draggingEntered(sender as NSDraggingInfoMBS) as Integer
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragged image enters destination bounds or frame; delegate returns dragging operation to perform.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is
the value returned by the previous draggingEntered message.
Invoked when a dragged image enters the destination but only if the destination has registered for the pasteboard data type involved in the drag operation. Specifically, this method is invoked when the mouse pointer
enters the destination’s bounds rectangle (if it is a view object) or its frame rectangle (if it is a window object).
This method must return a value that indicates which dragging operation the destination will perform when
the image is released. In deciding which dragging operation to return, the method should evaluate the
overlap between both the dragging operations allowed by the source (obtained from sender with the draggingSourceOperationMask method) and the dragging operations and pasteboard data types the destination
itself supports.
If none of the operations is appropriate, this method should return NSDragOperationNone (this is the default
response if the method is not implemented by the destination). A destination will still receive draggingUpdated and draggingExited even if NSDragOperationNone is returned by this method.
6.3.17
draggingExited(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragged image exits the destination’s bounds rectangle (in the case of a view object) or its frame rectangle
(in the case of a window object).
6.3. CLASS CUSTOMNSSEARCHFIELDMBS
209
Notes: sender: The object sending the message; use it to get details about the dragging operation.
6.3.18
draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging session has completed.
Notes:
session: The dragging session.
screenPoint: The point where the drag ended, in screen coordinates.
operation: The drag operation. See constants for drag operation types.
Available in OS X v10.7 and later.
6.3.19
draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
drag moves on the screen.
Notes:
session: The dragging session.
screenPoint: The point where the drag moved to, in screen coordinates.
Available in OS X v10.7 and later.
6.3.20
draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Declares the types
of operations the source allows to be performed. (required)
Notes:
session: The dragging session.
context: The dragging context. See NSDraggingContext constants for the supported values.
Return the appropriate dragging operation as defined in constants.
In the future Apple may provide more specific ”within” values in the future. To account for this, for unrec-
210
CHAPTER 6. COCOA CONTROLS
ognized localities, return the operation mask for the most specific context that you are concerned with.
6.3.21
draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
drag will begin.
Notes:
session: The dragging session.
screenPoint: The point where the drag will begin, in screen coordinates.
Available in OS X v10.7 and later.
6.3.22
draggingSourceOperationMaskForLocal(flag as boolean) as Integer
Plugin Version: 13.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns an integer
bit mask indicating the types of dragging operations the source object will allow to be performed on the
dragged image’s data.
Notes:
(Deprecated in OS X v10.7. This method is informally deprecated. It is only called if the source does not
implement the NSDraggingSource protocol methods. This method will be formally deprecated in a future
OS release.)
isLocal: True indicates that the candidate destination object (the window or view over which the dragged
image is currently poised) is in the same application as the source, while a false value indicates that the
destination object is in a different application.
A mask, created by combining the dragging operations listed in the NSDragOperation section of NSDraggingInfo protocol reference using the C bitwise OR operator.If the source does not permit any dragging
operations, it should return NSDragOperationNone.
If not implemented, the default value is NSDragOperationCopy | NSDragOperationLink | NSDragOperationGeneric | NSDragOperationPrivate.
Available in OS X v10.0 and later. Deprecated in OS X v10.7.
6.3. CLASS CUSTOMNSSEARCHFIELDMBS
6.3.23
211
draggingUpdated(sender as NSDraggingInfoMBS) as Integer
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked periodically
as the image is held within the destination area, allowing modification of the dragging operation or mousepointer position.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is
the value returned by the previous draggingEntered message.
For this to be invoked, the destination must have registered for the pasteboard data type involved in the
drag operation. The messages continue until the image is either released or dragged out of the window or view.
This method provides the destination with an opportunity to modify the dragging operation depending on
the position of the mouse pointer inside of the destination view or window object. For example, you may have
several graphics or areas of text contained within the same view and wish to tailor the dragging operation,
or to ignore the drag event completely, depending upon which object is underneath the mouse pointer at the
time when the user releases the dragged image and the performDragOperation method is invoked.
You typically examine the contents of the pasteboard in the draggingEntered method, where this examination is performed only once, rather than in the draggingUpdated method, which is invoked multiple times.
Only one destination at a time receives a sequence of draggingUpdated messages. If the mouse pointer is
within the bounds of two overlapping views that are both valid destinations, the uppermost view receives
these messages until the image is either released or dragged out.
6.3.24
endGestureWithEvent(e as NSEventMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has ended a touch gesture.
Notes:
e: An event object representing the gesture end.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
212
6.3.25
CHAPTER 6. COCOA CONTROLS
ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the modifier keys will be ignored for this dragging session.
Notes:
session: The dragging session.
Return true if the modifier keys will be ignored, false otherwise.
Available in OS X v10.7 and later.
6.3.26
isOpaque as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether this view
is opaque.
6.3.27
keyDown(e as NSEventMBS) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the key
events.
Notes:
Return true if you handled this event.
Please return true in becomeFirstResponder and acceptsFirstResponder, so your nsview can become first
responder and receive key events.
6.3.28
keyUp(e as NSEventMBS) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the key
events.
Notes:
Return true if you handled this event.
Please return true in becomeFirstResponder and acceptsFirstResponder, so your nsview can become first
responder and receive key events.
6.3. CLASS CUSTOMNSSEARCHFIELDMBS
6.3.29
213
magnifyWithEvent(e as NSEventMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a pinch gesture.
Notes:
e: An event object representing the magnify gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.3.30
menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as
NSMenuMBS
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Overridden by
subclasses to return a context-sensitive pop-up menu for a given mouse-down event.
Notes:
theEvent: An object representing a mouse-down event.
defaultMenu: The menu as constructed by super class.
The receiver can use information in the mouse event, such as its location over a particular element of the
receiver, to determine what kind of menu to return. For example, a text object might display a text-editing
menu when the cursor lies over text and a menu for changing graphics attributes when the cursor lies over
an embedded image.
The default implementation returns the default menu.
6.3.31
mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.3.32
mouseDownCanMoveWindow as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event is called
so you can decide what happens with mouse down.
Notes:
Return true if you do not need to handle a mouse down and it can pass through to superviews; False if you
214
CHAPTER 6. COCOA CONTROLS
need to handle the mouse down.
This allows iApp-type applications to determine the region by which a window can be moved. By default,
this method returns false if the view is opaque; otherwise, it returns true. Subclasses can override this
method to return a different value.
6.3.33
mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.3.34
mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.3.35
mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.3.36
mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.3.37
mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.3. CLASS CUSTOMNSSEARCHFIELDMBS
6.3.38
215
Open
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the custom NSSearchField is created.
6.3.39
otherMouseDown(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.3.40
otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.3.41
otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.3.42
performDragOperation(sender as NSDraggingInfoMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked after the
released image has been removed from the screen, signaling the receiver to import the pasteboard data.
Notes:
216
CHAPTER 6. COCOA CONTROLS
sender: The object sending the message; use it to get details about the dragging operation.
Return if the destination accepts the data, it returns true; otherwise it returns false. The default is to return
false.
For this method to be invoked, the previous prepareForDragOperation message must have returned true.
The destination should implement this method to do the real work of importing the pasteboard data represented by the image.
If the sender object’s animatesToDestination was set to true in prepareForDragOperation, then setup any
animation to arrange space for the drag items to animate to. Also at this time, enumerate through the
dragging items to set their destination frames and destination images.
6.3.43
prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
image is released, allowing the receiver to agree to or refuse drag operation.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Returns true if the receiver agrees to perform the drag operation and false if not.
This method is invoked only if the most recent draggingEntered or draggingUpdated message returned an
acceptable drag-operation value.
If you want the drag items to animate from their current location on screen to their final location in your
view, set the sender object’s animatesToDestination property to true in your implementation of this method.
6.3.44
pressureChange(e as NSEventMBS) as boolean
Plugin Version: 15.1, Console & Web: No, Mac: Yes, Win: Yes, Linux: Yes. Function: Informs the current
object that a pressure change occurred on a system that supports pressure sensitivity.
Notes:
This method is invoked automatically in response to user actions. event is the event that initiated the change
in pressure.
Available in OS X v10.10.3 and later.
6.3.45
resignFirstResponder as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Focus is going away.
Notes: Return true to accept.
6.3. CLASS CUSTOMNSSEARCHFIELDMBS
6.3.46
217
rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.3.47
rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.3.48
rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.3.49
rotateWithEvent(e as NSEventMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a rotation gesture.
Notes:
e: An event object representing the rotate gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.3.50
scrollWheel(e as NSEventMBS) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the subclass
that the mouse’s scroll wheel has moved.
Notes:
e: An object encapsulating information about the wheel-scrolling event.
The default implementation simply passes this message to the next responder.
Return true to not pass the event.
218
6.3.51
CHAPTER 6. COCOA CONTROLS
swipeWithEvent(e as NSEventMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a swipe gesture.
Notes:
e: An event object representing the swipe gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.3.52
updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging images should be changed.
Notes:
sender: The object sending the message; use this object to get details about the dragging operation.
While a destination may change the dragging images at any time, it is recommended to wait until this
method is called before updating the dragging images.
This allows the system to delay changing the dragging images until it is likely that the user will drop on
this destination. Otherwise, the dragging images will change too often during the drag which would be
distracting to the user.
6.3.53
viewDidMoveToWindow
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that it has been added to a new view hierarchy.
Notes:
The default implementation does nothing; subclasses can implement this event to perform whatever actions
are necessary.
window may return nil when this method is invoked, indicating that the receiver does not currently reside in
any window. This occurs when the receiver has just been removed from its superview or when the receiver
has just been added to a superview that does not itself have a window. Overrides of this method may choose
to ignore such cases if they are not of interest.
6.3. CLASS CUSTOMNSSEARCHFIELDMBS
6.3.54
219
wantsPeriodicDraggingUpdates as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Asks the destination
object whether it wants to receive periodic draggingUpdated messages.
Notes:
Return true if the destination wants to receive periodic draggingUpdated messages, false otherwise.
If the destination returns false, these messages are sent only when the mouse moves or a modifier flag changes.
Otherwise the destination gets the default behavior, where it receives periodic dragging-updated messages
even if nothing changes.
220
6.4
6.4.1
CHAPTER 6. COCOA CONTROLS
class CustomNSTextFieldMBS
class CustomNSTextFieldMBS
Plugin Version: 12.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The class for a
custom text field.
Notes:
Some events will not fire as text field eats them itself.
Subclass of the NSTextFieldMBS class.
6.4.2
Methods
6.4.3
Constructor
Plugin Version: 12.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The dummy
constructor doing nothing.
See also:
• 6.4.4 Constructor(Handle as Integer)
220
• 6.4.5 Constructor(left as Double, top as Double, width as Double, height as Double)
220
6.4.4
Constructor(Handle as Integer)
Plugin Version: 13.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor.
See also:
• 6.4.3 Constructor
220
• 6.4.5 Constructor(left as Double, top as Double, width as Double, height as Double)
220
6.4.5
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 12.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor for
a new custom NSView object.
See also:
• 6.4.3 Constructor
220
• 6.4.4 Constructor(Handle as Integer)
220
6.4. CLASS CUSTOMNSTEXTFIELDMBS
6.4.6
221
Destructor
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The destructor.
6.4.7
Events
6.4.8
acceptsFirstMouse(e as NSEventMBS) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Overridden by
subclasses to return true if the receiver should be sent a mouseDown event for an initial mouse-down event,
false if not.
Notes:
The receiver can either return a value unconditionally or use the location of event e to determine whether
or not it wants the event. The default implementation ignores the event and returns false.
Implement this event in a subclass to allow instances to respond to click-through. This allows the user to
click on a view in an inactive window, activating the view with one click, instead of clicking first to make the
window active and then clicking the view. Most view objects refuse a click-through attempt, so the event
simply activates the window. Many control objects, however, such as instances of NSButton and NSSlider, do
accept them, so the user can immediately manipulate the control without having to release the mouse button.
6.4.9
acceptsFirstResponder as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether to accept
first responder.
Notes: Return true if your control can have the focus and false if not.
6.4.10
becomeFirstResponder as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when the
object gets focus.
Notes: Return true to accept.
6.4.11
beginGestureWithEvent(e as NSEventMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a touch gesture.
Notes:
222
CHAPTER 6. COCOA CONTROLS
e: An event object representing the gesture beginning.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.4.12
canBecomeKeyView as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the receiver can become key view.
Notes: Returns true if the receiver can become key view, false otherwise.
6.4.13
Close
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the custom view is destroyed.
6.4.14
concludeDragOperation(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging operation is complete, signaling the receiver to perform any necessary clean-up.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
For this method to be invoked, the previous performDragOperation must have returned true.
The destination implements this method to perform any tidying up that it needs to do, such as updating its
visual representation now that it has incorporated the dragged data. This message is the last message sent
from sender to the destination during a dragging session.
If the sender object’s animatesToDestination property was set to true in prepareForDragOperation, then the
drag image is still visible. At this point you should draw the final visual representation in the view. When
this method returns, the drag image is removed form the screen. If your final visual representation matches
the visual representation in the drag, this is a seamless transition.
6.4. CLASS CUSTOMNSTEXTFIELDMBS
6.4.15
223
draggingEnded(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
event to be notified when a drag operation ends in some other destination.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
This method might be used by a destination doing auto-expansion in order to collapse any auto-expands.
6.4.16
draggingEntered(sender as NSDraggingInfoMBS) as Integer
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragged image enters destination bounds or frame; delegate returns dragging operation to perform.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is
the value returned by the previous draggingEntered message.
Invoked when a dragged image enters the destination but only if the destination has registered for the pasteboard data type involved in the drag operation. Specifically, this method is invoked when the mouse pointer
enters the destination’s bounds rectangle (if it is a view object) or its frame rectangle (if it is a window object).
This method must return a value that indicates which dragging operation the destination will perform when
the image is released. In deciding which dragging operation to return, the method should evaluate the
overlap between both the dragging operations allowed by the source (obtained from sender with the draggingSourceOperationMask method) and the dragging operations and pasteboard data types the destination
itself supports.
If none of the operations is appropriate, this method should return NSDragOperationNone (this is the default
response if the method is not implemented by the destination). A destination will still receive draggingUpdated and draggingExited even if NSDragOperationNone is returned by this method.
6.4.17
draggingExited(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragged image exits the destination’s bounds rectangle (in the case of a view object) or its frame rectangle
(in the case of a window object).
224
CHAPTER 6. COCOA CONTROLS
Notes: sender: The object sending the message; use it to get details about the dragging operation.
6.4.18
draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging session has completed.
Notes:
session: The dragging session.
screenPoint: The point where the drag ended, in screen coordinates.
operation: The drag operation. See constants for drag operation types.
Available in OS X v10.7 and later.
6.4.19
draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
drag moves on the screen.
Notes:
session: The dragging session.
screenPoint: The point where the drag moved to, in screen coordinates.
Available in OS X v10.7 and later.
6.4.20
draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Declares the types
of operations the source allows to be performed. (required)
Notes:
session: The dragging session.
context: The dragging context. See NSDraggingContext constants for the supported values.
Return the appropriate dragging operation as defined in constants.
In the future Apple may provide more specific ”within” values in the future. To account for this, for unrec-
6.4. CLASS CUSTOMNSTEXTFIELDMBS
225
ognized localities, return the operation mask for the most specific context that you are concerned with.
6.4.21
draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
drag will begin.
Notes:
session: The dragging session.
screenPoint: The point where the drag will begin, in screen coordinates.
Available in OS X v10.7 and later.
6.4.22
draggingSourceOperationMaskForLocal(flag as boolean) as Integer
Plugin Version: 13.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns an integer
bit mask indicating the types of dragging operations the source object will allow to be performed on the
dragged image’s data.
Notes:
(Deprecated in OS X v10.7. This method is informally deprecated. It is only called if the source does not
implement the NSDraggingSource protocol methods. This method will be formally deprecated in a future
OS release.)
isLocal: True indicates that the candidate destination object (the window or view over which the dragged
image is currently poised) is in the same application as the source, while a false value indicates that the
destination object is in a different application.
A mask, created by combining the dragging operations listed in the NSDragOperation section of NSDraggingInfo protocol reference using the C bitwise OR operator.If the source does not permit any dragging
operations, it should return NSDragOperationNone.
If not implemented, the default value is NSDragOperationCopy | NSDragOperationLink | NSDragOperationGeneric | NSDragOperationPrivate.
Available in OS X v10.0 and later. Deprecated in OS X v10.7.
226
6.4.23
CHAPTER 6. COCOA CONTROLS
draggingUpdated(sender as NSDraggingInfoMBS) as Integer
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked periodically
as the image is held within the destination area, allowing modification of the dragging operation or mousepointer position.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is
the value returned by the previous draggingEntered message.
For this to be invoked, the destination must have registered for the pasteboard data type involved in the
drag operation. The messages continue until the image is either released or dragged out of the window or view.
This method provides the destination with an opportunity to modify the dragging operation depending on
the position of the mouse pointer inside of the destination view or window object. For example, you may have
several graphics or areas of text contained within the same view and wish to tailor the dragging operation,
or to ignore the drag event completely, depending upon which object is underneath the mouse pointer at the
time when the user releases the dragged image and the performDragOperation method is invoked.
You typically examine the contents of the pasteboard in the draggingEntered method, where this examination is performed only once, rather than in the draggingUpdated method, which is invoked multiple times.
Only one destination at a time receives a sequence of draggingUpdated messages. If the mouse pointer is
within the bounds of two overlapping views that are both valid destinations, the uppermost view receives
these messages until the image is either released or dragged out.
6.4.24
endGestureWithEvent(e as NSEventMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has ended a touch gesture.
Notes:
e: An event object representing the gesture end.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.4. CLASS CUSTOMNSTEXTFIELDMBS
6.4.25
227
ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the modifier keys will be ignored for this dragging session.
Notes:
session: The dragging session.
Return true if the modifier keys will be ignored, false otherwise.
Available in OS X v10.7 and later.
6.4.26
isOpaque as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether this view
is opaque.
6.4.27
keyDown(e as NSEventMBS) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the key
events.
Notes:
Return true if you handled this event.
Please return true in becomeFirstResponder and acceptsFirstResponder, so your nsview can become first
responder and receive key events.
6.4.28
keyUp(e as NSEventMBS) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the key
events.
Notes:
Return true if you handled this event.
Please return true in becomeFirstResponder and acceptsFirstResponder, so your nsview can become first
responder and receive key events.
228
6.4.29
CHAPTER 6. COCOA CONTROLS
magnifyWithEvent(e as NSEventMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a pinch gesture.
Notes:
e: An event object representing the magnify gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.4.30
menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as
NSMenuMBS
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Overridden by
subclasses to return a context-sensitive pop-up menu for a given mouse-down event.
Notes:
theEvent: An object representing a mouse-down event.
defaultMenu: The menu as constructed by super class.
The receiver can use information in the mouse event, such as its location over a particular element of the
receiver, to determine what kind of menu to return. For example, a text object might display a text-editing
menu when the cursor lies over text and a menu for changing graphics attributes when the cursor lies over
an embedded image.
The default implementation returns the default menu.
6.4.31
mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.4.32
mouseDownCanMoveWindow as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event is called
so you can decide what happens with mouse down.
Notes:
Return true if you do not need to handle a mouse down and it can pass through to superviews; False if you
6.4. CLASS CUSTOMNSTEXTFIELDMBS
229
need to handle the mouse down.
This allows iApp-type applications to determine the region by which a window can be moved. By default,
this method returns false if the view is opaque; otherwise, it returns true. Subclasses can override this
method to return a different value.
6.4.33
mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.4.34
mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.4.35
mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.4.36
mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.4.37
mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
230
6.4.38
CHAPTER 6. COCOA CONTROLS
Open
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the custom NSSearchField is created.
6.4.39
otherMouseDown(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.4.40
otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.4.41
otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.4.42
performDragOperation(sender as NSDraggingInfoMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked after the
released image has been removed from the screen, signaling the receiver to import the pasteboard data.
Notes:
6.4. CLASS CUSTOMNSTEXTFIELDMBS
231
sender: The object sending the message; use it to get details about the dragging operation.
Return if the destination accepts the data, it returns true; otherwise it returns false. The default is to return
false.
For this method to be invoked, the previous prepareForDragOperation message must have returned true.
The destination should implement this method to do the real work of importing the pasteboard data represented by the image.
If the sender object’s animatesToDestination was set to true in prepareForDragOperation, then setup any
animation to arrange space for the drag items to animate to. Also at this time, enumerate through the
dragging items to set their destination frames and destination images.
6.4.43
prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
image is released, allowing the receiver to agree to or refuse drag operation.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Returns true if the receiver agrees to perform the drag operation and false if not.
This method is invoked only if the most recent draggingEntered or draggingUpdated message returned an
acceptable drag-operation value.
If you want the drag items to animate from their current location on screen to their final location in your
view, set the sender object’s animatesToDestination property to true in your implementation of this method.
6.4.44
pressureChange(e as NSEventMBS) as boolean
Plugin Version: 15.1, Console & Web: No, Mac: Yes, Win: Yes, Linux: Yes. Function: Informs the current
object that a pressure change occurred on a system that supports pressure sensitivity.
Notes:
This method is invoked automatically in response to user actions. event is the event that initiated the change
in pressure.
Available in OS X v10.10.3 and later.
6.4.45
resignFirstResponder as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Focus is going away.
Notes: Return true to accept.
232
6.4.46
CHAPTER 6. COCOA CONTROLS
rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.4.47
rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.4.48
rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.4.49
rotateWithEvent(e as NSEventMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a rotation gesture.
Notes:
e: An event object representing the rotate gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.4.50
scrollWheel(e as NSEventMBS) as boolean
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the subclass
that the mouse’s scroll wheel has moved.
Notes:
e: An object encapsulating information about the wheel-scrolling event.
The default implementation simply passes this message to the next responder.
Return true to not pass the event.
6.4. CLASS CUSTOMNSTEXTFIELDMBS
6.4.51
233
swipeWithEvent(e as NSEventMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a swipe gesture.
Notes:
e: An event object representing the swipe gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.4.52
updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging images should be changed.
Notes:
sender: The object sending the message; use this object to get details about the dragging operation.
While a destination may change the dragging images at any time, it is recommended to wait until this
method is called before updating the dragging images.
This allows the system to delay changing the dragging images until it is likely that the user will drop on
this destination. Otherwise, the dragging images will change too often during the drag which would be
distracting to the user.
6.4.53
viewDidMoveToWindow
Plugin Version: 12.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that it has been added to a new view hierarchy.
Notes:
The default implementation does nothing; subclasses can implement this event to perform whatever actions
are necessary.
window may return nil when this method is invoked, indicating that the receiver does not currently reside in
any window. This occurs when the receiver has just been removed from its superview or when the receiver
has just been added to a superview that does not itself have a window. Overrides of this method may choose
to ignore such cases if they are not of interest.
234
6.4.54
CHAPTER 6. COCOA CONTROLS
wantsPeriodicDraggingUpdates as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Asks the destination
object whether it wants to receive periodic draggingUpdated messages.
Notes:
Return true if the destination wants to receive periodic draggingUpdated messages, false otherwise.
If the destination returns false, these messages are sent only when the mouse moves or a modifier flag changes.
Otherwise the destination gets the default behavior, where it receives periodic dragging-updated messages
even if nothing changes.
6.5. CLASS CUSTOMNSTEXTVIEWMBS
6.5
6.5.1
235
class CustomNSTextViewMBS
class CustomNSTextViewMBS
Plugin Version: 17.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The class for a
custom text view.
Notes:
Some events will not fire as text view eats them itself.
Subclass of the NSTextViewMBS class.
6.5.2
Methods
6.5.3
Constructor
Plugin Version: 17.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The dummy
constructor doing nothing.
See also:
• 6.5.4 Constructor(Handle as Integer)
235
• 6.5.5 Constructor(left as Double, top as Double, width as Double, height as Double)
235
6.5.4
Constructor(Handle as Integer)
Plugin Version: 17.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor.
See also:
• 6.5.3 Constructor
235
• 6.5.5 Constructor(left as Double, top as Double, width as Double, height as Double)
235
6.5.5
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 17.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor for
a new custom NSView object.
See also:
• 6.5.3 Constructor
235
• 6.5.4 Constructor(Handle as Integer)
235
236
6.5.6
CHAPTER 6. COCOA CONTROLS
Destructor
Plugin Version: 17.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The destructor.
6.5.7
Events
6.5.8
acceptsFirstMouse(e as NSEventMBS) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Overridden by
subclasses to return true if the receiver should be sent a mouseDown event for an initial mouse-down event,
false if not.
Notes:
The receiver can either return a value unconditionally or use the location of event e to determine whether
or not it wants the event. The default implementation ignores the event and returns false.
Implement this event in a subclass to allow instances to respond to click-through. This allows the user to
click on a view in an inactive window, activating the view with one click, instead of clicking first to make the
window active and then clicking the view. Most view objects refuse a click-through attempt, so the event
simply activates the window. Many control objects, however, such as instances of NSButton and NSSlider, do
accept them, so the user can immediately manipulate the control without having to release the mouse button.
6.5.9
acceptsFirstResponder as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether to accept
first responder.
Notes: Return true if your control can have the focus and false if not.
6.5.10
becomeFirstResponder as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when the
object gets focus.
Notes: Return true to accept.
6.5.11
beginGestureWithEvent(e as NSEventMBS) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a touch gesture.
Notes:
6.5. CLASS CUSTOMNSTEXTVIEWMBS
237
e: An event object representing the gesture beginning.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.5.12
canBecomeKeyView as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the receiver can become key view.
Notes: Returns true if the receiver can become key view, false otherwise.
6.5.13
Close
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the custom view is destroyed.
6.5.14
concludeDragOperation(sender as NSDraggingInfoMBS)
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging operation is complete, signaling the receiver to perform any necessary clean-up.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
For this method to be invoked, the previous performDragOperation must have returned true.
The destination implements this method to perform any tidying up that it needs to do, such as updating its
visual representation now that it has incorporated the dragged data. This message is the last message sent
from sender to the destination during a dragging session.
If the sender object’s animatesToDestination property was set to true in prepareForDragOperation, then the
drag image is still visible. At this point you should draw the final visual representation in the view. When
this method returns, the drag image is removed form the screen. If your final visual representation matches
the visual representation in the drag, this is a seamless transition.
238
6.5.15
CHAPTER 6. COCOA CONTROLS
draggingEnded(sender as NSDraggingInfoMBS)
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
event to be notified when a drag operation ends in some other destination.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
This method might be used by a destination doing auto-expansion in order to collapse any auto-expands.
6.5.16
draggingEntered(sender as NSDraggingInfoMBS) as Integer
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragged image enters destination bounds or frame; delegate returns dragging operation to perform.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is
the value returned by the previous draggingEntered message.
Invoked when a dragged image enters the destination but only if the destination has registered for the pasteboard data type involved in the drag operation. Specifically, this method is invoked when the mouse pointer
enters the destination’s bounds rectangle (if it is a view object) or its frame rectangle (if it is a window object).
This method must return a value that indicates which dragging operation the destination will perform when
the image is released. In deciding which dragging operation to return, the method should evaluate the
overlap between both the dragging operations allowed by the source (obtained from sender with the draggingSourceOperationMask method) and the dragging operations and pasteboard data types the destination
itself supports.
If none of the operations is appropriate, this method should return NSDragOperationNone (this is the default
response if the method is not implemented by the destination). A destination will still receive draggingUpdated and draggingExited even if NSDragOperationNone is returned by this method.
6.5.17
draggingExited(sender as NSDraggingInfoMBS)
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragged image exits the destination’s bounds rectangle (in the case of a view object) or its frame rectangle
(in the case of a window object).
6.5. CLASS CUSTOMNSTEXTVIEWMBS
239
Notes: sender: The object sending the message; use it to get details about the dragging operation.
6.5.18
draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging session has completed.
Notes:
session: The dragging session.
screenPoint: The point where the drag ended, in screen coordinates.
operation: The drag operation. See constants for drag operation types.
Available in OS X v10.7 and later.
6.5.19
draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
drag moves on the screen.
Notes:
session: The dragging session.
screenPoint: The point where the drag moved to, in screen coordinates.
Available in OS X v10.7 and later.
6.5.20
draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Declares the types
of operations the source allows to be performed. (required)
Notes:
session: The dragging session.
context: The dragging context. See NSDraggingContext constants for the supported values.
Return the appropriate dragging operation as defined in constants.
In the future Apple may provide more specific ”within” values in the future. To account for this, for unrec-
240
CHAPTER 6. COCOA CONTROLS
ognized localities, return the operation mask for the most specific context that you are concerned with.
6.5.21
draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
drag will begin.
Notes:
session: The dragging session.
screenPoint: The point where the drag will begin, in screen coordinates.
Available in OS X v10.7 and later.
6.5.22
draggingSourceOperationMaskForLocal(flag as boolean) as Integer
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns an integer
bit mask indicating the types of dragging operations the source object will allow to be performed on the
dragged image’s data.
Notes:
(Deprecated in OS X v10.7. This method is informally deprecated. It is only called if the source does not
implement the NSDraggingSource protocol methods. This method will be formally deprecated in a future
OS release.)
isLocal: True indicates that the candidate destination object (the window or view over which the dragged
image is currently poised) is in the same application as the source, while a false value indicates that the
destination object is in a different application.
A mask, created by combining the dragging operations listed in the NSDragOperation section of NSDraggingInfo protocol reference using the C bitwise OR operator.If the source does not permit any dragging
operations, it should return NSDragOperationNone.
If not implemented, the default value is NSDragOperationCopy | NSDragOperationLink | NSDragOperationGeneric | NSDragOperationPrivate.
Available in OS X v10.0 and later. Deprecated in OS X v10.7.
6.5. CLASS CUSTOMNSTEXTVIEWMBS
6.5.23
241
draggingUpdated(sender as NSDraggingInfoMBS) as Integer
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked periodically
as the image is held within the destination area, allowing modification of the dragging operation or mousepointer position.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is
the value returned by the previous draggingEntered message.
For this to be invoked, the destination must have registered for the pasteboard data type involved in the
drag operation. The messages continue until the image is either released or dragged out of the window or view.
This method provides the destination with an opportunity to modify the dragging operation depending on
the position of the mouse pointer inside of the destination view or window object. For example, you may have
several graphics or areas of text contained within the same view and wish to tailor the dragging operation,
or to ignore the drag event completely, depending upon which object is underneath the mouse pointer at the
time when the user releases the dragged image and the performDragOperation method is invoked.
You typically examine the contents of the pasteboard in the draggingEntered method, where this examination is performed only once, rather than in the draggingUpdated method, which is invoked multiple times.
Only one destination at a time receives a sequence of draggingUpdated messages. If the mouse pointer is
within the bounds of two overlapping views that are both valid destinations, the uppermost view receives
these messages until the image is either released or dragged out.
6.5.24
endGestureWithEvent(e as NSEventMBS) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has ended a touch gesture.
Notes:
e: An event object representing the gesture end.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
242
6.5.25
CHAPTER 6. COCOA CONTROLS
ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the modifier keys will be ignored for this dragging session.
Notes:
session: The dragging session.
Return true if the modifier keys will be ignored, false otherwise.
Available in OS X v10.7 and later.
6.5.26
isOpaque as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether this view
is opaque.
6.5.27
keyDown(e as NSEventMBS) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the key
events.
Notes:
Return true if you handled this event.
Please return true in becomeFirstResponder and acceptsFirstResponder, so your nsview can become first
responder and receive key events.
6.5.28
keyUp(e as NSEventMBS) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the key
events.
Notes:
Return true if you handled this event.
Please return true in becomeFirstResponder and acceptsFirstResponder, so your nsview can become first
responder and receive key events.
6.5. CLASS CUSTOMNSTEXTVIEWMBS
6.5.29
243
magnifyWithEvent(e as NSEventMBS) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a pinch gesture.
Notes:
e: An event object representing the magnify gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.5.30
menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as
NSMenuMBS
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Overridden by
subclasses to return a context-sensitive pop-up menu for a given mouse-down event.
Notes:
theEvent: An object representing a mouse-down event.
defaultMenu: The menu as constructed by super class.
The receiver can use information in the mouse event, such as its location over a particular element of the
receiver, to determine what kind of menu to return. For example, a text object might display a text-editing
menu when the cursor lies over text and a menu for changing graphics attributes when the cursor lies over
an embedded image.
The default implementation returns the default menu.
6.5.31
mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.5.32
mouseDownCanMoveWindow as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event is called
so you can decide what happens with mouse down.
Notes:
Return true if you do not need to handle a mouse down and it can pass through to superviews; False if you
244
CHAPTER 6. COCOA CONTROLS
need to handle the mouse down.
This allows iApp-type applications to determine the region by which a window can be moved. By default,
this method returns false if the view is opaque; otherwise, it returns true. Subclasses can override this
method to return a different value.
6.5.33
mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.5.34
mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.5.35
mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.5.36
mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.5.37
mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.5. CLASS CUSTOMNSTEXTVIEWMBS
6.5.38
245
Open
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the custom NSSearchField is created.
6.5.39
otherMouseDown(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.5.40
otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.5.41
otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.5.42
performDragOperation(sender as NSDraggingInfoMBS) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked after the
released image has been removed from the screen, signaling the receiver to import the pasteboard data.
Notes:
246
CHAPTER 6. COCOA CONTROLS
sender: The object sending the message; use it to get details about the dragging operation.
Return if the destination accepts the data, it returns true; otherwise it returns false. The default is to return
false.
For this method to be invoked, the previous prepareForDragOperation message must have returned true.
The destination should implement this method to do the real work of importing the pasteboard data represented by the image.
If the sender object’s animatesToDestination was set to true in prepareForDragOperation, then setup any
animation to arrange space for the drag items to animate to. Also at this time, enumerate through the
dragging items to set their destination frames and destination images.
6.5.43
prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
image is released, allowing the receiver to agree to or refuse drag operation.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Returns true if the receiver agrees to perform the drag operation and false if not.
This method is invoked only if the most recent draggingEntered or draggingUpdated message returned an
acceptable drag-operation value.
If you want the drag items to animate from their current location on screen to their final location in your
view, set the sender object’s animatesToDestination property to true in your implementation of this method.
6.5.44
pressureChange(e as NSEventMBS) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: Yes, Linux: Yes. Function: Informs the current
object that a pressure change occurred on a system that supports pressure sensitivity.
Notes:
This method is invoked automatically in response to user actions. event is the event that initiated the change
in pressure.
Available in OS X v10.10.3 and later.
6.5.45
resignFirstResponder as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Focus is going away.
Notes: Return true to accept.
6.5. CLASS CUSTOMNSTEXTVIEWMBS
6.5.46
247
rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.5.47
rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.5.48
rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.5.49
rotateWithEvent(e as NSEventMBS) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a rotation gesture.
Notes:
e: An event object representing the rotate gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.5.50
scrollWheel(e as NSEventMBS) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the subclass
that the mouse’s scroll wheel has moved.
Notes:
e: An object encapsulating information about the wheel-scrolling event.
The default implementation simply passes this message to the next responder.
Return true to not pass the event.
248
6.5.51
CHAPTER 6. COCOA CONTROLS
swipeWithEvent(e as NSEventMBS) as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a swipe gesture.
Notes:
e: An event object representing the swipe gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.5.52
updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging images should be changed.
Notes:
sender: The object sending the message; use this object to get details about the dragging operation.
While a destination may change the dragging images at any time, it is recommended to wait until this
method is called before updating the dragging images.
This allows the system to delay changing the dragging images until it is likely that the user will drop on
this destination. Otherwise, the dragging images will change too often during the drag which would be
distracting to the user.
6.5.53
viewDidMoveToWindow
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that it has been added to a new view hierarchy.
Notes:
The default implementation does nothing; subclasses can implement this event to perform whatever actions
are necessary.
window may return nil when this method is invoked, indicating that the receiver does not currently reside in
any window. This occurs when the receiver has just been removed from its superview or when the receiver
has just been added to a superview that does not itself have a window. Overrides of this method may choose
to ignore such cases if they are not of interest.
6.5. CLASS CUSTOMNSTEXTVIEWMBS
6.5.54
249
wantsPeriodicDraggingUpdates as boolean
Plugin Version: 17.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Asks the destination
object whether it wants to receive periodic draggingUpdated messages.
Notes:
Return true if the destination wants to receive periodic draggingUpdated messages, false otherwise.
If the destination returns false, these messages are sent only when the mouse moves or a modifier flag changes.
Otherwise the destination gets the default behavior, where it receives periodic dragging-updated messages
even if nothing changes.
250
6.6
6.6.1
CHAPTER 6. COCOA CONTROLS
class CustomNSTokenFieldMBS
class CustomNSTokenFieldMBS
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The class for a
custom NSTokenField.
Notes: Subclass of the NSTokenFieldMBS class.
6.6.2
Methods
6.6.3
Constructor
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The dummy
constructor doing nothing.
See also:
• 6.6.4 Constructor(Handle as Integer)
250
• 6.6.5 Constructor(left as Double, top as Double, width as Double, height as Double)
250
6.6.4
Constructor(Handle as Integer)
Plugin Version: 13.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor.
See also:
• 6.6.3 Constructor
250
• 6.6.5 Constructor(left as Double, top as Double, width as Double, height as Double)
250
6.6.5
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor for
a new custom NSTokenField object.
See also:
• 6.6.3 Constructor
250
• 6.6.4 Constructor(Handle as Integer)
250
6.6. CLASS CUSTOMNSTOKENFIELDMBS
6.6.6
251
Destructor
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The destructor.
6.6.7
Events
6.6.8
acceptsFirstMouse(e as NSEventMBS) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Overridden by
subclasses to return true if the receiver should be sent a mouseDown event for an initial mouse-down event,
false if not.
Notes:
The receiver can either return a value unconditionally or use the location of event e to determine whether
or not it wants the event. The default implementation ignores the event and returns false.
Implement this event in a subclass to allow instances to respond to click-through. This allows the user to
click on a view in an inactive window, activating the view with one click, instead of clicking first to make the
window active and then clicking the view. Most view objects refuse a click-through attempt, so the event
simply activates the window. Many control objects, however, such as instances of NSButton and NSSlider, do
accept them, so the user can immediately manipulate the control without having to release the mouse button.
6.6.9
acceptsFirstResponder as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether to accept
first responder.
Notes: Return true if your control can have the focus and false if not.
6.6.10
becomeFirstResponder as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when the
object gets focus.
Notes: Return true to accept.
6.6.11
beginGestureWithEvent(e as NSEventMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a touch gesture.
Notes:
252
CHAPTER 6. COCOA CONTROLS
e: An event object representing the gesture beginning.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.6.12
canBecomeKeyView as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the receiver can become key view.
Notes: Returns true if the receiver can become key view, false otherwise.
6.6.13
Close
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the custom view is destroyed.
6.6.14
concludeDragOperation(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging operation is complete, signaling the receiver to perform any necessary clean-up.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
For this method to be invoked, the previous performDragOperation must have returned true.
The destination implements this method to perform any tidying up that it needs to do, such as updating its
visual representation now that it has incorporated the dragged data. This message is the last message sent
from sender to the destination during a dragging session.
If the sender object’s animatesToDestination property was set to true in prepareForDragOperation, then the
drag image is still visible. At this point you should draw the final visual representation in the view. When
this method returns, the drag image is removed form the screen. If your final visual representation matches
the visual representation in the drag, this is a seamless transition.
6.6. CLASS CUSTOMNSTOKENFIELDMBS
6.6.15
253
draggingEnded(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
event to be notified when a drag operation ends in some other destination.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
This method might be used by a destination doing auto-expansion in order to collapse any auto-expands.
6.6.16
draggingEntered(sender as NSDraggingInfoMBS) as Integer
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragged image enters destination bounds or frame; delegate returns dragging operation to perform.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is
the value returned by the previous draggingEntered message.
Invoked when a dragged image enters the destination but only if the destination has registered for the pasteboard data type involved in the drag operation. Specifically, this method is invoked when the mouse pointer
enters the destination’s bounds rectangle (if it is a view object) or its frame rectangle (if it is a window object).
This method must return a value that indicates which dragging operation the destination will perform when
the image is released. In deciding which dragging operation to return, the method should evaluate the
overlap between both the dragging operations allowed by the source (obtained from sender with the draggingSourceOperationMask method) and the dragging operations and pasteboard data types the destination
itself supports.
If none of the operations is appropriate, this method should return NSDragOperationNone (this is the default
response if the method is not implemented by the destination). A destination will still receive draggingUpdated and draggingExited even if NSDragOperationNone is returned by this method.
6.6.17
draggingExited(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragged image exits the destination’s bounds rectangle (in the case of a view object) or its frame rectangle
(in the case of a window object).
254
CHAPTER 6. COCOA CONTROLS
Notes: sender: The object sending the message; use it to get details about the dragging operation.
6.6.18
draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging session has completed.
Notes:
session: The dragging session.
screenPoint: The point where the drag ended, in screen coordinates.
operation: The drag operation. See constants for drag operation types.
Available in OS X v10.7 and later.
6.6.19
draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
drag moves on the screen.
Notes:
session: The dragging session.
screenPoint: The point where the drag moved to, in screen coordinates.
Available in OS X v10.7 and later.
6.6.20
draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Declares the types
of operations the source allows to be performed. (required)
Notes:
session: The dragging session.
context: The dragging context. See NSDraggingContext constants for the supported values.
Return the appropriate dragging operation as defined in constants.
In the future Apple may provide more specific ”within” values in the future. To account for this, for unrec-
6.6. CLASS CUSTOMNSTOKENFIELDMBS
255
ognized localities, return the operation mask for the most specific context that you are concerned with.
6.6.21
draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
drag will begin.
Notes:
session: The dragging session.
screenPoint: The point where the drag will begin, in screen coordinates.
Available in OS X v10.7 and later.
6.6.22
draggingSourceOperationMaskForLocal(flag as boolean) as Integer
Plugin Version: 13.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns an integer
bit mask indicating the types of dragging operations the source object will allow to be performed on the
dragged image’s data.
Notes:
(Deprecated in OS X v10.7. This method is informally deprecated. It is only called if the source does not
implement the NSDraggingSource protocol methods. This method will be formally deprecated in a future
OS release.)
isLocal: True indicates that the candidate destination object (the window or view over which the dragged
image is currently poised) is in the same application as the source, while a false value indicates that the
destination object is in a different application.
A mask, created by combining the dragging operations listed in the NSDragOperation section of NSDraggingInfo protocol reference using the C bitwise OR operator.If the source does not permit any dragging
operations, it should return NSDragOperationNone.
If not implemented, the default value is NSDragOperationCopy | NSDragOperationLink | NSDragOperationGeneric | NSDragOperationPrivate.
Available in OS X v10.0 and later. Deprecated in OS X v10.7.
256
6.6.23
CHAPTER 6. COCOA CONTROLS
draggingUpdated(sender as NSDraggingInfoMBS) as Integer
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked periodically
as the image is held within the destination area, allowing modification of the dragging operation or mousepointer position.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is
the value returned by the previous draggingEntered message.
For this to be invoked, the destination must have registered for the pasteboard data type involved in the
drag operation. The messages continue until the image is either released or dragged out of the window or view.
This method provides the destination with an opportunity to modify the dragging operation depending on
the position of the mouse pointer inside of the destination view or window object. For example, you may have
several graphics or areas of text contained within the same view and wish to tailor the dragging operation,
or to ignore the drag event completely, depending upon which object is underneath the mouse pointer at the
time when the user releases the dragged image and the performDragOperation method is invoked.
You typically examine the contents of the pasteboard in the draggingEntered method, where this examination is performed only once, rather than in the draggingUpdated method, which is invoked multiple times.
Only one destination at a time receives a sequence of draggingUpdated messages. If the mouse pointer is
within the bounds of two overlapping views that are both valid destinations, the uppermost view receives
these messages until the image is either released or dragged out.
6.6.24
endGestureWithEvent(e as NSEventMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has ended a touch gesture.
Notes:
e: An event object representing the gesture end.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.6. CLASS CUSTOMNSTOKENFIELDMBS
6.6.25
257
ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the modifier keys will be ignored for this dragging session.
Notes:
session: The dragging session.
Return true if the modifier keys will be ignored, false otherwise.
Available in OS X v10.7 and later.
6.6.26
isOpaque as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether this view
is opaque.
6.6.27
keyDown(e as NSEventMBS) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the key
events.
Notes:
Return true if you handled this event.
Please return true in becomeFirstResponder and acceptsFirstResponder, so your nsview can become first
responder and receive key events.
6.6.28
keyUp(e as NSEventMBS) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the key
events.
Notes:
Return true if you handled this event.
Please return true in becomeFirstResponder and acceptsFirstResponder, so your nsview can become first
responder and receive key events.
258
6.6.29
CHAPTER 6. COCOA CONTROLS
magnifyWithEvent(e as NSEventMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a pinch gesture.
Notes:
e: An event object representing the magnify gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.6.30
menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as
NSMenuMBS
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Overridden by
subclasses to return a context-sensitive pop-up menu for a given mouse-down event.
Notes:
theEvent: An object representing a mouse-down event.
defaultMenu: The menu as constructed by super class.
The receiver can use information in the mouse event, such as its location over a particular element of the
receiver, to determine what kind of menu to return. For example, a text object might display a text-editing
menu when the cursor lies over text and a menu for changing graphics attributes when the cursor lies over
an embedded image.
The default implementation returns the default menu.
6.6.31
mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.6.32
mouseDownCanMoveWindow as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event is called
so you can decide what happens with mouse down.
Notes:
Return true if you do not need to handle a mouse down and it can pass through to superviews; False if you
6.6. CLASS CUSTOMNSTOKENFIELDMBS
259
need to handle the mouse down.
This allows iApp-type applications to determine the region by which a window can be moved. By default,
this method returns false if the view is opaque; otherwise, it returns true. Subclasses can override this
method to return a different value.
6.6.33
mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.6.34
mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.6.35
mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.6.36
mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.6.37
mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
260
6.6.38
CHAPTER 6. COCOA CONTROLS
Open
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the custom NSView is created.
6.6.39
otherMouseDown(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.6.40
otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.6.41
otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.6.42
performDragOperation(sender as NSDraggingInfoMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked after the
released image has been removed from the screen, signaling the receiver to import the pasteboard data.
Notes:
6.6. CLASS CUSTOMNSTOKENFIELDMBS
261
sender: The object sending the message; use it to get details about the dragging operation.
Return if the destination accepts the data, it returns true; otherwise it returns false. The default is to return
false.
For this method to be invoked, the previous prepareForDragOperation message must have returned true.
The destination should implement this method to do the real work of importing the pasteboard data represented by the image.
If the sender object’s animatesToDestination was set to true in prepareForDragOperation, then setup any
animation to arrange space for the drag items to animate to. Also at this time, enumerate through the
dragging items to set their destination frames and destination images.
6.6.43
prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
image is released, allowing the receiver to agree to or refuse drag operation.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Returns true if the receiver agrees to perform the drag operation and false if not.
This method is invoked only if the most recent draggingEntered or draggingUpdated message returned an
acceptable drag-operation value.
If you want the drag items to animate from their current location on screen to their final location in your
view, set the sender object’s animatesToDestination property to true in your implementation of this method.
6.6.44
pressureChange(e as NSEventMBS) as boolean
Plugin Version: 15.1, Console & Web: No, Mac: Yes, Win: Yes, Linux: Yes. Function: Informs the current
object that a pressure change occurred on a system that supports pressure sensitivity.
Notes:
This method is invoked automatically in response to user actions. event is the event that initiated the change
in pressure.
Available in OS X v10.10.3 and later.
6.6.45
resignFirstResponder as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Focus is going away.
Notes: Return true to accept.
262
6.6.46
CHAPTER 6. COCOA CONTROLS
rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.6.47
rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.6.48
rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.6.49
rotateWithEvent(e as NSEventMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a rotation gesture.
Notes:
e: An event object representing the rotate gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.6.50
scrollWheel(e as NSEventMBS) as boolean
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the subclass
that the mouse’s scroll wheel has moved.
Notes:
e: An object encapsulating information about the wheel-scrolling event.
The default implementation simply passes this message to the next responder.
Return true to not pass the event.
6.6. CLASS CUSTOMNSTOKENFIELDMBS
6.6.51
263
swipeWithEvent(e as NSEventMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a swipe gesture.
Notes:
e: An event object representing the swipe gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.6.52
updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging images should be changed.
Notes:
sender: The object sending the message; use this object to get details about the dragging operation.
While a destination may change the dragging images at any time, it is recommended to wait until this
method is called before updating the dragging images.
This allows the system to delay changing the dragging images until it is likely that the user will drop on
this destination. Otherwise, the dragging images will change too often during the drag which would be
distracting to the user.
6.6.53
viewDidMoveToWindow
Plugin Version: 12.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that it has been added to a new view hierarchy.
Notes:
The default implementation does nothing; subclasses can implement this event to perform whatever actions
are necessary.
window may return nil when this method is invoked, indicating that the receiver does not currently reside in
any window. This occurs when the receiver has just been removed from its superview or when the receiver
has just been added to a superview that does not itself have a window. Overrides of this method may choose
to ignore such cases if they are not of interest.
264
6.6.54
CHAPTER 6. COCOA CONTROLS
wantsPeriodicDraggingUpdates as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Asks the destination
object whether it wants to receive periodic draggingUpdated messages.
Notes:
Return true if the destination wants to receive periodic draggingUpdated messages, false otherwise.
If the destination returns false, these messages are sent only when the mouse moves or a modifier flag changes.
Otherwise the destination gets the default behavior, where it receives periodic dragging-updated messages
even if nothing changes.
6.7. CLASS CUSTOMNSVIEWMBS
6.7
6.7.1
265
class CustomNSViewMBS
class CustomNSViewMBS
Plugin Version: 7.7, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The class for a
custom NSView.
Notes: Subclass of the NSViewMBS class.
6.7.2
Methods
6.7.3
Constructor
Plugin Version: 7.7, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The dummy
constructor doing nothing.
See also:
• 6.7.4 Constructor(Handle as Integer)
265
• 6.7.5 Constructor(left as Double, top as Double, width as Double, height as Double)
265
6.7.4
Constructor(Handle as Integer)
Plugin Version: 13.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given CustomNSView handle.
Notes: The handle is casted to a CustomNSView and the plugin retains this handle.
See also:
• 6.7.3 Constructor
265
• 6.7.5 Constructor(left as Double, top as Double, width as Double, height as Double)
265
6.7.5
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 7.7, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor for
a new custom NSView object.
See also:
• 6.7.3 Constructor
265
• 6.7.4 Constructor(Handle as Integer)
265
266
6.7.6
CHAPTER 6. COCOA CONTROLS
Destructor
Plugin Version: 12.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The destructor.
6.7.7
Events
6.7.8
acceptsFirstMouse(e as NSEventMBS) as boolean
Plugin Version: 11.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Overridden by
subclasses to return true if the receiver should be sent a mouseDown event for an initial mouse-down event,
false if not.
Notes:
The receiver can either return a value unconditionally or use the location of event e to determine whether
or not it wants the event. The default implementation ignores the event and returns false.
Implement this event in a subclass to allow instances to respond to click-through. This allows the user to
click on a view in an inactive window, activating the view with one click, instead of clicking first to make the
window active and then clicking the view. Most view objects refuse a click-through attempt, so the event
simply activates the window. Many control objects, however, such as instances of NSButton and NSSlider, do
accept them, so the user can immediately manipulate the control without having to release the mouse button.
6.7.9
acceptsFirstResponder as boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether to accept
first responder.
Notes: Return true if your control can have the focus and false if not.
6.7.10
becomeFirstResponder as boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when the
object gets focus.
Notes: Return true to accept.
6.7.11
beginGestureWithEvent(e as NSEventMBS) as boolean
Plugin Version: 10.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a touch gesture.
Notes:
6.7. CLASS CUSTOMNSVIEWMBS
267
e: An event object representing the gesture beginning.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.7.12
canBecomeKeyView as boolean
Plugin Version: 11.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the receiver can become key view.
Notes: Returns true if the receiver can become key view, false otherwise.
6.7.13
Close
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the custom view is destroyed.
6.7.14
concludeDragOperation(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging operation is complete, signaling the receiver to perform any necessary clean-up.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
For this method to be invoked, the previous performDragOperation must have returned true.
The destination implements this method to perform any tidying up that it needs to do, such as updating its
visual representation now that it has incorporated the dragged data. This message is the last message sent
from sender to the destination during a dragging session.
If the sender object’s animatesToDestination property was set to true in prepareForDragOperation, then the
drag image is still visible. At this point you should draw the final visual representation in the view. When
this method returns, the drag image is removed form the screen. If your final visual representation matches
the visual representation in the drag, this is a seamless transition.
268
6.7.15
CHAPTER 6. COCOA CONTROLS
draggingEnded(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
event to be notified when a drag operation ends in some other destination.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
This method might be used by a destination doing auto-expansion in order to collapse any auto-expands.
6.7.16
draggingEntered(sender as NSDraggingInfoMBS) as Integer
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragged image enters destination bounds or frame; delegate returns dragging operation to perform.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is
the value returned by the previous draggingEntered message.
Invoked when a dragged image enters the destination but only if the destination has registered for the pasteboard data type involved in the drag operation. Specifically, this method is invoked when the mouse pointer
enters the destination’s bounds rectangle (if it is a view object) or its frame rectangle (if it is a window object).
This method must return a value that indicates which dragging operation the destination will perform when
the image is released. In deciding which dragging operation to return, the method should evaluate the
overlap between both the dragging operations allowed by the source (obtained from sender with the draggingSourceOperationMask method) and the dragging operations and pasteboard data types the destination
itself supports.
If none of the operations is appropriate, this method should return NSDragOperationNone (this is the default
response if the method is not implemented by the destination). A destination will still receive draggingUpdated and draggingExited even if NSDragOperationNone is returned by this method.
6.7.17
draggingExited(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragged image exits the destination’s bounds rectangle (in the case of a view object) or its frame rectangle
(in the case of a window object).
6.7. CLASS CUSTOMNSVIEWMBS
269
Notes: sender: The object sending the message; use it to get details about the dragging operation.
6.7.18
draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging session has completed.
Notes:
session: The dragging session.
screenPoint: The point where the drag ended, in screen coordinates.
operation: The drag operation. See constants for drag operation types.
Available in OS X v10.7 and later.
6.7.19
draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
drag moves on the screen.
Notes:
session: The dragging session.
screenPoint: The point where the drag moved to, in screen coordinates.
Available in OS X v10.7 and later.
6.7.20
draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Declares the types
of operations the source allows to be performed. (required)
Notes:
session: The dragging session.
context: The dragging context. See NSDraggingContext constants for the supported values.
Return the appropriate dragging operation as defined in constants.
In the future Apple may provide more specific ”within” values in the future. To account for this, for unrec-
270
CHAPTER 6. COCOA CONTROLS
ognized localities, return the operation mask for the most specific context that you are concerned with.
6.7.21
draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
drag will begin.
Notes:
session: The dragging session.
screenPoint: The point where the drag will begin, in screen coordinates.
Available in OS X v10.7 and later.
6.7.22
draggingSourceOperationMaskForLocal(flag as boolean) as Integer
Plugin Version: 13.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns an integer
bit mask indicating the types of dragging operations the source object will allow to be performed on the
dragged image’s data.
Notes:
(Deprecated in OS X v10.7. This method is informally deprecated. It is only called if the source does not
implement the NSDraggingSource protocol methods. This method will be formally deprecated in a future
OS release.)
isLocal: True indicates that the candidate destination object (the window or view over which the dragged
image is currently poised) is in the same application as the source, while a false value indicates that the
destination object is in a different application.
A mask, created by combining the dragging operations listed in the NSDragOperation section of NSDraggingInfo protocol reference using the C bitwise OR operator.If the source does not permit any dragging
operations, it should return NSDragOperationNone.
If not implemented, the default value is NSDragOperationCopy | NSDragOperationLink | NSDragOperationGeneric | NSDragOperationPrivate.
Available in OS X v10.0 and later. Deprecated in OS X v10.7.
6.7. CLASS CUSTOMNSVIEWMBS
6.7.23
271
draggingUpdated(sender as NSDraggingInfoMBS) as Integer
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked periodically
as the image is held within the destination area, allowing modification of the dragging operation or mousepointer position.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is
the value returned by the previous draggingEntered message.
For this to be invoked, the destination must have registered for the pasteboard data type involved in the
drag operation. The messages continue until the image is either released or dragged out of the window or view.
This method provides the destination with an opportunity to modify the dragging operation depending on
the position of the mouse pointer inside of the destination view or window object. For example, you may have
several graphics or areas of text contained within the same view and wish to tailor the dragging operation,
or to ignore the drag event completely, depending upon which object is underneath the mouse pointer at the
time when the user releases the dragged image and the performDragOperation method is invoked.
You typically examine the contents of the pasteboard in the draggingEntered method, where this examination is performed only once, rather than in the draggingUpdated method, which is invoked multiple times.
Only one destination at a time receives a sequence of draggingUpdated messages. If the mouse pointer is
within the bounds of two overlapping views that are both valid destinations, the uppermost view receives
these messages until the image is either released or dragged out.
6.7.24
drawFocusRingMask(g as NSGraphicsMBS) as boolean
Plugin Version: 12.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Draw the focus ring
mask for the view.
Notes:
If false is returned, the default method from NSView class runs.
This method provides the shape of the focus ring mask by drawing the focus ring mask. An implementation
of this method should draw in the view’s interior (bounds) coordinate space, that the focus ring style has
been set (it will be set it to NSFocusRingOnly to capture the focus ring itself), and that the fill and stroke
colors have been set to an arbitrary fully opaque color.
272
CHAPTER 6. COCOA CONTROLS
Subclasses that find the default behavior insufficient should only draw the focus ring shape.
The NSView default implementation of this method simply fills self.bounds.
Available in Mac OS X v10.7 and later.
Please use NSGraphicsMBS class for drawing.
6.7.25
DrawRect(g as NSGraphicsMBS, left as Double, top as Double, width
as Double, height as Double)
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The paint event with
the rectangle which needs to be redrawn.
6.7.26
endGestureWithEvent(e as NSEventMBS) as boolean
Plugin Version: 10.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has ended a touch gesture.
Notes:
e: An event object representing the gesture end.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.7.27
focusRingMaskBounds as NSRectMBS
Plugin Version: 12.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the focus
ring mask bounds.
Notes:
Return nil to run default NSView method.
Return a rectangle containing the mask in the view’s interior (bounds) coordinate space.
The mask bounds allows the focus ring’s overall size and position to be determined before it is drawn.
Subclasses must override this method if they require the display of a focus ring.
The NSView default implementation of this method simply returns NSRectMBS.Zero.
Note: The information provided by focusRingMaskBounds will enable Accessibility to identify selected
subelements for zoom tracking, so it is important that this method provide a reasonably tight bounding box
6.7. CLASS CUSTOMNSVIEWMBS
273
and that noteFocusRingMaskChanged is invoked as described.
6.7.28
ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the modifier keys will be ignored for this dragging session.
Notes:
session: The dragging session.
Return true if the modifier keys will be ignored, false otherwise.
Available in OS X v10.7 and later.
6.7.29
isFlipped as Boolean
Plugin Version: 16.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event to return
a boolean value indicating whether the view uses a flipped coordinate system.
Notes:
The default value of this property is false, which results in a non-flipped coordinate system. In a non-flipped
coordinate system, the origin is in the lower-left corner of the view and positive y-values extend upward. In
a flipped coordinate system, the origin is in the upper-left corner of the view and y-values extend downward.
X-values always extend to the right.
If you want your view to use a flipped coordinate system, override this property and return true.
6.7.30
isOpaque as boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether this view is
opaque.
6.7.31
keyDown(e as NSEventMBS) as boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the key events.
Notes:
Return true if you handled this event.
Please return true in becomeFirstResponder and acceptsFirstResponder, so your nsview can become first
274
CHAPTER 6. COCOA CONTROLS
responder and receive key events.
6.7.32
keyUp(e as NSEventMBS) as boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the key events.
Notes:
Return true if you handled this event.
Please return true in becomeFirstResponder and acceptsFirstResponder, so your nsview can become first
responder and receive key events.
6.7.33
magnifyWithEvent(e as NSEventMBS) as boolean
Plugin Version: 10.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a pinch gesture.
Notes:
e: An event object representing the magnify gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.7.34
menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as
NSMenuMBS
Plugin Version: 12.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Overridden by
subclasses to return a context-sensitive pop-up menu for a given mouse-down event.
Notes:
theEvent: An object representing a mouse-down event.
defaultMenu: The menu as constructed by super class.
The receiver can use information in the mouse event, such as its location over a particular element of the
receiver, to determine what kind of menu to return. For example, a text object might display a text-editing
menu when the cursor lies over text and a menu for changing graphics attributes when the cursor lies over
an embedded image.
The default implementation returns the default menu.
6.7. CLASS CUSTOMNSVIEWMBS
6.7.35
275
mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.7.36
mouseDownCanMoveWindow as boolean
Plugin Version: 11.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event is called
so you can decide what happens with mouse down.
Notes:
Return true if you do not need to handle a mouse down and it can pass through to superviews; False if you
need to handle the mouse down.
This allows iApp-type applications to determine the region by which a window can be moved. By default,
this method returns false if the view is opaque; otherwise, it returns true. Subclasses can override this
method to return a different value.
6.7.37
mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.7.38
mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.7.39
mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
276
6.7.40
CHAPTER 6. COCOA CONTROLS
mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.7.41
mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.7.42
Open
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the custom NSView is created.
6.7.43
otherMouseDown(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.7.44
otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.7. CLASS CUSTOMNSVIEWMBS
6.7.45
277
otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.7.46
performDragOperation(sender as NSDraggingInfoMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked after the
released image has been removed from the screen, signaling the receiver to import the pasteboard data.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return if the destination accepts the data, it returns true; otherwise it returns false. The default is to return
false.
For this method to be invoked, the previous prepareForDragOperation message must have returned true.
The destination should implement this method to do the real work of importing the pasteboard data represented by the image.
If the sender object’s animatesToDestination was set to true in prepareForDragOperation, then setup any
animation to arrange space for the drag items to animate to. Also at this time, enumerate through the
dragging items to set their destination frames and destination images.
6.7.47
prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
image is released, allowing the receiver to agree to or refuse drag operation.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Returns true if the receiver agrees to perform the drag operation and false if not.
This method is invoked only if the most recent draggingEntered or draggingUpdated message returned an
acceptable drag-operation value.
If you want the drag items to animate from their current location on screen to their final location in your
view, set the sender object’s animatesToDestination property to true in your implementation of this method.
278
6.7.48
CHAPTER 6. COCOA CONTROLS
pressureChange(e as NSEventMBS) as boolean
Plugin Version: 15.1, Console & Web: No, Mac: Yes, Win: Yes, Linux: Yes. Function: Informs the current
object that a pressure change occurred on a system that supports pressure sensitivity.
Notes:
This method is invoked automatically in response to user actions. event is the event that initiated the change
in pressure.
Available in OS X v10.10.3 and later.
6.7.49
resignFirstResponder as boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Focus is going away.
Notes: Return true to accept.
6.7.50
rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.7.51
rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.7.52
rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 7.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.7.53
rotateWithEvent(e as NSEventMBS) as boolean
Plugin Version: 10.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a rotation gesture.
6.7. CLASS CUSTOMNSVIEWMBS
279
Notes:
e: An event object representing the rotate gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.7.54
scrollWheel(e as NSEventMBS) as boolean
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the subclass
that the mouse’s scroll wheel has moved.
Notes:
e: An object encapsulating information about the wheel-scrolling event.
The default implementation simply passes this message to the next responder.
Return true to not pass the event.
6.7.55
swipeWithEvent(e as NSEventMBS) as boolean
Plugin Version: 10.3, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a swipe gesture.
Notes:
e: An event object representing the swipe gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.7.56
updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging images should be changed.
Notes:
sender: The object sending the message; use this object to get details about the dragging operation.
While a destination may change the dragging images at any time, it is recommended to wait until this
method is called before updating the dragging images.
This allows the system to delay changing the dragging images until it is likely that the user will drop on
this destination. Otherwise, the dragging images will change too often during the drag which would be
280
CHAPTER 6. COCOA CONTROLS
distracting to the user.
6.7.57
viewDidMoveToWindow
Plugin Version: 11.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that it has been added to a new view hierarchy.
Notes:
The default implementation does nothing; subclasses can implement this event to perform whatever actions
are necessary.
window may return nil when this method is invoked, indicating that the receiver does not currently reside in
any window. This occurs when the receiver has just been removed from its superview or when the receiver
has just been added to a superview that does not itself have a window. Overrides of this method may choose
to ignore such cases if they are not of interest.
6.7.58
wantsPeriodicDraggingUpdates as boolean
Plugin Version: 13.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Asks the destination
object whether it wants to receive periodic draggingUpdated messages.
Notes:
Return true if the destination wants to receive periodic draggingUpdated messages, false otherwise.
If the destination returns false, these messages are sent only when the mouse moves or a modifier flag changes.
Otherwise the destination gets the default behavior, where it receives periodic dragging-updated messages
even if nothing changes.
6.8. CLASS DISCLOSURETRIANGLE
6.8
6.8.1
281
class DisclosureTriangle
class DisclosureTriangle
Plugin Version: 9.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The built in DisclosureTriangle class in REALbasic.
6.8.2
Methods
6.8.3
NSButtonMBS as NSButtonMBS
Plugin Version: 9.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Creates a NSButtonMBS object for the given control.
Example:
MsgBox DisclosureTriangle1.NSButtonMBS.className
Notes: This way you can manipulate Cocoa controls directly.
282
6.9
6.9.1
CHAPTER 6. COCOA CONTROLS
class Groupbox
class Groupbox
Plugin Version: 10.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The built in Groupbox class in REALbasic.
6.9.2
Methods
6.9.3
NSBoxMBS as NSBoxMBS
Plugin Version: 10.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Creates a NSBoxMBS object for the given control.
Notes: This way you can manipulate Cocoa controls directly.
6.10. CLASS IMAGEWELL
6.10
class ImageWell
6.10.1
class ImageWell
283
Plugin Version: 10.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The built in ImageWell class in REALbasic.
6.10.2
Methods
6.10.3
NSImageViewMBS as NSImageViewMBS
Plugin Version: 10.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Creates a NSImageViewMBS object for the given control.
Notes: This way you can manipulate Cocoa controls directly.
284
CHAPTER 6. COCOA CONTROLS
6.11
class KeyValueCodingMBS
6.11.1
class KeyValueCodingMBS
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The class for key
value coding and using NSSortDescriptor class.
Notes: Events are only raised if called on main thread to avoid threading trouble.
6.11.2
Methods
6.11.3
Constructor
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor.
6.11.4
sortedArrayUsingDescriptor(values() as KeyValueCodingMBS, sortDescriptor as NSSortDescriptorMBS) as KeyValueCodingMBS()
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a copy of
the receiving array sorted as specified by a given a sort descriptor.
Notes:
sortDescriptor: The NSSortDescriptor objects.
Returns a copy of the receiving array sorted as specified by sortDescriptor.
6.11.5
sortedArrayUsingDescriptors(values() as KeyValueCodingMBS, sortDescriptor() as NSSortDescriptorMBS) as KeyValueCodingMBS()
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a copy of
the receiving array sorted as specified by a given array of sort descriptors.
Notes:
sortDescriptors: An array of NSSortDescriptor objects.
Returns a copy of the receiving array sorted as specified by sortDescriptors.
The first descriptor specifies the primary key path to be used in sorting the receiving arrays contents. Any
subsequent descriptors are used to further refine sorting of objects with duplicate values. See NSSortDescriptor for additional information.
6.11. CLASS KEYVALUECODINGMBS
6.11.6
Properties
6.11.7
Description as String
285
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The description
text property.
Notes: (Read only property)
See also:
• 6.11.12 Description as String
6.11.8
286
Handle as Integer
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The internal object
handle.
Notes: (Read and Write property)
6.11.9
Tag as Variant
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The tag value.
Notes:
Store anything you need, e.g. a dictionary.
(Read and Write property)
6.11.10
valueForKey(key as String) as Variant
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Get/set the value
for the property identified by a given key.
Notes:
key: The name of one of the receiver’s properties.
(Read and Write computed property)
See also:
• 6.11.15 valueForKey(key as string) as Variant
287
286
CHAPTER 6. COCOA CONTROLS
6.11.11
Events
6.11.12
Description as String
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event when
system queries description for object.
See also:
• 6.11.7 Description as String
6.11.13
285
setValueForKey(key as string, value as Variant)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sets the property of
the receiver specified by a given key to a given value.
Notes:
value: The value for the property identified by key.
key: The name of one of the receiver’s properties.
If key identifies a to-one relationship, relate the object specified by value to the receiver, unrelating the
previously related object if there was one. Given a collection object and a key that identifies a to-many relationship, relate the objects contained in the collection to the receiver, unrelating previously related objects
if there were any.
The search pattern that setValueForKey uses is described in Accessor Search Patterns in Key-Value Coding
Programming Guide.
In a reference-counted environment, if the instance variable is accessed directly, value is retained.
6.11.14
setValueForUndefinedKey(key as string, value as Variant)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked by
setValueForKey when it finds no property for a given key.
Notes:
value: The value for the key identified by key.
key: A string that is not equal to the name of any of the receiver’s properties.
Subclasses can override this method to handle the request in some other way. The default implementation
raises an NSUndefinedKeyException.
6.11. CLASS KEYVALUECODINGMBS
6.11.15
287
valueForKey(key as string) as Variant
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Return the value for
the property identified by a given key.
Notes:
key: The name of one of the receiver’s properties.
Returns the value for the property identified by key.
If event is not implemented, the search pattern that valueForKey uses to find the correct value to return is
described in Accessor Search Patterns in Key-Value Coding Programming Guide.
See also:
• 6.11.10 valueForKey(key as String) as Variant
6.11.16
285
valueForUndefinedKey(key as string) as Variant
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked by
valueForKey when it finds no property corresponding to a given key.
Notes:
key: A string that is not equal to the name of any of the receiver’s properties.
Subclasses can override this method to return an alternate value for undefined keys. The default implementation raises an NSUndefinedKeyException.
288
CHAPTER 6. COCOA CONTROLS
6.12
class NSBoxMBS
6.12.1
class NSBoxMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The NSBox class
implements simple views that can title themselves and draw a border around their content.
Notes:
These objects are known as boxes. You can use box to group, visually, some number of other views.
You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSViewMBS class.
6.12.2
Methods
6.12.3
borderRect as NSRectMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the rectangle in which the receiver’s border is drawn.
Notes: The rectangle in which the border of the NSBox is drawn.
6.12.4
Constructor
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new box
view with size 100/100 and position 0/0
Example:
dim x as new NSBoxMBS
Notes: On success the handle property is not zero.
See also:
• 6.12.5 Constructor(Handle as Integer)
288
• 6.12.6 Constructor(left as Double, top as Double, width as Double, height as Double)
289
6.12.5
Constructor(Handle as Integer)
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSView handle.
Example:
6.12. CLASS NSBOXMBS
289
dim t as new NSBoxMBS(0, 0, 100, 100)
dim v as new NSBoxMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSBox and the plugin retains this handle.
See also:
• 6.12.4 Constructor
288
• 6.12.6 Constructor(left as Double, top as Double, width as Double, height as Double)
289
6.12.6
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
control with the given size and position.
Example:
dim left,top,width,height as Integer
// define rectangle
dim x as new NSBoxMBS(left, top, width, height)
Notes: On success the handle property is not zero.
See also:
• 6.12.4 Constructor
288
• 6.12.5 Constructor(Handle as Integer)
288
6.12.7
setFrameFromContentFrame(contentFrame as NSRectMBS)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Places the receiver
so its content view lies on the specified frame.
Notes: contentFrame: The rectangle specifying the frame of the box’s content view, reckoned in the coordinate system of the box’s superview. The box is marked for redisplay.
6.12.8
setTitleWithMnemonic(stringWithAmpersand as string)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets the title of the
receiver with a character denoted as an access key.
Notes:
290
CHAPTER 6. COCOA CONTROLS
Mnemonics are not supported in Mac OS X.
By default, a box’s title is ”Title.” The content view is not automatically resized, and the box is not marked
for redisplay.
6.12.9
sizeToFit
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Resizes and moves
the receiver’s content view so it just encloses its subviews.
Example:
dim n as new NSProgressIndicatorMBS
n.sizeToFit
MsgBox n.frame.String
Notes:
The receiver is then moved and resized to wrap around the content view. The receiver’s width is constrained
so its title will be fully displayed.
You should invoke this method after:
• Adding a subview (to the content view)
• Altering the size or location of such a subview
• Setting the margins around the content view
The mechanism by which the content view is moved and resized depends on whether the object responds to
its own sizeToFit message: If it does respond, then that message is sent, and the content view is expected
to be so modified. If the content view doesn’t respond, the box moves and resizes the content view itself.
6.12.10
titleCell as NSCellMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the cell
used to display the receiver’s title.
6.12. CLASS NSBOXMBS
6.12.11
291
titleRect as NSRectMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the rectangle in which the receiver’s title is drawn.
Notes: The rectangle in which the title is drawn.
6.12.12
Properties
6.12.13
borderColor as NSColorMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the color
of the receiver’s border when the receiver is a custom box with a simple line border.
Notes:
The receiver’s border color. It must be a custom boxthat is, it has a type of NSBoxCustomand it must have
a border style of NSLineBorder.
Available in Mac OS X v10.5 and later.
(Read and Write computed property)
6.12.14
borderType as Integer
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The border type to
aType, which must be a valid border type.
Notes:
A constant describing the type of border. Border types are defined in NSView.h. Currently, the following
border types are defined: NSNoBorder, NSLineBorder, NSBezelBorder, NSGrooveBorder.
If the size of the new border is different from that of the old border, the content view is resized to absorb
the difference, and the box is marked for redisplay.
(Read and Write computed property)
6.12.15
borderWidth as Double
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The border width.
Notes:
Functional only when the receiver’s box type (boxType) is NSBoxCustom and its border type (borderType)
is NSLineBorder.
292
CHAPTER 6. COCOA CONTROLS
Available in Mac OS X v10.5 and later.
(Read and Write computed property)
6.12.16
boxType as Integer
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The box type.
Notes:
Use the NSBox* constants.
(Read and Write computed property)
6.12.17
contentView as NSViewMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The receiver’s
content view.
Notes:
On settings the NSView object is resized to fit within the box’s current content area and the box is marked
for redisplay.
(Read and Write computed property)
6.12.18
contentViewMargins as NSSizeMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The horizontal and
vertical distance between the border of the receiver and its content view.
Notes:
Value: The width and height of the offset between the box’s border and content view. The horizontal value
is applied (reckoned in the box’s coordinate system) fully and equally to the left and right sides of the box.
The vertical value is similarly applied to the top and bottom.
Unlike changing a box’s other attributes, such as its title position or border type, changing the offsets
doesn’t automatically resize the content view. In general, you should send a sizeToFit message to the box
after changing the size of its offsets. This message causes the content view to remain unchanged while the
box is sized to fit around it.
(Read and Write computed property)
6.12. CLASS NSBOXMBS
6.12.19
293
cornerRadius as Double
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The corner radius
for the box.
Notes:
Functional only when the receiver’s box type (boxType) is NSBoxCustom and its border type (borderType)
is NSLineBorder.
(Read and Write computed property)
6.12.20
fillColor as NSColorMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The color of the
receiver’s background when the receiver is a custom box with a simple line border.
Notes:
The receiver’s fill color. It must be a custom boxthat is, it has a type of NSBoxCustomand it must have a
border style of NSLineBorder.
Available in Mac OS X v10.5 and later.
(Read and Write computed property)
6.12.21
title as string
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The title for the
box.
Notes:
By default, a box’s title is ”Title.”
(Read and Write computed property)
6.12.22
titleFont as NSFontMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The font object
used to draw the receiver’s title.
Notes:
By default, the title is drawn using the small system font (obtained using (smallSystemFontSize as the parameter of systemFontOfSize:, both NSFont class methods). If the size of the new font is different from that
of the old font, the content view is resized to absorb the difference.
(Read and Write computed property)
294
6.12.23
CHAPTER 6. COCOA CONTROLS
titlePosition as Integer
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The position of the
box’s title.
Notes:
If the new title position changes the size of the box’s border area, the content view is resized to absorb the
difference, and the box is marked as needing redisplay.
Use this constants: NSNoTitle, NSAboveTop, NSAtTop, NSBelowTop, NSAboveBottom, NSAtBottom and
NSBelowBottom.
(Read and Write computed property)
6.12.24
Transparent as Boolean
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the receiver
is transparent.
Notes:
True makes the receiver transparent.
False makes the receiver opaque.
(Read and Write computed property)
6.12.25
Constants
6.12.26
NSAboveBottom = 4
Plugin Version: 10.0. Function: One of the constants for the title position.
Notes: Title positioned above the box’s bottom border.
6.12.27
NSAboveTop = 1
Plugin Version: 10.0. Function: One of the constants for the title position.
Notes: Title positioned above the box’s top border.
6.12.28
NSAtBottom = 5
Plugin Version: 10.0. Function: One of the constants for the title position.
Notes: Title positioned within the box’s bottom border.
6.12. CLASS NSBOXMBS
6.12.29
295
NSAtTop = 2
Plugin Version: 10.0. Function: One of the constants for the title position.
Notes: Title positioned within the box’s top border.
6.12.30
NSBelowBottom = 6
Plugin Version: 10.0. Function: One of the constants for the title position.
Notes: Title positioned below the box’s bottom border.
6.12.31
NSBelowTop = 3
Plugin Version: 10.0. Function: One of the constants for the title position.
Notes: Title positioned below the box’s top border.
6.12.32
NSBoxCustom = 4
Plugin Version: 10.0. Function: One of the constants and data type identifies box types, which, in conjunction with a box’s border type, define the appearance of the box.
Notes: Specifies that the appearance of the box is determined entirely by the by box-configuration methods,
without automatically applying Apple human interface guidelines.
6.12.33
NSBoxOldStyle = 3
Plugin Version: 10.0. Function: One of the constants and data type identifies box types, which, in conjunction with a box’s border type, define the appearance of the box.
Notes: Specifies that the box is a Mac OS X v10.2style box.
6.12.34
NSBoxPrimary = 0
Plugin Version: 10.0. Function: One of the constants and data type identifies box types, which, in conjunction with a box’s border type, define the appearance of the box.
Notes: Specifies the primary box appearance. This is the default box type.
296
6.12.35
CHAPTER 6. COCOA CONTROLS
NSBoxSecondary = 1
Plugin Version: 10.0. Function: One of the constants and data type identifies box types, which, in conjunction with a box’s border type, define the appearance of the box.
Notes: Specifies the secondary box appearance.
6.12.36
NSBoxSeparator = 2
Plugin Version: 10.0. Function: One of the constants and data type identifies box types, which, in conjunction with a box’s border type, define the appearance of the box.
Notes: Specifies the secondary box appearance.
6.12.37
NSNoTitle = 0
Plugin Version: 10.0. Function: One of the constants for the title position.
Notes: The box has no title.
6.13. CONTROL NSBUTTONCONTROLMBS
6.13
control NSButtonControlMBS
6.13.1
control NSButtonControlMBS
297
Plugin Version: 13.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The Xojo control
for a NSButton.
Notes:
This control embeds a special NSButton subclass.
Designed for Xojo 2013r1 and newer. May work on Real Studio 2012, but not perfectly.
Please use view property to access the underlaying object and set properties.
6.13.2
Properties
6.13.3
AlternateTitle as String
Plugin Version: 13.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The title that the
button displays when it’s in its alternate state.
Notes: (Read and Write property)
6.13.4
BezelStyle as Integer
Plugin Version: 13.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The appearance of
the border, if the view has one.
Notes:
Use this constants:
NSRoundedBezelStyle
NSRegularSquareBezelStyle
NSThickSquareBezelStyle
NSThickerSquareBezelStyle
NSDisclosureBezelStyle
NSShadowlessSquareBezelStyle
NSCircularBezelStyle
NSTexturedSquareBezelStyle
NSHelpButtonBezelStyle
NSSmallSquareBezelStyle
NSTexturedRoundedBezelStyle
NSRoundRectBezelStyle
NSRecessedBezelStyle
NSRoundedDisclosureBezelStyle
=
=
=
=
=
=
=
=
=
=
=
=
=
=
1
2
3
4
5
6
7
8
9
10
11
12
13
14
298
CHAPTER 6. COCOA CONTROLS
(Read and Write property)
6.13.5
ButtonType as Integer
Plugin Version: 13.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The button type.
Notes:
See also NSButtonMBS.ButtonType and the constants there like NSPushOnPushOffButton.
(Read and Write property)
6.13.6
Title as String
Plugin Version: 13.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The title displayed
on the button when it’s in its normal state.
Notes: (Read and Write property)
6.13.7
View as NSButtonMBS
Plugin Version: 13.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The view used in
the control.
Notes:
Use this object to set more options on the control.
(Read only property)
6.13.8
Events
6.13.9
Action
Plugin Version: 13.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The action event.
6.13.10
BoundsChanged
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the bounds, but not the frame, changed.
6.13. CONTROL NSBUTTONCONTROLMBS
6.13.11
299
EnableMenuItems
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: Yes, Linux: Yes. Function: The event where
you can enable menu items.
6.13.12
FrameChanged
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the frame changed.
6.13.13
GotFocus
Plugin Version: 16.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control itself
got focus.
Notes: This only fires if the control itself got focus and not a sub control.
6.13.14
LostFocus
Plugin Version: 16.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control lost
focus.
Notes: This only fires if the control itself lost focus and not a sub control.
6.13.15
MenuAction(HitItem as MenuItem) As Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when a
menuitem is choosen.
Notes: This allows the control to react on its relevant menu items. Please return true if you handled it or
false to give others a chance.
6.13.16
MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The mouse button
was pressed inside the controls region at the location passed in to x, y.
Notes:
The coordinates x and y are local to the control, i.e. they represent the position of the mouse click relative
to the upper-left corner or the Control.
300
CHAPTER 6. COCOA CONTROLS
Return True if you are going to handle the MouseDown. In such a case:
• The Action event, if any, will not execute and the state of the object will not change.
• You will receive the MouseDrag and MouseUp events.
If you return False, the system handles the MouseDown so the above event handlers do not get called.
6.13.17
MouseDrag(x as Integer, y as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event fires
continuously after the mouse button was pressed inside the Control.
Notes:
Mouse location is local to the control passed in to x, y.
As this event is fired continuously (hundreds of time per second), it is your responsibility to determine if the
mouse has really moved.
6.13.18
MouseUp(x as Integer, y as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The mouse button
was released.
Notes: Use the x and y parameters to determine if the mouse button was released within the control’s
boundaries.
6.13.19
ScaleFactorChanged(NewFactor as Double)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The backing store
scale factor has changed.
Notes: Please invalidate any cached bitmaps or other relevant state.
6.14. CLASS NSBUTTONMBS
6.14
class NSButtonMBS
6.14.1
class NSButtonMBS
301
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The Cocoa class for
a button control.
Notes: Subclass of the NSControlMBS class.
6.14.2
Methods
6.14.3
Constructor
Plugin Version: 8.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new button
with size 100/100 and position 0/0
Example:
dim t as new NSButtonMBS
Notes: On success the handle property is not zero.
See also:
• 6.14.4 Constructor(Handle as Integer)
301
• 6.14.5 Constructor(left as Double, top as Double, width as Double, height as Double)
302
• 6.14.6 Constructor(Title as String, Image as NSImageMBS = nil, Type as Integer = 0)
302
6.14.4
Constructor(Handle as Integer)
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSButton handle.
Example:
dim t as new NSButtonMBS(0, 0, 100, 100)
dim v as new NSButtonMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSButton and the plugin retains this handle.
See also:
• 6.14.3 Constructor
301
302
CHAPTER 6. COCOA CONTROLS
• 6.14.5 Constructor(left as Double, top as Double, width as Double, height as Double)
302
• 6.14.6 Constructor(Title as String, Image as NSImageMBS = nil, Type as Integer = 0)
302
6.14.5
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new button
with the given size and position.
Example:
dim x as new NSButtonMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.
See also:
• 6.14.3 Constructor
301
• 6.14.4 Constructor(Handle as Integer)
301
• 6.14.6 Constructor(Title as String, Image as NSImageMBS = nil, Type as Integer = 0)
302
6.14.6
Constructor(Title as String, Image as NSImageMBS = nil, Type as Integer = 0)
Plugin Version: 16.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
button with default settings.
Notes:
For macOS 10.12, we use the convenience functions from Apple.
For older systems, we use our own code.
Title is the title to use. Can be empty.
Image is the image to use. Can be nil.
Type is the type, e.g. NSMomentaryLightButton.
See also:
• 6.14.3 Constructor
301
• 6.14.4 Constructor(Handle as Integer)
301
• 6.14.5 Constructor(left as Double, top as Double, width as Double, height as Double)
302
6.14.7
setButtonType(buttonType as Integer)
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets how the button
highlights while pressed and how it shows its state.
6.14. CLASS NSBUTTONMBS
303
Notes:
Use this constants:
NSMomentaryLightButton
NSPushOnPushOffButton
NSToggleButton
NSSwitchButton
NSRadioButton
NSMomentaryChangeButton
NSOnOffButton
NSMomentaryPushInButton
6.14.8
=
=
=
=
=
=
=
=
0
1
2
3
4
5
6
7
setNextState
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets the view to its
next state.
Notes: If the button has three states, it cycles through them in this order: on, off, mixed, on, and so forth.
If the button has two states, it toggles between them.
6.14.9
6.14.10
Properties
allowsMixedState as boolean
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the button allows a mixed state.
Notes: (Read and Write property)
6.14.11
alternateImage as NSImageMBS
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The image that
appears on the button when it’s in its alternate state.
Notes:
The image displayed by the button when it’s in its alternate state, or nil if there is no alternate image. Note
that some button types don’t display an alternate image. Buttons don’t display images by default.
(Read and Write property)
304
6.14.12
CHAPTER 6. COCOA CONTROLS
alternateTitle as string
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The title that the
button displays when it’s in its alternate state.
Notes: (Read and Write property)
6.14.13
attributedAlternateTitle as NSAttributedStringMBS
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The title that appears
on the button when it’s in its alternate state to the given attributed string.
Notes: (Read and Write property)
6.14.14
attributedTitle as NSAttributedStringMBS
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The title that the
button displays in its normal state as an attributed string.
Notes: (Read and Write property)
6.14.15
backgroundColor as NSColorMBS
Plugin Version: 14.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The background
color.
Notes:
The background color is used only when drawing borderless buttons.
(Read and Write property)
6.14.16
bezelColor as NSColorMBS
Plugin Version: 16.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The color of the
button’s bezel, in appearances that support it.
Notes: (Read and Write property)
6.14.17
bezelStyle as Integer
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The appearance of
the border, if the view has one.
Notes:
6.14. CLASS NSBUTTONMBS
305
Use this constants:
NSRoundedBezelStyle
NSRegularSquareBezelStyle
NSThickSquareBezelStyle
NSThickerSquareBezelStyle
NSDisclosureBezelStyle
NSShadowlessSquareBezelStyle
NSCircularBezelStyle
NSTexturedSquareBezelStyle
NSHelpButtonBezelStyle
NSSmallSquareBezelStyle
NSTexturedRoundedBezelStyle
NSRoundRectBezelStyle
NSRecessedBezelStyle
NSRoundedDisclosureBezelStyle
=
=
=
=
=
=
=
=
=
=
=
=
=
=
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(Read and Write property)
6.14.18
image as NSImageMBS
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The view’s image.
Notes:
A button’s image is displayed when the button is in its normal state, or all the time for a button that doesn’t
change its contents when highlighting or displaying its alternate state.
(Read and Write property)
6.14.19
imageDimsWhenDisabled as Boolean
Plugin Version: 14.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the
receivers image appears ”dim” when the button cell is disabled.
Notes:
True to indicate that the button’s image should dim when the button is disabled.
By default, all button types except NSSwitchButton and NSRadioButton do dim when disabled. When
NSSwitchButtons and NSRadioButtons are disabled, only the associated text dims. The default setting for
this condition is reasserted whenever you set ButtonType, so be sure to specify the button cells type before
you set ImageDimsWhenDisabled.
(Read and Write property)
306
6.14.20
CHAPTER 6. COCOA CONTROLS
imageHugsTitle as Boolean
Plugin Version: 16.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether image
hugs title.
Notes:
Available in macOS 10.12 and newer.
(Read and Write property)
6.14.21
imagePosition as Integer
Plugin Version: 14.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The position of the
button’s image relative to its title.
Notes:
Value can be:
NSNoImage
NSImageOnly
NSImageLeft
NSImageRight
NSImageBelow
NSImageAbove
NSImageOverlaps
0
1
2
3
4
5
6
The
The
The
The
The
The
The
cell doesnt display an image.
cell displays an image, but not a title.
image is to the left of the title.
image is to the right of the title.
image is below the title.
image is above the title.
image overlaps the title.
(Read and Write property)
6.14.22
imageScaling as Integer
Plugin Version: 14.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The scale factor for
the receivers image.
Notes:
These constants specify a cells image scaling behavior.
NSImageScaleProportionallyDown
0
NSImageScaleAxesIndependently
1
NSImageScaleNone
NSImageScaleProportionallyUpOrDown
2
3
If it is too large for the destination, scale the image down while preserving the
aspect ratio.
Scale each dimension to exactly fit destination. This setting does not preserve
the aspect ratio of the image.
Do not scale the image.
Scale the image to its maximum possible dimensions while both staying within
the destination area and preserving its aspect ratio.
6.14. CLASS NSBUTTONMBS
307
Available in OS X v10.5 and later.
(Read and Write property)
6.14.23
isBordered as boolean
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the button has a border.
Notes: (Read and Write property)
6.14.24
isTransparent as boolean
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the button is transparent.
Notes: (Read and Write property)
6.14.25
keyEquivalent as string
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The key-equivalent
character of the view.
Notes: (Read and Write property)
6.14.26
keyEquivalentModifierMask as Integer
Plugin Version: 8.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: the controls’s
keyboard equivalent modifier mask.
Example:
const
const
const
const
NSShiftKeyMask=131.072
NSControlKeyMask=262144
NSAlternateKeyMask=524288
NSCommandKeyMask=1048576
dim d as NSButtonMBS // your button
d.KeyEquivalent=”A”
d.KeyEquivalentModifierMask=NSShiftKeyMask+NSCommandKeyMask+NSAlternateKeyMask // commandoption-shift
Notes:
308
CHAPTER 6. COCOA CONTROLS
Constants for the mask:
NSAlphaShiftKeyMask = 65536
Set if Caps Lock key is pressed.
Available in Mac OS X v10.0 and later.
NSShiftKeyMask = 131072
Set if Shift key is pressed.
Available in Mac OS X v10.0 and later.
NSControlKeyMask = 262144
Set if Control key is pressed.
Available in Mac OS X v10.0 and later.
NSAlternateKeyMask = 524288
Set if Option or Alternate key is pressed.
Available in Mac OS X v10.0 and later.
NSCommandKeyMask = 1048576
Set if Command key is pressed.
Available in Mac OS X v10.0 and later.
NSNumericPadKeyMask = 2097152
Set if any key in the numeric keypad is pressed. The numeric keypad is generally on the right side of the
keyboard. This is also set if any of the arrow keys are pressed (NSUpArrowFunctionKey, NSDownArrowFunctionKey, NSLeftArrowFunctionKey, and NSRightArrowFunctionKey).
Available in Mac OS X v10.0 and later.
NSHelpKeyMask = 4194304
Set if the Help key is pressed.
Available in Mac OS X v10.0 and later.
NSFunctionKeyMask = 8388608
Set if any function key is pressed. The function keys include the F keys at the top of most keyboards (F1,
F2, and so on) and the navigation keys in the center of most keyboards (Help, Forward Delete, Home, End,
Page Up, Page Down, and the arrow keys).
Available in Mac OS X v10.0 and later.
NSDeviceIndependentModifierFlagsMask = 16777216
Used to retrieve only the device-independent modifier flags, allowing applications to mask off the devicedependent modifier flags, including event coalescing information.
Available in Mac OS X v10.4.
6.14. CLASS NSBUTTONMBS
309
(Read and Write property)
6.14.27
maxAcceleratorLevel as Integer
Plugin Version: 15.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Configures the
maximum allowed level for an NSMultiLevelAcceleratorButton, allowed values range from [ 1,5 ] .
Notes:
Defaults to 2.
Available on Mac OS X 10.10.3.
(Read and Write property)
6.14.28
showsBorderOnlyWhileMouseInside as boolean
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the view’s
border is displayed only when the cursor is over the button.
Notes:
If isBordered returns false, the border is never displayed, regardless of what this method returns.
(Read and Write property)
6.14.29
sound as Variant
Plugin Version: 14.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The sound played
when the user presses the button.
Notes:
The sound that should be played when the user presses the button. The sound is played during a mousedown event, such as NSLeftMouseDown.
Value is NSSoundMBS object.
(Read and Write property)
6.14.30
SpringLoaded as Boolean
Plugin Version: 15.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sends action on
deep-press or extended hover while dragging.
Notes:
Defaults to false.
Available on Mac OS X 10.10.3.
310
CHAPTER 6. COCOA CONTROLS
(Read and Write property)
6.14.31
state as Integer
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The state of the
button.
Notes:
This can be NSOnState (1), NSOffState (0), NSMixedState (-1).
(Read and Write property)
6.14.32
title as string
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The title displayed
on the button when it’s in its normal state.
Notes: (Read and Write property)
6.14.33
Constants
6.14.34
NSCircularBezelStyle=7
Plugin Version: 7.8. Function: One of the button styles that can be specified using bezelStyle.
Notes:
A round button with room for a small icon or a single character.
This style has both regular and small variants, but the large variant is available only in gray at this time.
6.14.35
NSDisclosureBezelStyle=5
Plugin Version: 7.8. Function: One of the button styles that can be specified using bezelStyle.
Notes:
A bezel style for use with a disclosure triangle.
To create the disclosure triangle, set the button bezel style to NSDisclosureBezelStyle and the button type
to NSOnOffButton.
6.14. CLASS NSBUTTONMBS
6.14.36
311
NSHelpButtonBezelStyle=9
Plugin Version: 7.8. Function: One of the button styles that can be specified using bezelStyle.
Notes: A round button with a question mark providing the standard help button look.
6.14.37
NSInlineBezelStyle=15
Plugin Version: 14.3. Function: One of the button styles that can be specified using bezelStyle.
Notes: Inline Style.
6.14.38
NSMomentaryChangeButton=5
Plugin Version: 7.8. Function: One of the button types that can be specified using ButtonType.
Notes:
While the button is held down, the alternate image and alternate title are displayed.
The normal image and title are displayed when the button isn’t pressed. This option is called ”Momentary
Change” in Interface Builder’s Button Inspector.
6.14.39
NSMomentaryLightButton=0
Plugin Version: 7.8. Function: One of the button types that can be specified using ButtonType.
Notes:
While the button is held down it’s shown as ”lit,” and also ”pushed in” to the screen if the button is bordered.
This type of button is best for simply triggering actions, as it doesn’t show its state; it always displays its
normal image or title. This option is called ”Momentary Light” in Interface Builder’s Button Inspector.
6.14.40
NSMomentaryPushInButton=7
Plugin Version: 7.8. Function: One of the button types that can be specified using ButtonType.
Notes:
While the button is held down it’s shown as ”lit.”
This type of button is best for simply triggering actions, as it doesn’t show its state; it always displays its
normal image or title. This option is called ”Momentary Push In” in Interface Builder’s Button Inspector.
312
6.14.41
CHAPTER 6. COCOA CONTROLS
NSOnOffButton=6
Plugin Version: 7.8. Function: One of the button types that can be specified using ButtonType.
Notes: The first click highlights the button; a second click returns it to the normal (unhighlighted) state.
6.14.42
NSPushOnPushOffButton=1
Plugin Version: 7.8. Function: One of the button types that can be specified using ButtonType.
Notes: The first click both highlights and causes the button to be ”pushed in” if the button is bordered; a
second click returns it to its normal state.
6.14.43
NSRadioButton=4
Plugin Version: 7.8. Function: One of the button types that can be specified using ButtonType.
Notes: This style is similar to NSSwitchButton, but it used to constrain a selection to a single element from
several.
6.14.44
NSRecessedBezelStyle=13
Plugin Version: 7.8. Function: One of the button styles that can be specified using bezelStyle.
Notes: A bezel style that matches the recessed buttons in Mail, Finder and Safari.
6.14.45
NSRegularSquareBezelStyle=2
Plugin Version: 7.8. Function: One of the button styles that can be specified using bezelStyle.
Notes: A rectangular button with a 2 point border, designed for icons.
6.14.46
NSRoundedBezelStyle=1
Plugin Version: 7.8. Function: One of the button styles that can be specified using bezelStyle.
Notes: A rounded rectangle button, designed for text.
6.14. CLASS NSBUTTONMBS
6.14.47
313
NSRoundedDisclosureBezelStyle=14
Plugin Version: 7.8. Function: One of the button styles that can be specified using bezelStyle.
Notes: A bezel style that matches the disclosure style used in the standard Save panel.
6.14.48
NSRoundRectBezelStyle=12
Plugin Version: 7.8. Function: One of the button styles that can be specified using bezelStyle.
Notes: A bezel style that matches the search buttons in Finder and Mail.
6.14.49
NSShadowlessSquareBezelStyle=6
Plugin Version: 7.8. Function: One of the button styles that can be specified using bezelStyle.
Notes:
Similar to NSRegularSquareBezelStyle, but has no shadow so you can abut the cells without overlapping
shadows.
This style would be used in a tool palette, for example.
6.14.50
NSSmallSquareBezelStyle=10
Plugin Version: 7.8. Function: One of the button styles that can be specified using bezelStyle.
Notes: A simple square bezel style. Buttons using this style can be scaled to any size.
6.14.51
NSSwitchButton=3
Plugin Version: 7.8. Function: One of the button types that can be specified using ButtonType.
Notes: This style is a variant of NSToggleButton that has no border and is used to represent a checkbox.
6.14.52
NSTexturedRoundedBezelStyle=11
Plugin Version: 7.8. Function: One of the button styles that can be specified using bezelStyle.
Notes: A textured (metal) bezel style similar in appearance to the Finder’s action (gear) button.
314
6.14.53
CHAPTER 6. COCOA CONTROLS
NSTexturedSquareBezelStyle=8
Plugin Version: 7.8. Function: One of the button styles that can be specified using bezelStyle.
Notes: A bezel style appropriate for use with textured (metal) windows.
6.14.54
NSThickerSquareBezelStyle=4
Plugin Version: 7.8. Function: One of the button styles that can be specified using bezelStyle.
Notes: A rectangular button with a 4 point border, designed for icons.
6.14.55
NSThickSquareBezelStyle=3
Plugin Version: 7.8. Function: One of the button styles that can be specified using bezelStyle.
Notes: A rectangular button with a 3 point border, designed for icons.
6.14.56
NSToggleButton=2
Plugin Version: 7.8. Function: One of the button types that can be specified using ButtonType.
Notes: After the first click, the button displays its alternate image or title; a second click returns the button
to its normal state.
6.15. CLASS NSCLIPVIEWMBS
6.15
class NSClipViewMBS
6.15.1
class NSClipViewMBS
315
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: An NSClipView
contains and scrolls the document view displayed by an NSScrollView.
Notes:
You normally don’t need to program with NSClipViews, as NSScrollView handles most of the details of their
operation.
An NSClipView holds the document view of an NSScrollView, clipping the document view to its frame,
handling the details of scrolling in an efficient manner, and updating the NSScrollView when the document
view’s size or position changes. You don’t normally use the NSClipView class directly; it’s provided primarily as the scrolling machinery for the NSScrollView class. However, you might use the NSClipView class to
implement a class similar to NSScrollView.
Interaction With NSScrollView
When using an NSClipView within an NSScrollView (the usual configuration), you should issue messages
that control background drawing state to the NSScrollView, rather than messaging the NSClipView directly.
This recommendation applies to the following methods:
- backgroundColor
- drawsBackground
The NSClipView methods are intended for when the NSClipView is used independently of a containing NSScrollView. In the usual case, NSScrollView should be allowed to manage the background-drawing properties
of its associated NSClipView.
There is only one background-drawing state per NSScrollView/NSClipView pair. The two objects do not
maintain independent and distinct drawsBackground and backgroundColor properties; rather, NSScrollView’s accessors for these properties largely defer to the associated NSClipView and allow the NSClipView
to maintain the state. In Mac OS X v10.2 and earlier system versions, NSScrollView maintained a cache
of the last state it set for its NSClipView. If the NSClipView was sent a setDrawsBackground: message
directly, the cache might not reflect the state accurately. This caching of state has been removed in Mac OS
X v10.3.
It is also important to note that sending a setDrawsBackground message with a parameter of false to an
NSScrollView has the added effect of sending the NSClipView a setCopiesOnScroll message with a parameter of false. The side effect of sending the setDrawsBackground message directly to the NSClipView is the
appearance of ”trails” (vestiges of previous drawing) in the document view as it is scrolled.
You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
316
CHAPTER 6. COCOA CONTROLS
Subclass of the NSViewMBS class.
6.15.2
Methods
6.15.3
autoscroll(theEvent as NSEventMBS) as boolean
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Scrolls the receiver
proportionally to theEvent’s distance outside of it.
Notes:
theEvent’s location should be expressed in the window’s base coordinate system (which it normally is), not
the receiving NSClipView’s. Returns true if any scrolling is performed; otherwise returns false.
Never invoke this method directly; instead, the NSClipView’s document view should repeatedly send itself
autoscroll: messages when the cursor is dragged outside the NSClipView’s frame during a modal event loop
initiated by a mouse-down event. The NSView class implements autoscroll to forward the message to the
receiver’s superview; thus the message is ultimately forwarded to the NSClipView.
6.15.4
constrainScrollPoint(newOrigin as NSPointMBS) as NSPointMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a scroll
point adjusted from proposedNewOrigin, if necessary, to guarantee the receiver will still lie within its document view.
Notes: For example, if proposedNewOrigin’s y coordinate lies to the left of the document view’s origin,
then the y coordinate returned is set to that of the document view’s origin.
6.15.5
Constructor
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
clipview with the given size and position.
Example:
dim x as new NSClipViewMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.
See also:
• 6.15.6 Constructor(Handle as Integer)
317
• 6.15.7 Constructor(left as Double, top as Double, width as Double, height as Double)
317
6.15. CLASS NSCLIPVIEWMBS
6.15.6
317
Constructor(Handle as Integer)
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSClipView handle.
Example:
dim t as new NSClipViewMBS(0, 0, 100, 100)
dim v as new NSClipViewMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSClipView and the plugin retains this handle.
See also:
• 6.15.5 Constructor
316
• 6.15.7 Constructor(left as Double, top as Double, width as Double, height as Double)
317
6.15.7
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
NSClipView with the given size and position.
Example:
dim x as new NSClipViewMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.
See also:
• 6.15.5 Constructor
316
• 6.15.6 Constructor(Handle as Integer)
317
6.15.8
documentRect as NSRectMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
rectangle defining the document view’s frame, adjusted to the size of the receiver if the document view is
smaller.
Notes:
In other words, this rectangle is always at least as large as the receiver itself.
318
CHAPTER 6. COCOA CONTROLS
The document rectangle is used in conjunction with an NSClipView’s bounds rectangle to determine values
for the indicators of relative position and size between the NSClipView and its document view. For example, NSScrollView uses these rectangles to set the size and position of the knobs in its scrollers. When the
document view is much larger than the NSClipView, the knob is small; when the document view is near the
same size, the knob is large; and when the document view is the same size or smaller, there is no knob.
6.15.9
documentVisibleRect as NSRectMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the exposed
rectangle of the receiver’s document view, in the document view’s own coordinate system.
Notes: Note that this rectangle doesn’t reflect the effects of any clipping that may occur above the
NSClipView itself. To get the portion of the document view that’s guaranteed to be visible, send it a
visibleRect message.
6.15.10
reflectScrolledClipView(clipView as NSClipViewMBS)
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Adjusts the receiver’s scrollers to reflect the size and positioning of its content view.
6.15.11
scrollClipView(clipview as NSClipViewMBS, toPoint as NSPointMBS)
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Notifies the superview of a clip view that the clip view needs to reset the origin of its bounds rectangle.
6.15.12
scrollToPoint(newOrigin as NSPointMBS)
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Changes the origin
of the receiver’s bounds rectangle to newOrigin.
6.15.13
viewBoundsChanged(notification as NSNotificationMBS)
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Handles an NSViewBoundsDidChangeNotification, passed in the aNotification argument, by updating a containing NSScrollView
based on the new bounds.
6.15. CLASS NSCLIPVIEWMBS
6.15.14
319
viewFrameChanged(notification as NSNotificationMBS)
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Handles an
NSViewFrameDidChangeNotification, passed in the aNotification argument, by updating a containing NSScrollView based on the new frame.
6.15.15
Properties
6.15.16
backgroundColor as NSColorMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The color of the
receiver’s background.
Notes: (Read and Write computed property)
6.15.17
copiesOnScroll as boolean
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the receiver
copies rendered images while scrolling.
Notes:
If true, the receiver copies the existing rendered image to its new location while scrolling and only draws
exposed portions of its document view. If false, the receiver always forces its document view to draw itself
on scrolling.
(Read and Write computed property)
6.15.18
documentCursor as NSCursorMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The cursor object
used over the receiver.
Notes: (Read and Write computed property)
6.15.19
documentView as NSViewMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The document view.
Notes:
Gets or sets the receiver’s document view. On set removes any previous document view, and sets the origin
of the receiver’s bounds rectangle to the origin of the new view’s frame rectangle.
320
CHAPTER 6. COCOA CONTROLS
If the receiver is contained in an NSScrollView, you should set the NSScrollView DocumentView instead, so
it can perform whatever updating it needs.
In the process of setting the document view, this method registers the receiver for the notifications NSViewFrameDidChangeNotification and NSViewBoundsDidChangeNotification, adjusts the key view loop to include the
new document view, and updates a parent NSScrollView’s display if needed using reflectScrolledClipView.
(Read and Write computed property)
6.15.20
drawsBackground as boolean
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the receiver
draws its background color.
Notes:
If your NSClipView is enclosed in an NSScrollView, you should set the DrawsBackground on the NSScrollView.
(Read and Write computed property)
6.15.21
Constants
6.15.22
NSClipViewFindBarPositionAboveContent = 1
Plugin Version: 11.3. Function: One of the constants to define the position of the find bar in relation to
the scroll view.
Notes:
The find bar is displayed above the scroll view content.
Available in Mac OS X v10.7 and later.
6.15.23
NSClipViewFindBarPositionAboveHorizontalRuler = 0
Plugin Version: 11.3. Function: One of the constants to define the position of the find bar in relation to
the scroll view.
Notes:
The find bar is displayed above the horizontal ruler, if visible.
Available in Mac OS X v10.7 and later.
6.15. CLASS NSCLIPVIEWMBS
6.15.24
321
NSClipViewFindBarPositionBelowContent = 2
Plugin Version: 11.3. Function: One of the constants to define the position of the find bar in relation to
the scroll view.
Notes:
The find bar is displayed below the scroll view content.
Available in Mac OS X v10.7 and later.
6.15.25
NSScrollElasticityAllowed = 2
Plugin Version: 11.3. Function: One of the constants to determine the elasticity behavior for an axis of
the scrollview.
Notes:
Allow content to be scrolled past its bounds on this axis in an elastic fashion.
Available in Mac OS X v10.7 and later.
6.15.26
NSScrollElasticityAutomatic = 0
Plugin Version: 11.3. Function: One of the constants to determine the elasticity behavior for an axis of
the scrollview.
Notes:
Automatically determine whether to allow elasticity on this axis.
Available in Mac OS X v10.7 and later.
6.15.27
NSScrollElasticityNone = 1
Plugin Version: 11.3. Function: One of the constants to determine the elasticity behavior for an axis of
the scrollview.
Notes:
Disallow scrolling beyond document bounds on this axis.
Available in Mac OS X v10.7 and later.
322
CHAPTER 6. COCOA CONTROLS
6.16
class NSComboBoxMBS
6.16.1
class NSComboBoxMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The ComboBox
control from Cocoa.
Notes:
An NSComboBox is a kind of NSControl that allows you to either enter text directly (as you would with
an NSTextField) or click the attached arrow at the right of the combo box and select from a displayed
(”pop-up”) list of items.
Subclass of the NSTextFieldMBS class.
6.16.2
Methods
6.16.3
addItemWithObjectValue(value as Variant)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Adds an object to
the end of the receiver’s internal item list.
Notes:
anObject: The object to add to the internal item list.
This method logs a warning if usesDataSource returns true.
6.16.4
Constructor
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
button with size 100/100 and position 0/0
Example:
dim t as new NSComboBoxMBS(0, 0, 100, 20)
Notes: On success the handle property is not zero.
See also:
• 6.16.5 Constructor(Handle as Integer)
323
• 6.16.6 Constructor(left as Double, top as Double, width as Double, height as Double)
323
6.16. CLASS NSCOMBOBOXMBS
6.16.5
323
Constructor(Handle as Integer)
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSComboBox handle.
Example:
dim t as new NSComboBoxMBS(0, 0, 100, 100)
dim v as new NSComboBoxMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSComboBox and the plugin retains this handle.
See also:
• 6.16.4 Constructor
322
• 6.16.6 Constructor(left as Double, top as Double, width as Double, height as Double)
323
6.16.6
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
combo box with the given size and position.
Example:
dim left,top,width,height as Integer
// define rectangle
dim x as new NSComboBoxMBS(left, top, width, height)
Notes: On success the handle property is not zero.
See also:
• 6.16.4 Constructor
322
• 6.16.5 Constructor(Handle as Integer)
323
6.16.7
deselectItemAtIndex(index as Integer)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Deselects the pop-up
list item at the specified index if it’s selected.
Notes:
index: The index of the item to deselect.
324
CHAPTER 6. COCOA CONTROLS
If the selection does in fact change, this method posts an NSComboBoxSelectionDidChangeNotification to
the default notification center.
6.16.8
indexOfItemWithObjectValue(value as Variant) as Integer
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Searches the
receiver’s internal item list for the specified object and returns the lowest matching index.
Notes:
anObject: The object for which to return the index.
Returns the lowest index in the internal item list whose corresponding value is equal to that of the specified
object. Objects are considered equal if they have the same id or if isEqual returns true.
If none of the objects in the receiver’s internal item list are equal to anObject, indexOfItemWithObjectValue
returns NSNotFound (-1).
This method logs a warning if usesDataSource returns true.
6.16.9
indexOfSelectedItem as Integer
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the index
of the last item selected from the pop-up list.
Notes:
Returns the index of the last item selected from the receiver’s pop-up list or -1 if no item is selected.
Note that nothing is initially selected in a newly initialized combo box.
6.16.10
noteNumberOfItemsChanged
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the number of items in its data source has changed.
Notes:
This method allows the receiver to update the scrollers in its displayed pop-up list without actually reloading data into the receiver. It is particularly useful for a data source that continually receives data in the
background over a period of time, in which case the NSComboBox can remain responsive to the user while
the data is received.
6.16. CLASS NSCOMBOBOXMBS
325
See the NSComboBoxDataSource informal protocol specification for information on the messages an NSComboBox sends to its data source.
6.16.11
numberOfItems as Integer
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the total
number of items in the pop-up list.
6.16.12
reloadData
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Marks the receiver
as needing redisplay, so that it will reload the data for visible pop-up items and draw the new values.
6.16.13
removeAllItems
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Removes all items
from the receiver’s internal item list.
Notes: This method logs a warning if usesDataSource returns true.
6.16.14
removeItemAtIndex(index as Integer)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Removes the object
at the specified location from the receiver’s internal item list.
Notes:
index: The index of the object to remove. All items beyond index are moved up one slot to fill the gap.
The removed object receives a release message. This method raises an NSRangeException if index is beyond
the end of the list and logs a warning if usesDataSource returns true.
6.16.15
removeItemWithObjectValue(value as Variant)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Removes all
occurrences of the given object from the receiver’s internal item list.
Notes:
anObject: The object to remove from the internal item list. Objects are considered equal if they have the
same id or if isEqual: returns true.
326
CHAPTER 6. COCOA CONTROLS
This method logs a warning if usesDataSource returns true.
6.16.16
scrollItemAtIndexToTop(index as Integer)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Scrolls the receiver’s
pop-up list vertically so that the item at the specified index is as close to the top as possible.
Notes:
index: The index of the item to scroll to the top.
The pop-up list need not be displayed at the time this method is invoked.
6.16.17
scrollItemAtIndexToVisible(index as Integer)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Scrolls the receiver’s
pop-up list vertically so that the item at the specified index is visible.
Notes:
index: The index of the item to make visible.
The pop-up list need not be displayed at the time this method is invoked.
6.16.18
selectItemAtIndex(index as Integer)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Selects the pop-up
list row at the given index.
Notes:
index: The index of the item to select in the pop-up list.
Posts an NSComboBoxSelectionDidChangeNotification to the default notification center if the selection does
in fact change. Note that this method does not alter the contents of the combo box’s text fieldsee Setting
the Combo Box’s Value for more information.
6.16.19
selectItemWithObjectValue(value as Variant)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Selects the first
pop-up list item that corresponds to the given object.
6.16. CLASS NSCOMBOBOXMBS
327
Notes:
anObject: The object to select in the pop-up list. Objects are considered equal if they have the same id or
if isEqual: returns true.
This method logs a warning if usesDataSource returns true. Posts an NSComboBoxSelectionDidChangeNotification to the default notification center if the selection does in fact change. Note that this method doesn’t
alter the contents of the combo box’s text fieldsee Setting the Combo Box’s Value for more information.
6.16.20
Properties
6.16.21
completes as boolean
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value indicating whether the receiver tries to complete what the user types in the text field.
Notes:
Returns true if the receiver tries to complete what the user types in the text field; otherwise false.
(Read and Write computed property)
6.16.22
hasVerticalScroller as boolean
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value indicating whether the receiver will display a vertical scroller.
Notes:
Returns true if the receiver will display a vertical scroller; otherwise false.
Note that the scroller will be displayed even if the pop-up list contains fewer items than will fit in the area
specified for display.
(Read and Write computed property)
6.16.23
intercellSpacing as NSSizeMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
horizontal and vertical spacing between cells in the receiver’s pop-up list.
Notes:
Returns the space between cells in the pop-up list. The default spacing is (3.0, 2.0).
(Read and Write computed property)
328
6.16.24
CHAPTER 6. COCOA CONTROLS
isButtonBordered as boolean
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the combo
box button is set to display a border.
Notes:
True if the button has a border; otherwise false.
Available in Mac OS X v10.3 and later
(Read and Write computed property)
6.16.25
itemHeight as Double
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the height
of each item in the receiver’s pop-up list.
Notes:
The default item height is 16.0.
(Read and Write computed property)
6.16.26
numberOfVisibleItems as Integer
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
maximum number of items visible in the pop-up list.
Notes:
The maximum number of items visible at any one time in the pop-up list.
(Read and Write computed property)
6.16.27
usesDataSource as boolean
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the receiver uses an external data source to populate its pop-up list.
Notes:
True if the receiver uses an external data source to populate the receiver’s pop-up list, false if it uses an
internal item list.
(Read and Write computed property)
6.17. CONTROL NSDATEPICKERCONTROLMBS
6.17
control NSDatePickerControlMBS
6.17.1
control NSDatePickerControlMBS
329
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control to put
a Mac OS X date picker on a Xojo window.
Notes:
This control embeds a special NSDatePicker subclass.
Designed for Xojo 2013r1 and newer. May work on Real Studio 2012, but not perfectly.
Please use view property to access the underlaying object and set properties.
6.17.2
Properties
6.17.3
View as NSDatePickerMBS
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The reference to the
underlaying NSDatePicker.
Notes: (Read only property)
6.17.4
Events
6.17.5
Action
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event is called
when user clicks on a date/time and changes something.
6.17.6
BoundsChanged
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the bounds, but not the frame, changed.
6.17.7
EnableMenuItems
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: Yes, Linux: Yes. Function: The event where
you can enable menu items.
330
6.17.8
CHAPTER 6. COCOA CONTROLS
FrameChanged
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the frame changed.
6.17.9
GotFocus
Plugin Version: 16.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control itself
got focus.
Notes: This only fires if the control itself got focus and not a sub control.
6.17.10
LostFocus
Plugin Version: 16.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control lost
focus.
Notes: This only fires if the control itself lost focus and not a sub control.
6.17.11
MenuAction(HitItem as MenuItem) As Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when a
menuitem is choosen.
Notes: This allows the control to react on its relevant menu items. Please return true if you handled it or
false to give others a chance.
6.17.12
MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The mouse button
was pressed inside the controls region at the location passed in to x, y.
Notes:
The coordinates x and y are local to the control, i.e. they represent the position of the mouse click relative
to the upper-left corner or the Control.
Return True if you are going to handle the MouseDown. In such a case:
• The Action event, if any, will not execute and the state of the object will not change.
• You will receive the MouseDrag and MouseUp events.
If you return False, the system handles the MouseDown so the above event handlers do not get called.
6.17. CONTROL NSDATEPICKERCONTROLMBS
6.17.13
331
MouseDrag(x as Integer, y as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event fires
continuously after the mouse button was pressed inside the Control.
Notes:
Mouse location is local to the control passed in to x, y.
As this event is fired continuously (hundreds of time per second), it is your responsibility to determine if the
mouse has really moved.
6.17.14
MouseUp(x as Integer, y as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The mouse button
was released.
Notes: Use the x and y parameters to determine if the mouse button was released within the control’s
boundaries.
6.17.15
ScaleFactorChanged(NewFactor as Double)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The backing store
scale factor has changed.
Notes: Please invalidate any cached bitmaps or other relevant state.
332
CHAPTER 6. COCOA CONTROLS
6.18
class NSDatePickerMBS
6.18.1
class NSDatePickerMBS
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The plugin class for
a Cocoa date picker.
Notes:
NSDatePicker is a subclass of NSControl that provides a user interface for displaying and editing an NSDate
object.
Subclass of the NSControlMBS class.
6.18.2
Methods
6.18.3
Constructor
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new date
picker with size 100/100 and position 0/0
Example:
dim t as new NSDatePickerMBS
Notes: On success the handle property is not zero.
See also:
• 6.18.4 Constructor(Handle as Integer)
332
• 6.18.5 Constructor(left as Double, top as Double, width as Double, height as Double)
333
6.18.4
Constructor(Handle as Integer)
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSDatePicker handle.
Example:
dim t as new NSDatePickerMBS(0, 0, 100, 100)
dim v as new NSDatePickerMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSDatePicker and the plugin retains this handle.
See also:
6.18. CLASS NSDATEPICKERMBS
333
• 6.18.3 Constructor
332
• 6.18.5 Constructor(left as Double, top as Double, width as Double, height as Double)
333
6.18.5
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new date
picker with the given size and position.
Example:
dim x as new NSDatePickerMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.
See also:
• 6.18.3 Constructor
332
• 6.18.4 Constructor(Handle as Integer)
332
6.18.6
Properties
6.18.7
backgroundColor as NSColorMBS
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The background
color.
Notes:
See also drawsBackground property.
(Read and Write computed property)
6.18.8
Bezeled as Boolean
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the receiver
has a bezeled border.
Notes:
True if the receiver has a bezeled border, false otherwise.
(Read and Write computed property)
334
6.18.9
CHAPTER 6. COCOA CONTROLS
Bordered as Boolean
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the receiver
has a plain border.
Notes:
True if the receiver has a plain border, false otherwise.
(Read and Write computed property)
6.18.10
calendar as NSCalendarMBS
Plugin Version: 13.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The calendar.
Notes: (Read and Write computed property)
6.18.11
datePickerElements as Integer
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A bitmask that
indicates which visual elements of the date picker are currently shown, and which won’t be usable because
they are hidden.
Notes: (Read and Write computed property)
6.18.12
datePickerMode as Integer
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The date picker
mode.
Notes: (Read and Write computed property)
6.18.13
datePickerStyle as Integer
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The date picker
style.
Notes: (Read and Write computed property)
6.18.14
dateValue as date
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The current date
value.
6.18. CLASS NSDATEPICKERMBS
335
Notes: (Read and Write computed property)
6.18.15
drawsBackground as Boolean
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the receiver
draws the background.
Notes:
True if the receiver draws the background, false otherwise.
(Read and Write computed property)
6.18.16
locale as NSLocaleMBS
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The locale.
Notes: (Read and Write computed property)
6.18.17
maxDate as date
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The maximum date.
Notes:
nil indicates no maximum date.
(Read and Write computed property)
6.18.18
minDate as date
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The minimum date.
Notes:
nil indicates no minimum date.
(Read and Write computed property)
6.18.19
textColor as NSColorMBS
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The text color.
Notes: (Read and Write computed property)
336
6.18.20
CHAPTER 6. COCOA CONTROLS
timeInterval as Double
Plugin Version: 12.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The time interval
that represents the date range.
Notes:
The time interval that represents the receiver’s date range. The date range begins at the date returned by
dateValue. This method returns 0 when the receiver is not in the NSRangeDateMode mode.
(Read and Write computed property)
6.18.21
timeZone as NSTimeZoneMBS
Plugin Version: 13.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The time zone.
Notes: (Read and Write computed property)
6.18.22
Constants
6.18.23
NSClockAndCalendarDatePickerStyle = 1
Plugin Version: 12.2. Function: A constants for a date picker style.
Notes: Provide a visual clock and calendar style interface.
6.18.24
NSEraDatePickerElementFlag = & h100
Plugin Version: 12.2. Function: One of the constants which allows you to specify the date and time
elements.
Notes:
Display and allow editing of the era of the date, if applicable.
This flag has been declared for possible future use, and does not yet have any effect.
6.18.25
NSHourMinuteDatePickerElementFlag = & hC
Plugin Version: 12.2. Function: One of the constants which allows you to specify the date and time elements.
Notes: Display and allow editing of the hour and minute elements of the date.
6.18. CLASS NSDATEPICKERMBS
6.18.26
337
NSHourMinuteSecondDatePickerElementFlag = & hE
Plugin Version: 12.2. Function: One of the constants which allows you to specify the date and time elements.
Notes: Display and allow editing of the hour, minute and second elements of the date.
6.18.27
NSRangeDateMode = 1
Plugin Version: 12.2. Function: One of the constants to define whether the control provides a single date,
or a range of dates.
Notes: Allow selection of a range of dates. (First implemented in Mac OS X v 10.5.)
6.18.28
NSSingleDateMode = 0
Plugin Version: 12.2. Function: One of the constants to define whether the control provides a single date,
or a range of dates.
Notes: Allow selection of a single date.
6.18.29
NSTextFieldAndStepperDatePickerStyle = 0
Plugin Version: 12.2. Function: A constants for a date picker style.
Notes: Provide a text field and stepper style interface.
6.18.30
NSTextFieldDatePickerStyle = 2
Plugin Version: 12.2. Function: A constants for a date picker style.
Notes: Provide a text field interface.
6.18.31
NSTimeZoneDatePickerElementFlag = & h10
Plugin Version: 12.2. Function: One of the constants which allows you to specify the date and time
elements.
Notes:
Display and allow editing of the time zone.
This flag has been declared for possible future use, and does not yet have any effect.
338
6.18.32
CHAPTER 6. COCOA CONTROLS
NSYearMonthDatePickerElementFlag = & hC0
Plugin Version: 12.2. Function: One of the constants which allows you to specify the date and time elements.
Notes: Display and allow editing of the year and month elements of the date.
6.18.33
NSYearMonthDayDatePickerElementFlag = & hE0
Plugin Version: 12.2. Function: One of the constants which allows you to specify the date and time elements.
Notes: Display and allow editing of the year, month and day elements of the date.
6.19. CLASS NSIMAGEVIEWMBS
6.19
class NSImageViewMBS
6.19.1
class NSImageViewMBS
339
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: An NSImageView
object displays a single image from an NSImage object in a frame and can optionally allow a user to drag
an image to it.
Example:
ImageWell1.NSImageViewMBS.alphaValue = 0.5
Notes:
You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSControlMBS class.
6.19.2
Methods
6.19.3
Constructor
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
imageview with size 100/100 and position 0/0
Example:
dim t as new NSImageViewMBS
Notes: On success the handle property is not zero.
See also:
• 6.19.4 Constructor(Handle as Integer)
339
• 6.19.5 Constructor(left as Double, top as Double, width as Double, height as Double)
340
6.19.4
Constructor(Handle as Integer)
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSImageView handle.
Example:
dim t as new NSImageViewMBS(0, 0, 100, 100)
dim v as new NSImageViewMBS(t.handle)
340
CHAPTER 6. COCOA CONTROLS
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSImageView and the plugin retains this handle.
See also:
• 6.19.3 Constructor
339
• 6.19.5 Constructor(left as Double, top as Double, width as Double, height as Double)
340
6.19.5
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
image view with the given size and position.
Example:
dim x as new NSImageViewMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.
See also:
• 6.19.3 Constructor
339
• 6.19.4 Constructor(Handle as Integer)
339
6.19.6
Properties
6.19.7
allowsCutCopyPaste as Boolean
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the receiver
allows the user to cut, copy and paste the image contents.
Notes:
True if the user can cut, copy, and paste the image contents; otherwise, false to prevent the use of pasteboard
operations.
(Read and Write computed property)
6.19.8
animates as Boolean
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the receiver automatically plays animated images.
Notes:
6.19. CLASS NSIMAGEVIEWMBS
341
True if the receiver automatically plays animated images; otherwise, false. The default value is true for
NSImageView objects you create programmatically. For NSImageView objects loaded from a nib file, the
control takes the value set in Interface Builder.
The timing and looping characteristics of the animation are taken from the image data. If this method
returns false, the receiver displays the first frame of the animation only.
(Read and Write computed property)
6.19.9
image as NSImageMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the NSImage object displayed by the receiver.
Notes: (Read and Write computed property)
6.19.10
imageAlignment as Integer
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The alignment of
the receiver’s image relative to its frame.
Notes:
For a list of possible values, see NSImageAlign* constants. The default value is NSImageAlignCenter.
(Read and Write computed property)
6.19.11
imageFrameStyle as Integer
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The style of the
frame that borders the image.
Example:
ImageWell1.NSImageViewMBS.imageFrameStyle = NSImageViewMBS.NSImageFramePhoto
Notes:
Value is one of the frame style constants. For a list of frame styles, see NSImageFrame* constants.
(Read and Write computed property)
342
6.19.12
CHAPTER 6. COCOA CONTROLS
imageScaling as Integer
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The scaling mode
used to fit the receiver’s image into the frame.
Example:
ImageWell1.NSImageViewMBS.imageScaling = NSImageViewMBS.NSScaleNone
Notes:
Value is one of the image scaling constants. For a list of possible values, see NSScale* constants.
(Read and Write computed property)
6.19.13
isEditable as Boolean
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the user
can drag a new image into the frame.
Notes:
True if the user can drag an image into the receiver’s frame; otherwise, false.
(Read and Write computed property)
6.19.14
Constants
6.19.15
NSImageAlignBottom = 5
Plugin Version: 10.0. Function: One of the constants to specify the location of the image in the frame
using the imageAlignment property.
Notes: Align the image with the bottom edge of the cell.
6.19.16
NSImageAlignBottomLeft = 6
Plugin Version: 10.0. Function: One of the constants to specify the location of the image in the frame
using the imageAlignment property.
Notes: Align the image with the bottom and left edges of the cell.
6.19. CLASS NSIMAGEVIEWMBS
6.19.17
343
NSImageAlignBottomRight = 7
Plugin Version: 10.0. Function: One of the constants to specify the location of the image in the frame
using the imageAlignment property.
Notes: Align the image with the bottom and right edges of the cell.
6.19.18
NSImageAlignCenter = 0
Plugin Version: 10.0. Function: One of the constants to specify the location of the image in the frame
using the imageAlignment property.
Notes: Center the image in the cell.
6.19.19
NSImageAlignLeft = 4
Plugin Version: 10.0. Function: One of the constants to specify the location of the image in the frame
using the imageAlignment property.
Notes: Align the image with the left edge of the cell.
6.19.20
NSImageAlignRight = 8
Plugin Version: 10.0. Function: One of the constants to specify the location of the image in the frame
using the imageAlignment property.
Notes: Position the image along the right edge of the cell.
6.19.21
NSImageAlignTop = 1
Plugin Version: 10.0. Function: One of the constants to specify the location of the image in the frame
using the imageAlignment property.
Notes: Position the image along the top edge of the cell.
6.19.22
NSImageAlignTopLeft = 2
Plugin Version: 10.0. Function: One of the constants to specify the location of the image in the frame
using the imageAlignment property.
Notes: Align the image with the top and left edges of the cell.
344
6.19.23
CHAPTER 6. COCOA CONTROLS
NSImageAlignTopRight = 3
Plugin Version: 10.0. Function: One of the constants to specify the location of the image in the frame
using the imageAlignment property.
Notes: Align the image with the top and right edges of the cell.
6.19.24
NSImageFrameButton = 4
Plugin Version: 10.0. Function: One of the frame constants for the imageFrameStyle property.
Notes: A convex bezel that makes the image stand out in relief, like a button
6.19.25
NSImageFrameGrayBezel = 2
Plugin Version: 10.0. Function: One of the frame constants for the imageFrameStyle property.
Notes: A gray, concave bezel that makes the image look sunken
6.19.26
NSImageFrameGroove = 3
Plugin Version: 10.0. Function: One of the frame constants for the imageFrameStyle property.
Example:
ImageWell1.NSImageViewMBS.imageFrameStyle = NSImageViewMBS.NSImageFrameGroove
Notes: A thin groove that looks etched around the image
6.19.27
NSImageFrameNone = 0
Plugin Version: 10.0. Function: One of the frame constants for the imageFrameStyle property.
Notes: An invisible frame
6.19.28
NSImageFramePhoto = 1
Plugin Version: 10.0. Function: One of the frame constants for the imageFrameStyle property.
Notes: A thin black outline and a dropped shadow
6.19. CLASS NSIMAGEVIEWMBS
6.19.29
NSScaleNone = 2
Plugin Version: 10.0. Function: One of the scale constants.
6.19.30
NSScaleProportionally = 0
Plugin Version: 10.0. Function: One of the scale constants.
6.19.31
NSScaleToFit = 1
Plugin Version: 10.0. Function: One of the scale constants.
345
346
CHAPTER 6. COCOA CONTROLS
6.20
control NSOutlineControlMBS
6.20.1
control NSOutlineControlMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control for a
NSOutlineView.
Notes: Please use NSOutlineControlMBS for hierarchical lists and NSTableControlMBS for normal lists.
6.20.2
Properties
6.20.3
AcceptTabs as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether the control
should accept tab keys.
Notes:
If true, the plugin will not forward the tab keydown/keyup events to Xojo, because Xojo would do switch
to next control.
(Read and Write property)
6.20.4
allowsColumnReordering as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the table view allows the user to rearrange columns by dragging their headers.
Notes:
The default value of this property is true, which allows the user to rearrange the table views columns. You
can rearrange columns programmatically regardless of this setting.
(Read and Write property)
6.20.5
allowsColumnResizing as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the table view allows the user to resize columns by dragging between their headers.
Notes:
The default of this property is true, which allows the user to resize the table views columns. You can resize
columns programmatically regardless of this setting.
(Read and Write property)
6.20. CONTROL NSOUTLINECONTROLMBS
6.20.6
347
allowsColumnSelection as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the table view allows the user to select columns by clicking their headers.
Notes:
The default is false, which prevents the user from selecting columns (if you create the table view in Interface
Builder, the default value is true). You can select columns programmatically regardless of this setting.
(Read and Write property)
6.20.7
allowsEmptySelection as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the table view allows the user to select zero columns or rows.
Notes:
The default is true, which allows the user to select zero columns or rows.
(Read and Write property)
6.20.8
allowsMultipleSelection as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the table view allows the user to select more than one column or row at a time.
Notes:
The default is false, which allows the user to select only one column or row at a time. You can select multiple
columns or rows programmatically regardless of this setting.
(Read and Write property)
6.20.9
autohidesScrollers as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean that
indicates whether the scroll view automatically hides its scroll bars when they are not needed.
Notes:
The horizontal and vertical scroll bars are hidden independently of each other. When the value of this
property is YES and the content of the scroll view doesn’t extend beyond the size of the clip view on a given
axis, the scroller on that axis is removed to leave more room for the content.
(Read and Write property)
348
6.20.10
CHAPTER 6. COCOA CONTROLS
hasHorizontalScroller as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean that
indicates whether the scroll view has a horizontal scroller.
Notes:
When the value of this property is true, the scroll view allocates and displays a horizontal scroller as needed.
The default value of this property is false.
(Read and Write property)
6.20.11
hasVerticalScroller as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean that
indicates whether the scroll view has a vertical scroller.
Notes:
When the value of this property is true, the scroll view allocates and displays a vertical scroller as needed.
The default value of this property is false.
(Read and Write property)
6.20.12
ScrollView as NSScrollViewMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The scroll view used
in this control.
Notes: (Read only property)
6.20.13
View as NSOutlineViewMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The outline view
used in this control.
Notes: (Read only property)
See also:
• 6.20.90 view(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS) as NSViewMBS
371
6.20. CONTROL NSOUTLINECONTROLMBS
349
6.20.14
Events
6.20.15
acceptDrop(info as NSDraggingInfoMBS, item as NSOutlineViewItemMBS,
index as Integer) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether a drop operation was successful.
Notes:
info: An object that contains more information about this dragging operation.
item: The parent of the item over which the cursor was placed when the mouse button was released.
index: The index of the child of item over which the cursor was placed when the mouse button was released.
Return true if the drop operation was successful, otherwise false.
The data source should incorporate the data from the dragging pasteboard in the implementation of this
method. You can get the data for the drop operation from info using the draggingPasteboard method.
The return value indicates success or failure of the drag operation to the system.
6.20.16
BoundsChanged
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the bounds, but not the frame, changed.
6.20.17
childOfItem(index as Integer, item as NSOutlineViewItemMBS) as NSOutlineViewItemMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the child
item at the specified index of a given item.
Notes:
index: The index of the child item from item to return.
item: An item in the data source.
Return the child item at index of item. If item is nil, returns the appropriate child item of the root object.
Children of a given parent item are accessed sequentially. In order for the collapsed state of the outline view
to remain consistent when it is reloaded you must always return the same object for a specified child and item.
Do not call reloadData from this method.
350
CHAPTER 6. COCOA CONTROLS
This event is called very frequently, so it must be efficient.
6.20.18
ColumnDidMove(notification as NSNotificationMBS, OldColumn as Integer, NewColumn as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked whenever
the user moves a column in the outline view.
6.20.19
ColumnDidResize(notification as NSNotificationMBS, tableColumn as
NSTableColumnMBS, OldWidth as Double)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked whenever
the user resizes a column in the outline view.
6.20.20
concludeDragOperation(info as NSDraggingInfoMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging operation is complete, signaling the receiver to perform any necessary clean-up.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
For this method to be invoked, the previous performDragOperation must have returned true.
The destination implements this method to perform any tidying up that it needs to do, such as updating its
visual representation now that it has incorporated the dragged data. This message is the last message sent
from sender to the destination during a dragging session.
If the sender object’s animatesToDestination property was set to true in prepareForDragOperation, then the
drag image is still visible. At this point you should draw the final visual representation in the view. When
this method returns, the drag image is removed form the screen. If your final visual representation matches
the visual representation in the drag, this is a seamless transition.
6.20.21
dataCell(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS)
as NSCellMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the cell to
use in a given column for a given item.
6.20. CONTROL NSOUTLINECONTROLMBS
351
Notes:
tableColumn: The table column for which the cell is required. This value may be nil.
item: The item for which the cell is required.
Return the cell to use in column tableColumn for item item, or nil. The cell must properly implement
copyWithZone (since it may be copied by by the outline view).
You can return a different data cell for any particular combination of table column and item, or a cell that
will be used for the entire row (a full-width cell). If tableColumn is non-nil, you should return a cell. Typically, you should default to returning the result from [ tableColumn dataCellForRow:row ] .
When each row (identified by the item) is being drawn, this method is first called with a nil value for
tableColumn. At this time, you can return a cell that is used to draw the entire row, acting like a group. If
you do return a cell for the nil table column, your implementations of the other corresponding data source
and delegate methods must be prepared to be invoked with a nil value for tableColumn. If do not return a
cell for the nil table column, the method is called once for each column in the outline view, as usual.
6.20.22
didAddRowView(rowView as NSTableRowViewMBS, row as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implemented to
know when a new row view is added to the table.
Notes:
rowView: The new row view.
row: The row to which the view was added.
This evemt is for NSView-based outline views. At this point, you can choose to add in extra views or modify
any properties on rowView.
6.20.23
didClickTableColumn(tableColumn as NSTableColumnMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent at the time the
mouse button subsequently goes up in outlineView and tableColumn has been clicked without having been
dragged anywhere.
6.20.24
didDragTableColumn(tableColumn as NSTableColumnMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent at the time the
mouse button goes up in outlineView and tableColumn has been dragged during the time the mouse button
was down.
352
6.20.25
CHAPTER 6. COCOA CONTROLS
didRemoveRowView(rowView as NSTableRowViewMBS, row as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implemented to
know when a row view is removed from the table
Notes:
rowView: The row view that was removed.
row: The number of the row that was removed due to being moved offscreen, or -1 if the row was removed
from the table so it is no longer valid.
The removed rowView may be reused by the table, so any additionally inserted views should be removed at
this point.
6.20.26
didTile
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The tableview did
tile.
Notes: The internal tile function properly sizes the table view and its header view and marks it as needing
display.
6.20.27
DoubleClick
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The mouse made a
double click.
6.20.28
draggingEnded(info as NSDraggingInfoMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
event to be notified when a drag operation ends in some other destination.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
This method might be used by a destination doing auto-expansion in order to collapse any auto-expands.
6.20.29
draggingExited(info as NSDraggingInfoMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragged image enters destination bounds or frame; delegate returns dragging operation to perform.
Notes:
6.20. CONTROL NSOUTLINECONTROLMBS
353
sender: The object sending the message; use it to get details about the dragging operation.
Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is
the value returned by the previous draggingEntered message.
Invoked when a dragged image enters the destination but only if the destination has registered for the pasteboard data type involved in the drag operation. Specifically, this method is invoked when the mouse pointer
enters the destination’s bounds rectangle (if it is a view object) or its frame rectangle (if it is a window object).
This method must return a value that indicates which dragging operation the destination will perform when
the image is released. In deciding which dragging operation to return, the method should evaluate the
overlap between both the dragging operations allowed by the source (obtained from sender with the draggingSourceOperationMask method) and the dragging operations and pasteboard data types the destination
itself supports.
If none of the operations is appropriate, this method should return NSDragOperationNone (this is the default
response if the method is not implemented by the destination). A destination will still receive draggingUpdated and draggingExited even if NSDragOperationNone is returned by this method.
6.20.30
draggingSessionEnded(session as NSDraggingSessionMBS, screenPoint
as NSPointMBS, operation as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
method to know when the given dragging session has ended.
Notes:
session: The dragging session that ended.
screenPoint: The point onscreen at which the drag ended.
operation: A mask specifying the types of drag operations permitted by the dragging source.
You can implement this optional delegate method to know when the dragging source operation ended at a
specific location, such as the trash (by checking for an operation of NSDragOperationDelete).
6.20.31
draggingSessionWillBegin(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, draggedItems() as NSOutlineViewItemMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
method know when the given dragging session is about to begin and potentially modify the dragging session.
Notes:
354
CHAPTER 6. COCOA CONTROLS
session: The dragging session that is about to begin.
screenPoint: The point onscreen at which the drag is to begin.
draggedItems: A array of items to be dragged, excluding items for which pasteboardWriterForItem returns
nil.
The draggedItems array directly matches the pasteboard writer array used to begin the dragging session
with the NSView method beginDraggingSessionWithItems. Hence, the order is deterministic, and can be
used in acceptDrop when enumerating the NSDraggingInfo protocol’s pasteboard classes.
6.20.32
EnableMenuItems
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event where
you can enable menu items.
6.20.33
FrameChanged
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the frame changed.
6.20.34
GotFocus
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control itself
got focus.
Notes: This only fires if the control itself got focus and not a sub control.
6.20.35
heightOfRowByItem(item as NSOutlineViewItemMBS) as Double
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the height
in points of the row containing item.
Notes:
item: The row item.
Return the height of the row.
Values returned by this method should not include intercell spacing and must be greater than 0.
Implement this event to support an outline view with varying row heights.
6.20. CONTROL NSOUTLINECONTROLMBS
355
For large tables in particular, you should make sure that this method is efficient. NSOutlineView may cache
the values this method returns, so if you would like to change a row’s height make sure to invalidate the
row height by calling noteHeightOfRowsWithIndexesChanged. NSOutlineView automatically invalidates its
entire row height cache in reloadData and noteNumberOfRowsChanged.
If you call viewAtColumn or rowViewAtRow within your implementation of this method, an exception is
thrown.
To avoid the possibility of a hang due to unexpected recursion, dont call geometry-calculating methods such
as bounds, rectOfColumn, or any NSTableView method that calls tile within your implementation of this
method.
6.20.36
isGroupItem(item as NSOutlineViewItemMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
that indicates whether a given row should be drawn in the group row style.
Notes:
item: An item in the outline view.
Return true to indicate a particular row should have the ”group row” style drawn for that row, otherwise false.
If the cell in that row is an instance of NSTextFieldCell and contains only a string value, the group row style
attributes are automatically applied for that cell.
6.20.37
isItemExpandable(item as NSOutlineViewItemMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether the a given item is expandable.
Notes:
item: An item in the data source.
Returns true if item can be expanded to display its children, otherwise NO.
This method may be called quite often, so it must be efficient.
Do not call reloadData from this method.
356
6.20.38
CHAPTER 6. COCOA CONTROLS
ItemDidCollapse(notification as NSNotificationMBS, item as NSOutlineViewItemMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
did collapse notification is postedthat is, whenever the user collapses an item in the outline view.
6.20.39
ItemDidExpand(notification as NSNotificationMBS, item as NSOutlineViewItemMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when
notification is postedthat is, whenever the user expands an item in the outline view.
6.20.40
itemForPersistentObject(PersistentObject as Variant) as NSOutlineViewItemMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked by
outlineView to return the item for the archived object.
Notes:
object: An archived representation of an item in outlineView’s data source.
Return the unarchived item corresponding to object. If the item is an archived object, this method may
return the object.
When the outline view is restoring the saved expanded items, this method is called for each expanded item,
to translate the archived object to an outline view item.
You must implement this method if you are automatically saving expanded items (that is, if autosaveExpandedItems returns true).
6.20.41
ItemWillCollapse(notification as NSNotificationMBS, item as NSOutlineViewItemMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when
notification is postedthat is, whenever the user is about to collapse an item in the outline view.
6.20. CONTROL NSOUTLINECONTROLMBS
6.20.42
357
ItemWillExpand(notification as NSNotificationMBS, item as NSOutlineViewItemMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when
notification is postedthat is, whenever the user is about to expand an item in the outline view.
6.20.43
LeftMouseDown(e as NSEventMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has pressed the left mouse button.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.20.44
LeftMouseDragged(e as NSEventMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has moved the mouse with the left button pressed.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.20.45
LeftMouseUp(e as NSEventMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has released the left mouse button.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.20.46
LostFocus
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control lost
focus.
Notes: This only fires if the control itself lost focus and not a sub control.
6.20.47
MenuAction(HitItem as MenuItem) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when a
menuitem is choosen.
358
CHAPTER 6. COCOA CONTROLS
Notes: This allows the control to react on its relevant menu items. Please return true if you handled it or
false to give others a chance.
6.20.48
MouseDown(x as Integer, y as Integer, Modifiers as Integer) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The mouse button
was pressed inside the controls region at the location passed in to x, y.
Notes:
The coordinates x and y are local to the control, i.e. they represent the position of the mouse click relative
to the upper-left corner or the Control.
Return True if you are going to handle the MouseDown. In such a case:
• The Action event, if any, will not execute and the state of the object will not change.
• You will receive the MouseDrag and MouseUp events.
If you return False, the system handles the MouseDown so the above event handlers do not get called.
6.20.49
mouseDownInHeaderOfTableColumn(tableColumn as NSTableColumnMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Event sent whenever
the mouse button is clicked in outlineView while the cursor is in a column header tableColumn.
6.20.50
MouseDrag(x as Integer, y as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event fires
continuously after the mouse button was pressed inside the Control.
Notes:
Mouse location is local to the control passed in to x, y.
As this event is fired continuously (hundreds of time per second), it is your responsibility to determine if the
mouse has really moved.
6.20.51
MouseUp(x as Integer, y as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The mouse button
was released.
6.20. CONTROL NSOUTLINECONTROLMBS
359
Notes: Use the x and y parameters to determine if the mouse button was released within the control’s
boundaries.
6.20.52
namesOfPromisedFilesDroppedAtDestination(dropDestination as folderItem,
DraggedItems() as NSOutlineViewItemMBS) as string()
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns an array of
filenames for the created files that the receiver promises to create.
Notes:
dropDestination: The drop location where the files are created.
items: The items being dragged.
Returns an array of filenames (not full paths) for the created files that the receiver promises to create.
For more information on file promise dragging, see documentation on the NSDraggingSource protocol and
namesOfPromisedFilesDroppedAtDestination.
6.20.53
nextTypeSelectMatchFromItem(startItem as NSOutlineViewItemMBS,
endItem as NSOutlineViewItemMBS, searchString as String) as NSOutlineViewItemMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the first
item that matches the searchString from within the range of startItem to endItem.
Notes:
startItem: The first item to search.
endItem: The item before which to stop searching. It is possible for endItem to be less than startItem if the
search will wrap.
searchString: The string for which to search.
Returns the first itemfrom within the range of startItem to endItemthat matches the searchString, or nil if
there is no match.
Implement this method if you want to control how type selection works. You should include startItem as a
possible match, but do not include endItem.
It is not necessary to implement this event in order to support type select.
360
6.20.54
CHAPTER 6. COCOA CONTROLS
numberOfChildrenOfItem(item as NSOutlineViewItemMBS) as Integer
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the number
of child items encompassed by a given item.
Notes:
item: An item in the data source.
Returns the number of child items encompassed by item. If item is nil, this method should return the number
of children for the top-level item.
The numberOfChildrenOfItem method is called very frequently, so it must be efficient.
Do not call reloadData from this method.
6.20.55
objectValue(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMB
as Variant
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked by
outlineView to return the data object associated with the specified item.
Notes:
tableColumn: A column in outlineView.
item: An item in the data source in the specified tableColumn of the view.
Returns the item is located in the specified tableColumn of the view.
Do not call reloadData from this method.
6.20.56
OtherMouseDown(e as NSEventMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has pressed a mouse button other than the left or right one.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.20. CONTROL NSOUTLINECONTROLMBS
6.20.57
361
OtherMouseDragged(e as NSEventMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has moved the mouse with a button other than the left or right button pressed.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.20.58
OtherMouseUp(e as NSEventMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has released a mouse button other than the left or right button.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.20.59
pasteboardWriterForItem(item as NSOutlineViewItemMBS) as NSPasteboardItemMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
method to enable the table to be an NSDraggingSource that supports dragging multiple items.
Notes:
item: The item for which to return a pasteboard writer.
Returns a NSPasteboardItem object.
If this method is implemented, then writeItems is not called.
6.20.60
persistentObjectForItem(item as NSOutlineViewItemMBS) as Variant
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked by
outlineView to return an archived object for item.
Notes:
item: The item for which to return an archived object.
Returns an archived representation of item. If the item is an archived object, this method may return the
item.
When the outline view is saving the expanded items, this method is called for each expanded item, to translate the outline view item to an archived object.
362
CHAPTER 6. COCOA CONTROLS
You must implement this method if you are automatically saving expanded items (that is, if autosaveExpandedItems returns true).
6.20.61
RightMouseDown(e as NSEventMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the view
that the user has pressed the right mouse button.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.20.62
RightMouseDragged(e as NSEventMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has moved the mouse with the right button pressed .
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.20.63
RightMouseUp(e as NSEventMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has released the right mouse button.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.20.64
rowViewForItem(item as NSOutlineViewItemMBS) as NSTableRowViewMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
method to return a custom NSTableRowView for a particular item.
Notes:
item: The item displayed by the returned table row view.
Return an instance or subclass of NSTableRowView. If nil is returned, a NSTableRowView instance is created and used.
This method, if implemented, is only invoked for NSView-based outline views.
6.20. CONTROL NSOUTLINECONTROLMBS
6.20.65
363
ScaleFactorChanged(NewFactor as Double)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The backing store
scale factor has changed.
Notes: Please invalidate any cached bitmaps or other relevant state.
6.20.66
SelectionDidChange(notification as NSNotificationMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
selection did change notification is postedthat is, immediately after the outline views selection has changed.
6.20.67
selectionIndexesForProposedSelection(proposedSelectionIndexes as NSIndexSetMBS) as NSIndexSetMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
delegate to modify the proposed selection.
Notes:
proposedSelectionIndexes: An index set containing the indexes of the proposed selection.
Return an NSIndexSet instance containing the indexes of the new selection. Return proposedSelectionIndexes if the proposed selection is acceptable, or the value of the table views existing selection to avoid
changing the selection.
This method may be called multiple times with one new index added to the existing selection to find out if
a particular index can be selected when the user is extending the selection with the keyboard or mouse.
Implementation of this method is optional. If implemented, this method will be called instead of willDisplayOutlineCell.
If not implemented or returns nil, the plugin will return proposedSelectionIndexes.
6.20.68
SelectionIsChanging(notification as NSNotificationMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when
notification is postedthat is, whenever the outline views selection changes.
364
6.20.69
CHAPTER 6. COCOA CONTROLS
selectionShouldChangeInOutlineView as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether the outline view should change its selection.
Notes:
Return true to permit outlineView to change its selection (typically a row being edited), false to deny permission.
For example, if the user is editing a cell and enters an improper value, the delegate can prevent the user
from selecting or editing any other cells until a proper value has been entered into the original cell. You can
implement this method for complex validation of edited rows based on the values of any of their cells.
6.20.70
setObjectValue(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS, value as Variant)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Set the data object
for a given item in a given column.
Notes:
object: The new value for the item.
tableColumn: A column in outlineView.
item: An item in the data source in the specified tableColumn of the view.
The item is located in the specified tableColumn of the view.
Do not call reloadData from this method.
6.20.71
shouldCollapseAutoExpandedItemsForDeposited(deposited as Boolean,
superResult as Boolean) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether auto-expanded items should return to their original collapsed state.
Notes:
deposited: If true, the drop terminated successfully; if false the drop failed.
Return true if auto-expanded items should return to their original collapsed state; otherwise false.
Implement this event to provide custom behavior. If the target of a drop is not auto-expanded (by hovering
long enough) the drop target still gets expanded after a successful drop unless this method returns true. The
default implementation returns false after a successful drop.
6.20. CONTROL NSOUTLINECONTROLMBS
365
This method is called in a variety of situations. For example, it is called shortly after the acceptDrop
method is called and also if the drag exits the outline view (exiting the view is treated the same as a failed
drop). The return value of the acceptDrop method determines the incoming value of the deposited parameter.
6.20.72
shouldCollapseItem(item as NSOutlineViewItemMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether the outline view should collapse a given item.
Notes:
item: The item that should collapse.
Return true to permit outlineView to collapse item, false to deny permission.
You can implement this method to disallow collapsing of specific items. For example, if the first row of your
outline view should not be collapsed, your delegate method could contain this line of code:
return rowForItem(item ) <>0
6.20.73
shouldEdit(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS
as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether the outline view should allow editing of a given item in a given table column.
Notes:
tableColumn: The table column.
item: The item.
Returns true to permit outlineView to edit the cell specified by tableColumn and item, false to deny permission.
If this method returns true, the cell may still not be editablefor example, if you have set up a custom NSTextFieldCell as a data cell, it must return true for isEditable to allow editing.
You can implement this method to disallow editing of specific cells.
366
6.20.74
CHAPTER 6. COCOA CONTROLS
shouldExpandItem(item as NSOutlineViewItemMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether the outline view should expand a given item.
Notes:
item: The item that should expand.
Returns true to permit outlineView to expand item, false to deny permission.
You can implement this method to disallow expanding of specific items.
6.20.75
shouldReorderColumn(columnIndex as Integer, newColumnIndex as
Integer) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent to the delegate
to allow or prohibit the specified column to be dragged to a new location.
Notes:
columnIndex: The index of the column being dragged.
newColumnIndex: The proposed target index of the column.
Returns true if the column reordering should be allowed, otherwise false.
When a column is initially dragged by the user, the delegate is first called with a newColumnIndex value
of -1. Returning false will disallow that column from being reordered at all. Returning true allows it to be
reordered, and the delegate will be called again when the column reaches a new location.
The actual NSTableColumn instance can be retrieved from the tableColumns array.
If this method is not implemented, all columns are considered reorderable.
6.20.76
shouldSelectItem(item as NSOutlineViewItemMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether the outline view should select a given item.
Notes:
item: The item.
Return true to permit outlineView to select item, false to deny permission.
You implement this event to disallow selection of particular items.
6.20. CONTROL NSOUTLINECONTROLMBS
367
For better performance and finer grain control over the selection, use dataCell.
6.20.77
shouldSelectTableColumn(tableColumn as NSTableColumnMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether the outline view should select a given table column.
Notes:
tableColumn: The table column.
Return true to permit outlineView to select tableColumn, false to deny permission.
You can implement this method to disallow selection of specific columns.
6.20.78
shouldShowCellExpansion(tableColumn as NSTableColumnMBS, item
as NSOutlineViewItemMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
delegate to control cell expansion for a specific column and item.
Notes:
tableColumn: A table column in the outline view.
item: An item in the outline view.
Returns true to allow an expansion tooltip to appear in the column tableColumn for item item, otherwise
false.
Cell expansion can occur when the mouse hovers over the specified cell and the cell contents are unable to
be fully displayed within the cell. If this method returns true, the full cell contents will be shown in a special
floating tool tip view, otherwise the content is truncated.
6.20.79
shouldShowOutlineCellForItem(item as NSOutlineViewItemMBS) as
Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the specified item should display the outline cell (the disclosure triangle).
Notes:
item: An item in the outline view.
368
CHAPTER 6. COCOA CONTROLS
Returns true if the outline cell should be displayed, otherwise false.
Returning false causes frameOfOutlineCellAtRow to return NSZeroRect, hiding the cell. In addition, the
row will not be collapsible by keyboard shortcuts.
This method is called only for expandable rows.
6.20.80
shouldTrackCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether a given cell should be tracked.
Notes:
cell: The cell used to display item item in column tableColumn
tableColumn: A table column in the outline view.
item: An item in the outline view.
Returns true if the cell should be tracked for the item item in column tableColumn, otherwise false.
Normally, only selectable or selected cells can be tracked. If you implement this method, cells which are not
selectable or selected can be tracked (and vice-versa). For example, this allows you to have a button cell in
a table which does not change the selection, but can still be clicked on and tracked.
6.20.81
shouldTypeSelectForEvent(e as NSEventMBS, searchString as String)
as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether type select should proceed for a given event and search string.
Notes:
e: The event that caused the message to be sent.
searchString: The string for which searching is to proceed. The search string is nil if no type select has begun.
Return true if type select should proceed, otherwise false.
Generally, this method will be called from keyDown and the event will be a key event.
6.20. CONTROL NSOUTLINECONTROLMBS
6.20.82
369
sizeToFitWidthOfColumn(Column as Integer) as Double
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
delegate to provide custom sizing behavior when a columns resize divider is double clicked.
Notes:
column: The index of the column.
Returns the width of the specified column.
By default, NSOutlineView iterates every row in the table, accesses a cell via preparedCellAtColumn, and
requests the cellSize to find the appropriate largest width to use.
For accurate results and performance, it is recommended that this method is implemented when using large
tables. By default, large tables use a monte carlo simulation instead of iterating every row.
6.20.83
sortDescriptorsDidChange(oldDescriptors() as NSSortDescriptorMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked by an
outline view to notify the data source that the descriptors changed and the data may need to be resorted.
Notes:
oldDescriptors: An array that contains the previous descriptors.
The data source typically sorts and reloads the data, and adjusts the selections accordingly. If you need to
know the current sort descriptors and the data source does not itself manage them, you can get outlineView’s
current sort descriptors by sending it a sortDescriptors message.
6.20.84
textShouldBeginEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called to
decide whether text editing should be allowed.
Notes: Return true to allow.
6.20.85
textShouldEndEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called to
decide whether ending text editing should be allowed.
Notes: Return true to allow.
370
6.20.86
CHAPTER 6. COCOA CONTROLS
toolTipForCell(cell as NSCellMBS, byref rect as NSRectMBS, tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS, mouseLocation as NSPointMBS) as String
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: When the cursor
pauses over a given cell, the value returned from this method is displayed in a tooltip.
Notes:
cell: The cell for which to generate a tooltip.
rect: The proposed active area of the tooltip. To control the default active area, you can modify the rect
parameter. By default, rect is computed as cell.drawingRectForBounds(cellFrame).
tc: The table column that contains cell.
item: The item for which to display a tooltip.
mouseLocation: The current mouse location in view coordinates.
If you dont want a tooltip at that location, return nil or the empty string.
6.20.87
typeSelectString(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS) as String
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the string
that is used for type selection for a given column and item.
Notes:
tableColumn: A table column in the outline view.
item: An item in the outline view.
Return the string that is used for type selection. You may want to change what is searched for based on
what is displayed, or simply return nil for that row and/or column to not be searched
Implement this method if you want to control the string that is used for type selection. You may want to
change what is searched for based on what is displayed, or simply return nil to specify that the given row
and/or column should not be searched. By default, all cells with text in them are searched.
The default value when this delegate method is not implemented is:
outlineView.preparedCellAtColumn(tableColumn, outlineView.rowForItem(item)).stringValue
and you can return this value from the event if you wish.
6.20. CONTROL NSOUTLINECONTROLMBS
6.20.88
371
updateDraggingItemsForDrag(draggingInfo as NSDraggingInfoMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
method to enable the table to update dragging items as they are dragged over the view.
Notes: draggingInfo: The dragging info object.
6.20.89
validateDrop(info as NSDraggingInfoMBS, proposedItem as NSOutlineViewItemMBS, proposedChildIndex as Integer) as Integer
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Used by an outline
view to determine a valid drop target.
Notes:
info: An object that contains more information about this dragging operation.
item: The proposed parent.
index: The proposed child location.
Returns a value that indicates which dragging operation the data source will perform.
Based on the mouse position, the outline view will suggest a proposed drop location. The data source may
retarget a drop if desired by calling setDropItem and returning something other than NSDragOperationNone.
You may choose to retarget for various reasons (for example, for better visual feedback when inserting into
a sorted position).
Implementation of this method is optional.
6.20.90
view(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS)
as NSViewMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implemented to
return the view used to display the specified item and column.
Notes:
tableColumn: The table column, or nil if the row is a group row.
item: The item displayed by the returned view.
Return the view to display the specified column and row. Returning nil is acceptable, in which case a view
is not shown at that location.
This method is required if you wish to use NSView objects instead of NSCell objects for the cells within an
outline view. Cells and views cannot be mixed within the same outline view.
It is recommended that the implementation of this method first call the NSTableView method makeViewWithIdentifier passing, respectively, the tableColumn parameters identifier and self as the owner to
372
CHAPTER 6. COCOA CONTROLS
attempt to reuse a view that is no longer visible. The frame of the view returned by this method is not
important, and is automatically set by the outline view.
The view’s properties should be properly set up before returning the result.
When using Cocoa bindings, this method is optional if at least one identifier has been associated with the
table view at design time. If this method is not implemented, the outline view automatically calls makeViewWithIdentifier with the tableColumn parameters identifier and the outline views delegate as parameters,
to attempt to reuse a previous view or automatically unarchive a prototype associated with the table view.
The autoresizingMask of the returned view is automatically set to NSViewHeightSizable to resize properly
on row height changes.
See also:
• 6.20.13 View as NSOutlineViewMBS
6.20.91
348
willDisplayCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the delegate
that the cell specified by the column and item will be displayed.
Notes:
cell: The cell.
tableColumn: The table column.
item: The item.
You can implement this method to modify cell to provide further setup for the cell in tableColumn and item.
It is not safe to do drawing inside this methodyou should only set up state for cell.
6.20.92
willDisplayOutlineCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the delegate
that an outline view is about to display a cell used to draw the expansion symbol.
Notes:
cell: The cell.
tableColumn: The table column.
item: The item.
Informs the event that outlineView is about to display cellan expandable cell (a cell that has the expansion
symbol)for the column and item specified by tableColumn and item. The delegate can modify cell to alter
its display attributes.
This method is not invoked when outlineView is about to display a non-expandable cell.
6.20. CONTROL NSOUTLINECONTROLMBS
6.20.93
373
willTile
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The tableview will
tile.
Notes: The internal tile function properly sizes the table view and its header view and marks it as needing
display.
6.20.94
writeItems(items() as NSOutlineViewItemMBS, pasteboard as NSPasteboardMBS) as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether a drag operation is allowed.
Notes:
items: An array of the items participating in the drag.
pasteboard: The pasteboard to which to write the drag data.
Returns true if the drag operation is allowed, otherwise false.
Invoked by outlineView after it has been determined that a drag should begin, but before the drag has been
started.
To refuse the drag, return false. To start a drag, return true and place the drag data onto the pboard (data,
owner, and so on). The drag image and other drag-related information will be set up and provided by the
outline view once this call returns with true.
374
CHAPTER 6. COCOA CONTROLS
6.21
class NSOutlineViewItemMBS
6.21.1
class NSOutlineViewItemMBS
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The class to subclass
for your items.
6.21.2
Methods
6.21.3
Constructor
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor.
6.21.4
sortedArrayUsingDescriptor(values() as NSOutlineViewItemMBS, sortDescriptor as NSSortDescriptorMBS) as NSOutlineViewItemMBS()
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a copy of
the receiving array sorted as specified by a given a sort descriptor.
Notes:
sortDescriptor: The NSSortDescriptor objects.
Returns a copy of the receiving array sorted as specified by sortDescriptor.
6.21.5
sortedArrayUsingDescriptors(values() as NSOutlineViewItemMBS, sortDescriptor() as NSSortDescriptorMBS) as NSOutlineViewItemMBS()
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a copy of
the receiving array sorted as specified by a given array of sort descriptors.
Notes:
sortDescriptors: An array of NSSortDescriptor objects.
Returns a copy of the receiving array sorted as specified by sortDescriptors.
The first descriptor specifies the primary key path to be used in sorting the receiving arrays contents. Any
subsequent descriptors are used to further refine sorting of objects with duplicate values. See NSSortDescriptor for additional information.
6.21. CLASS NSOUTLINEVIEWITEMMBS
6.21.6
Properties
6.21.7
Description as String
375
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The description
text property.
Notes: (Read only property)
See also:
• 6.21.11 Description as String
6.21.8
375
Handle as Integer
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The internal object
reference.
Notes: (Read and Write property)
6.21.9
valueForKey(key as String) as Variant
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Get/set the value
for the property identified by a given key.
Notes:
key: The name of one of the receiver’s properties.
(Read and Write computed property)
See also:
• 6.21.14 valueForKey(key as string) as Variant
6.21.10
Events
6.21.11
Description as String
376
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event when
system queries description for object.
See also:
• 6.21.7 Description as String
6.21.12
375
setValueForKey(key as string, value as Variant)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sets the property of
the receiver specified by a given key to a given value.
376
CHAPTER 6. COCOA CONTROLS
Notes:
value: The value for the property identified by key.
key: The name of one of the receiver’s properties.
If key identifies a to-one relationship, relate the object specified by value to the receiver, unrelating the
previously related object if there was one. Given a collection object and a key that identifies a to-many relationship, relate the objects contained in the collection to the receiver, unrelating previously related objects
if there were any.
The search pattern that setValueForKey uses is described in Accessor Search Patterns in Key-Value Coding
Programming Guide.
In a reference-counted environment, if the instance variable is accessed directly, value is retained.
6.21.13
setValueForUndefinedKey(key as string, value as Variant)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked by
setValueForKey when it finds no property for a given key.
Notes:
value: The value for the key identified by key.
key: A string that is not equal to the name of any of the receiver’s properties.
Subclasses can override this method to handle the request in some other way. The default implementation
raises an NSUndefinedKeyException.
6.21.14
valueForKey(key as string) as Variant
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Return the value for
the property identified by a given key.
Notes:
key: The name of one of the receiver’s properties.
Returns the value for the property identified by key.
If event is not implemented, the search pattern that valueForKey uses to find the correct value to return is
described in Accessor Search Patterns in Key-Value Coding Programming Guide.
See also:
• 6.21.9 valueForKey(key as String) as Variant
375
6.21. CLASS NSOUTLINEVIEWITEMMBS
6.21.15
377
valueForUndefinedKey(key as string) as Variant
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked by
valueForKey when it finds no property corresponding to a given key.
Notes:
key: A string that is not equal to the name of any of the receiver’s properties.
Subclasses can override this method to return an alternate value for undefined keys. The default implementation raises an NSUndefinedKeyException.
378
CHAPTER 6. COCOA CONTROLS
6.22
class NSOutlineViewMBS
6.22.1
class NSOutlineViewMBS
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The class for a
hierarchical list.
Notes:
NSOutlineView is a subclass of NSTableView that uses a row-and-column format to display hierarchical data
that can be expanded and collapsed, such as directories and files in a file system. A user can expand and
collapse rows, edit values, and resize and rearrange columns.
Like a table view, an outline view does not store its own data, instead it retrieves data values as needed
from a data source to which it has a weak reference.
MBS Plugin provides all events in NSOutlineControlMBS control.
An outline view has the following features:
• A user can expand and collapse rows.
• Each item in the outline view must be unique. In order for the collapsed state to remain consistent between reloads the item’s pointer must remain the same and the item must maintain isEqual:
sameness.
• The view gets data from a data source (see NSOutlineControlMBS).
• The view retrieves only the data that needs to be displayed.
Subclass of the NSTableViewMBS class.
6.22.2
Methods
6.22.3
child(index as Integer, ofItem as NSOutlineViewItemMBS) as NSOutlineViewItemMBS
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the specified
child of an item.
Notes:
index: The index of the child item in the parent.
item: The parent item whose child item you want to retrieve.
6.22. CLASS NSOUTLINEVIEWMBS
379
Returns the child item or nil if the item could not be found.
You can call this method on an outline view with either a static or dynamic data source. For an outline
view whose contents are dynamic, this method may call out to the child event of the associated data source.
6.22.4
childIndexForItem(item as NSOutlineViewItemMBS) as Integer
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the child
index of the specified item within its parent.
Notes: The performance of this method is O(1) at best and O(n) at worst.
6.22.5
collapseItem(item as NSOutlineViewItemMBS)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Collapses a given
item.
Notes:
If item is not expanded or not expandable, does nothing
If collapsing takes place, posts item collapse notification.
See also:
• 6.22.6 collapseItem(item as NSOutlineViewItemMBS, collapseChildren as Boolean)
6.22.6
379
collapseItem(item as NSOutlineViewItemMBS, collapseChildren as Boolean)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Collapses a given
item and, optionally, its children.
Notes:
item: An item in the receiver.
Starting in OS X version 10.5, passing ’nil’ will collapse each item under the root in the outline view.
collapseChildren: If true, recursively collapses item and its children. If NO, collapses item only (identical to
collapseItem:).
For example, this method is invoked with the collapseChildren parameter set to true when a user Optionclicks the disclosure triangle for an item in the outline view (to collapse the item and all its contained items).
For each item collapsed, posts an item collapsed notification.
See also:
• 6.22.5 collapseItem(item as NSOutlineViewItemMBS)
379
380
6.22.7
CHAPTER 6. COCOA CONTROLS
Constructor
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
outline view with size 100/100 and position 0/0
Example:
dim t as new NSOutlineViewMBS
Notes: On success the handle property is not zero.
See also:
• 6.22.8 Constructor(Handle as Integer)
380
• 6.22.9 Constructor(left as Double, top as Double, width as Double, height as Double)
380
6.22.8
Constructor(Handle as Integer)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSOutlineView handle.
Example:
dim t as new NSOutlineViewMBS(0, 0, 100, 100)
dim v as new NSOutlineViewMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSOutlineViewMBS and the plugin retains this handle.
See also:
• 6.22.7 Constructor
380
• 6.22.9 Constructor(left as Double, top as Double, width as Double, height as Double)
380
6.22.9
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
outline view with the given size and position.
Example:
dim x as new NSOutlineViewMBS(0, 0, 100, 100)
6.22. CLASS NSOUTLINEVIEWMBS
381
Notes: On success the handle property is not zero.
See also:
• 6.22.7 Constructor
380
• 6.22.8 Constructor(Handle as Integer)
380
6.22.10
expandItem(item as NSOutlineViewItemMBS)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Expands a given
item.
Notes:
If item is not expandable or is already expanded, does nothing.
If expanding takes place, posts an item expanded notification.
See also:
• 6.22.11 expandItem(item as NSOutlineViewItemMBS, expandChildren as Boolean)
6.22.11
381
expandItem(item as NSOutlineViewItemMBS, expandChildren as Boolean)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Expands a specified
item and, optionally, its children.
Notes:
item: An item in the receiver.
Starting in OS X version 10.5, passing ’nil’ will expand each item under the root in the outline view.
expandChildren: If true, recursively expands item and its children. If false, expands item only (identical to
expandItem).
For example, this method is invoked with the expandChildren parameter set to YES when a user Optionclicks the disclosure triangle for an item in the outline view (to expand the item and all its contained items).
For each item expanded, posts an item expanded notification.
See also:
• 6.22.10 expandItem(item as NSOutlineViewItemMBS)
6.22.12
381
frameOfOutlineCellAtRow(row as Integer) as NSRectMBS
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the frame
of the outline cell for a given row.
Notes:
382
CHAPTER 6. COCOA CONTROLS
row: The index of the row for which to return the frame.
Returns the frame of the outline cell for the row at index row, considering the current indentation and the
value in the indentationMarkerFollowsCell property. If the row at index row is not an expandable row,
returns NSZeroRect.
You can override this method in a subclass to return a custom frame for the outline button cell. If your
override returns an empty rect, no outline cell is drawn for that row. You might do that, for example, so
that the disclosure triangle will not be shown for a row that should never be expanded.
6.22.13
insertItemsAtIndexes(indexes as NSIndexSetMBS, Parent as NSOutlineViewItemMBS, animationOptions as Integer)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Inserts new items
at the given indexes in the given parent with the specified optional animations.
Notes:
indexes: Indexes at which to insert items.
parent: The parent for the items, or nil if the parent is the root.
animationOptions: Animated slide effects used when inserting items.
This method parallels the insertRowsAtIndexes method of NSTableView and is used in a way similar to the
insertObjects method of NSMutableArray. The method does nothing if parent is not expanded. The actual
item values are determined by the data sources child event (which is called only after endUpdates to ensure
data source integrity).
NSCell-based outline views must first call beginUpdates before calling this method.
You can call this method multiple times within the same beginUpdates/endUpdates block; new insertions
move previously inserted new items, just like modifying an array. Inserting an index beyond what is available
throws an exception.
6.22.14
insertRowsAtIndexes(indexes as NSIndexSetMBS, animationOptions
as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Private method to
block you from calling this method in NSTableViewMBS.
6.22. CLASS NSOUTLINEVIEWMBS
6.22.15
383
isExpandable(item as NSOutlineViewItemMBS) as Boolean
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether a given item is expandable.
Notes: True if item is expandablethat is, item can contain other items, otherwise false.
6.22.16
isItemExpanded(item as NSOutlineViewItemMBS) as Boolean
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether a given item is expanded.
Notes: True if item is expanded, otherwise false.
6.22.17
itemAtRow(row as Integer) as NSOutlineViewItemMBS
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the item
associated with a given row.
Notes:
row: The index of a row in the receiver.
Returns the item associated with row.
6.22.18
levelForItem(item as NSOutlineViewItemMBS) as Integer
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
indentation level for a given item.
Notes:
The indentation level for item. If item is nil (which is the root item), returns -1.
The levels are zero-basedthat is, the first level of displayed items is level 0.
6.22.19
levelForRow(row as Integer) as Integer
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
indentation level for a given row.
Notes:
The indentation level for row. For an invalid row, returns -1.
The levels are zero-basedthat is, the first level of displayed items is level 0.
384
6.22.20
CHAPTER 6. COCOA CONTROLS
moveItemAtIndex(oldIndex as Integer, oldParent as NSOutlineViewItemMBS,
newIndex as Integer, newParent as NSOutlineViewItemMBS)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Moves an item at a
given index in the given parent to a new index in a new parent.
Notes:
fromIndex: Index of the item to be moved.
oldParent: The parent of the item to be moved.
toIndex: Index in the new parent to which the item is moved.
newParent: The parent of the item after it is moved.
This method parallels the moveRowAtIndex method of NSTableView. The newParent can be the same as
oldParent to reorder an item within the same parent.
NSCell-based outline views must first call beginUpdates before calling this method.
You can call this method multiple times within the same beginUpdates/endUpdates block. Moving from an
invalid index, or to an invalid index, throws an exception.
6.22.21
moveRowAtIndex(oldIndex as Integer, newIndex as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Private method to
block you from calling this method in NSTableViewMBS.
6.22.22
NSOutlineViewColumnDidMoveNotification as String
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Posted whenever a
column is moved by user action in an NSOutlineView object.
Notes:
The notification object is the NSOutlineView object in which a column moved. The userInfo dictionary
contains the following information:
NSOldColumn: An NSNumber object containing the integer value of the columns original index
NSNewColumn: An NSNumber object containing the integer value of the columns present index
6.22. CLASS NSOUTLINEVIEWMBS
6.22.23
385
NSOutlineViewColumnDidResizeNotification as String
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Posted whenever a
column is resized in an NSOutlineView object.
Notes:
The notification object is the NSOutlineView object in which a column was resized. The userInfo dictionary
contains the following information:
NSTableColumn: The column that was resized.
NSOldWidth: An NSNumber object containing the columns original width
6.22.24
NSOutlineViewDisclosureButtonKey as String
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: These key is used
by the outline view to create disclosure buttons that collapse and expand items.
Notes: The normal triangle disclosure button.
6.22.25
NSOutlineViewItemDidCollapseNotification as String
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Posted whenever
an item is collapsed in an NSOutlineView object.
Notes:
The notification object is the NSOutlineView object in which an item was collapsed. A collapsed items
children lose their status as being selected. The userInfo dictionary contains the following information:
NSObject: The item that was collapsed (an id)
6.22.26
NSOutlineViewItemDidExpandNotification as String
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Posted whenever
an item is expanded in an NSOutlineView object.
Notes:
The notification object is the NSOutlineView object in which an item was expanded. The userInfo dictionary
contains the following information:
NSObject: The item that was expanded (an id)
386
6.22.27
CHAPTER 6. COCOA CONTROLS
NSOutlineViewItemWillCollapseNotification as String
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Posted before an
item is collapsed (after the user clicks the arrow but before the item is collapsed).
Notes:
The notification object is the NSOutlineView object that contains the item about to be collapsed. A collapsed items children will lose their status as being selected. The userInfo dictionary contains the following
information:
NSObject: The item about to be collapsed (an id)
6.22.28
NSOutlineViewItemWillExpandNotification as String
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Posted before an
item is expanded (after the user clicks the arrow but before the item is collapsed).
Notes:
The notification object is the outline view that contains an item about to be expanded. The userInfo dictionary contains the following information:
NSObject: The item that is to be expanded (an id)
6.22.29
NSOutlineViewSelectionDidChangeNotification as String
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Posted after the
outline view’s selection changes.
Notes: The notification object is the outline view whose selection changed. This notification does not
contain a userInfo dictionary.
6.22.30
NSOutlineViewSelectionIsChangingNotification as String
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Posted as the
outline views selection changes (while the mouse button is still down).
Notes: The notification object is the outline view whose selection is changing. This notification does not
contain a userInfo dictionary.
6.22. CLASS NSOUTLINEVIEWMBS
6.22.31
387
NSOutlineViewShowHideButtonKey as String
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: These key is used
by the outline view to create disclosure buttons that collapse and expand items.
Notes: The Show/Hide button.
6.22.32
numberOfChildrenOfItem(item as NSOutlineViewItemMBS) as Integer
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the number
of children for the specified parent item.
Notes:
item: The parent item.
Returns the number of children associated with the parent.
You can call this method on an outline view with either a static or dynamic data source. For an outline
view whose contents are dynamic, this method may call out to the numberOfChildrenOfItem event of the
associated data source.
6.22.33
parentForItem(item as NSOutlineViewItemMBS) as NSOutlineViewItemMBS
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the parent
for a given item.
Notes:
item: The item for which to return the parent.
Returns the parent for item, or nil if the parent is the root.
6.22.34
reloadItem(item as NSOutlineViewItemMBS)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Reloads and
redisplays the data for the given item.
Notes:
Reloading the cell views associated with item occurs only in apps that link against macOS 10.12 and later.
This method may cause the outline view to change its selection without calling the SelectionDidChange
event.
See also:
388
CHAPTER 6. COCOA CONTROLS
• 6.22.35 reloadItem(item as NSOutlineViewItemMBS, reloadChildren as Boolean)
6.22.35
388
reloadItem(item as NSOutlineViewItemMBS, reloadChildren as Boolean)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Reloads a given
item and, optionally, its children.
Notes:
item: An item in the receiver.
Starting in OS X version 10.5, passing ’nil’ will reload everything under the root in the outline view.
reloadChildren: If true, recursively reloads item and its children. If false, reloads item only (identical to
reloadItem).
It is not necessary, or efficient, to reload children if the item is not expanded.
See also:
• 6.22.34 reloadItem(item as NSOutlineViewItemMBS)
6.22.36
387
removeItemsAtIndexes(indexes as NSIndexSetMBS, Parent as NSOutlineViewItemMBS, animationOptions as Integer)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Removes items at
the given indexes in the given parent with the specified optional animations.
Notes:
indexes: Indexes of the items to be removed.
parent: The parent of the items to be removed.
animationOptions: Animated slide effects used when removing items.
This method parallels the removeRowsAtIndexes method of NSTableView and is used in a way similar to the
removeObjectsAtIndexes method of NSMutableArray. The method does nothing if parent is not expanded.
If any of the child items is expanded, then all of its child rows are also be removed.
NSCell-based outline views must first call beginUpdates before calling this method.
You can call this method multiple times within the same beginUpdates/endUpdates block; changes work
just like modifying an array. Removing an item at an index beyond what is available throws an exception.
6.22. CLASS NSOUTLINEVIEWMBS
6.22.37
389
removeRowsAtIndexes(indexes as NSIndexSetMBS, animationOptions
as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Private method to
block you from calling this method in NSTableViewMBS.
6.22.38
rowForItem(item as NSOutlineViewItemMBS) as Integer
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the row
associated with a given item.
Notes: The row associated with item, or -1 if item is nil or cannot be found.
6.22.39
setDropItem(item as NSOutlineViewItemMBS, dropChildIndex as Integer)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Used to retarget a
proposed drop.
Notes:
item: The target item.
index: The drop index.
For example, to specify a drop on someOutlineItem, you specify item as someOutlineItem and index as
NSOutlineViewDropOnItemIndex. To specify a drop between child 2 and 3 of someOutlineItem, you specify item as someOutlineItem and index as 3 (children are a zero-based index). To specify a drop on an
un-expandable someOutlineItem, you specify item as someOutlineItem and index as NSOutlineViewDropOnItemIndex.
6.22.40
Properties
6.22.41
autoresizesOutlineColumn as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
that indicates whether the outline view resizes its outline column when the user expands or collapses items.
Notes:
The outline column contains the cells with the expansion symbols and is generally the first column. The
default value of this property is true, which causes the outline column to be resized.
The outline column is resized based on how many indentation levels are exposed or hidden. For example, if
expanding a row exposes a single indentation level, the outline column width is increased by one indentationPerLevel.
390
CHAPTER 6. COCOA CONTROLS
(Read and Write property)
6.22.42
autosaveExpandedItems as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the expanded items are automatically saved across launches of the app.
Notes:
When the value of this property is true, the outline view saves the state of its expanded items and restores
that state the next time the user launches the app. (If the outline views autosaveName property is nil, or if
you have not implemented the itemForPersistentObject and persistentObjectForItem events, this setting is
ignored and outline information is not saved.) The configuration data is saved separately for each user and
for each app. The default value of this property is NO.
You can have separate settings for the autosaveExpandedItems and autosaveTableColumns properties, so
you could, for example, save expanded item information, but not table column positions.
(Read and Write property)
6.22.43
indentationMarkerFollowsCell as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the indentation marker symbol displayed in the outline column should be indented along
with the cell contents.
Notes:
When the value of this property is true, the indentation marker is indented along with the cell contents.
When the value is false, the marker is always displayed left-justified in the column. The default value of this
property is true.
(Read and Write property)
6.22.44
indentationPerLevel as Double
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The per-level
indentation, measured in points.
Notes: (Read and Write property)
6.22.45
outlinetableColumn as NSTableColumnMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The table column in
which hierarchical data is displayed.
Notes:
6.22. CLASS NSOUTLINEVIEWMBS
391
Each level of hierarchical data is indented by the amount specified by the indentationPerLevel property (the
default is 16.0), and decorated with the indentation marker (disclosure triangle) on rows that are expandable.
Outline table column data is archived with the rest of the outline views state information.
Attempts to set the value of this property to nil are silently ignored.
(Read and Write property)
6.22.46
stronglyReferencesItems as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
that indicates whether the outline view retains and releases the objects returned from its data source.
Notes:
For Xojo applications we highly recommend to keep all items in arrays in Xojo, so they are not released by
Xojo too early!
When the value of this property is true, the outline view retains and releases the objects returned to it from
dataSource. When the value is NO, the outline view treats the objects as opaque items and assumes that
the client has a retain on them. The default value is YES for applications linked on macOS 10.12 and later,
and false for applications linked on earlier versions of macOS. If you require the legacy behavior and your
app links in macOS 10.12 or later, the value of this property must be explicitly set toNO in code, because
it is not encoded in the nib. In general, this is required if the items themselves create a retain cycle.
(Read and Write property)
6.22.47
userInterfaceLayoutDirection as Integer
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The user interface
layout direction.
Notes:
When set to NSUserInterfaceLayoutDirectionRightToLeft, the outline view displays the disclosure triangle
to the right of the cell instead of the left. The default value is NSUserInterfaceLayoutDirectionLeftToRight.
(Read and Write property)
6.22.48
Constants
6.22.49
NSOutlineViewDropOnItemIndex = -1
Plugin Version: 17.1. Function: May be used as a valid child index of a drop target item.
Notes: In this case, the drop will happen directly on the target item.
392
CHAPTER 6. COCOA CONTROLS
6.23
control NSPopUpButtonControlMBS
6.23.1
control NSPopUpButtonControlMBS
Plugin Version: 13.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The Xojo control
for a NSPopUpButtonControl.
Notes:
This control embeds a special NSPopUpButtonControl subclass.
Designed for Xojo 2013r1 and newer. May work on Real Studio 2012, but not perfectly.
6.23.2
Properties
6.23.3
View as NSPopUpButtonMBS
Plugin Version: 13.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The view used in
the control.
Notes:
Use this object to set more options on the control.
(Read only property)
6.23.4
Events
6.23.5
Action
Plugin Version: 13.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The action event.
6.23.6
BoundsChanged
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the bounds, but not the frame, changed.
6.23.7
EnableMenuItems
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: Yes, Linux: Yes. Function: The event where
you can enable menu items.
6.23. CONTROL NSPOPUPBUTTONCONTROLMBS
6.23.8
393
FrameChanged
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the frame changed.
6.23.9
GotFocus
Plugin Version: 16.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control itself
got focus.
Notes: This only fires if the control itself got focus and not a sub control.
6.23.10
LostFocus
Plugin Version: 16.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control lost
focus.
Notes: This only fires if the control itself lost focus and not a sub control.
6.23.11
MenuAction(HitItem as MenuItem) As Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when a
menuitem is choosen.
Notes: This allows the control to react on its relevant menu items. Please return true if you handled it or
false to give others a chance.
6.23.12
MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The mouse button
was pressed inside the controls region at the location passed in to x, y.
Notes:
The coordinates x and y are local to the control, i.e. they represent the position of the mouse click relative
to the upper-left corner or the Control.
Return True if you are going to handle the MouseDown. In such a case:
• The Action event, if any, will not execute and the state of the object will not change.
• You will receive the MouseDrag and MouseUp events.
If you return False, the system handles the MouseDown so the above event handlers do not get called.
394
6.23.13
CHAPTER 6. COCOA CONTROLS
MouseDrag(x as Integer, y as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event fires
continuously after the mouse button was pressed inside the Control.
Notes:
Mouse location is local to the control passed in to x, y.
As this event is fired continuously (hundreds of time per second), it is your responsibility to determine if the
mouse has really moved.
6.23.14
MouseUp(x as Integer, y as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The mouse button
was released.
Notes: Use the x and y parameters to determine if the mouse button was released within the control’s
boundaries.
6.23.15
ScaleFactorChanged(NewFactor as Double)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The backing store
scale factor has changed.
Notes: Please invalidate any cached bitmaps or other relevant state.
6.24. CLASS NSPOPUPBUTTONMBS
6.24
class NSPopUpButtonMBS
6.24.1
class NSPopUpButtonMBS
395
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: An NSPopUpButton
object controls a pop-up menu or a pull-down menu from which a user can select an item.
Example:
// get cocoa view for the popupmenu
dim p as NSPopUpButtonMBS = PopupMenu1.NSPopUpButtonMBS
// find a menu entry
dim it as NSMenuItemMBS = p.itemAtIndex(0)
// get a picture
dim pic as Picture = LogoMBS(500)
dim img as new NSImageMBS(pic)
img.setSize 16,16
// and assign icon
it.image = img
Notes:
The NSPopUpButton class defines objects that implement the pop-up and pull-down menus of the graphical
user interface.
An NSPopUpButton object uses an NSPopUpButtonCell object to implement its user interface.
Note that while a menu is tracking, adding, removing, or changing items on the menu is not reflected.
Subclass of the NSButtonMBS class.
6.24.2
Methods
6.24.3
addItemsWithTitles(titles() as string)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Adds multiple items
to the end of the menu.
Notes:
temTitles: An array of strings containing the titles of the items you want to add. Each string in the array
should be unique. If an item with the same title already exists in the menu, the existing item is removed
and the new one is added.
396
CHAPTER 6. COCOA CONTROLS
If you want to move an item, it’s better to invoke removeItemWithTitle: explicitly and then send this
method. After adding the items, this method uses the synchronizeTitleAndSelectedItem method to make
sure the item being displayed matches the currently selected item.
Since this method searches for duplicate items, it should not be used if you are adding items to an already
populated menu with more than a few hundred items. Add items directly to the receiver’s menu instead.
6.24.4
addItemWithTitle(title as string)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Adds an item with
the specified title to the end of the menu.
Notes:
title: The title of the menu-item entry. If an item with the same title already exists in the menu, the existing
item is removed and the new one is added.
If you want to move an item, it’s better to invoke removeItemWithTitle explicitly and then send this method.
After adding the item, this method calls the synchronizeTitleAndSelectedItem method to make sure the item
being displayed matches the currently selected item.
Since this method searches for duplicate items, it should not be used if you are adding an item to an already
populated menu with more than a few hundred items. Add items directly to the receiver’s menu instead.
6.24.5
Constructor
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
button with size 100/100 and position 0/0
Example:
dim t as new NSPopUpButtonMBS
Notes: On success the handle property is not zero.
See also:
• 6.24.6 Constructor(Handle as Integer)
397
• 6.24.7 Constructor(left as Double, top as Double, width as Double, height as Double)
397
• 6.24.8 Constructor(left as Double, top as Double, width as Double, height as Double, pullsDown as
boolean)
397
6.24. CLASS NSPOPUPBUTTONMBS
6.24.6
397
Constructor(Handle as Integer)
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSPopUpButton handle.
Example:
dim t as new NSPopUpButtonMBS(0, 0, 100, 100)
dim v as new NSPopUpButtonMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSPopUpButton and the plugin retains this handle.
See also:
• 6.24.5 Constructor
396
• 6.24.7 Constructor(left as Double, top as Double, width as Double, height as Double)
397
• 6.24.8 Constructor(left as Double, top as Double, width as Double, height as Double, pullsDown as
boolean)
397
6.24.7
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
popup button with the given size and position.
Example:
dim x as new NSPopUpButtonMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.
See also:
• 6.24.5 Constructor
396
• 6.24.6 Constructor(Handle as Integer)
397
• 6.24.8 Constructor(left as Double, top as Double, width as Double, height as Double, pullsDown as
boolean)
397
6.24.8
Constructor(left as Double, top as Double, width as Double, height as
Double, pullsDown as boolean)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an
NSPopUpButton object initialized to the specified dimensions.
398
CHAPTER 6. COCOA CONTROLS
Notes:
left,top,width,height: The frame rectangle for the button, specified in the parent view’s coordinate system.
pullsDown: true if you want the receiver to display a pull-down menu; otherwise, false if you want it to
display a pop-up menu.
See also:
• 6.24.5 Constructor
396
• 6.24.6 Constructor(Handle as Integer)
397
• 6.24.7 Constructor(left as Double, top as Double, width as Double, height as Double)
397
6.24.9
indexOfItem(item as NSMenuItemMBS) as Integer
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the index
of the specified menu item.
Notes:
item: The menu item whose index you want.
Returns the index of the item or -1 if no such item was found.
This method invokes the method of the same name of its NSPopUpButtonCell object.
6.24.10
indexOfItemWithTag(tag as Integer) as Integer
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the index
of the menu item with the specified tag.
Notes:
tag: The tag of the menu item you want.
Returns the index of the item or -1 if no item with the specified tag was found.
This method invokes the method of the same name of its NSPopUpButtonCell object.
6.24.11
indexOfItemWithTitle(title as string) as Integer
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the index
of the item with the specified title.
Notes:
6.24. CLASS NSPOPUPBUTTONMBS
399
title: The title of the item you want.
Returns the index of the item or -1 if no item with the specified title was found.
6.24.12
indexOfSelectedItem as Integer
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the index
of the item last selected by the user.
Notes: The index of the selected item, or -1 if no item is selected.
6.24.13
insertItemWithTitle(title as string, atIndex as Integer)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Inserts an item at
the specified position in the menu.
Notes:
title: The title of the new item. If an item with the same title already exists in the menu, the existing item
is removed and the new one is added
index: The zero-based index at which to insert the item. Specifying 0 inserts the item at the top of the menu.
If you want to move an item, it’s better to invoke removeItemWithTitle: explicitly and then send this
method. After adding the item, this method uses the synchronizeTitleAndSelectedItem method to make
sure the item displayed matches the currently selected item.
Since this method searches for duplicate items, it should not be used if you are adding an item to an already
populated menu with more than a few hundred items. Add items directly to the receiver’s menu instead.
6.24.14
itemAtIndex(index as Integer) as NSMenuItemMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the menu
item at the specified index.
Notes:
index: The index of the item you want.
Returns the menu item, or nil if no item exists at the specified index.
400
6.24.15
CHAPTER 6. COCOA CONTROLS
itemWithTitle(title as string) as NSMenuItemMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the menu
item with the specified title.
Notes:
title: The title of the menu item you want.
The menu item, or nil if no item with the specified title exists in the menu.
6.24.16
lastItem as NSMenuItemMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the last
item in the menu.
6.24.17
removeAllItems
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Removes all items
in the receiver’s item menu.
Notes: After removing the items, this method uses the synchronizeTitleAndSelectedItem method to refresh
the menu.
6.24.18
removeItemAtIndex(index as Integer)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Removes the item
at the specified index.
Notes:
index: The zero-based index indicating which item to remove. Specifying 0 removes the item at the top of
the menu.
After removing the item, this method uses the synchronizeTitleAndSelectedItem method to make sure the
title displayed matches the currently selected item.
6.24.19
removeItemWithTitle(title as string)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Removes the item
with the specified title from the menu.
Notes:
6.24. CLASS NSPOPUPBUTTONMBS
401
title: The title of the item you want to remove. If no menu item exists with the specified title, this method
triggers an assertion.
This method removes the first item it finds with the specified name. This method then uses synchronizeTitleAndSelectedItem to refresh the menu.
6.24.20
selectItem(item as NSMenuItemMBS)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Selects the specified
menu item.
Notes: item: The menu item to select, or nil if you want to deselect all menu items.
6.24.21
selectItemAtIndex(index as Integer)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Selects the item in
the menu at the specified index.
Notes: index: The index of the item you want to select, or -1 you want to deselect all menu items.
6.24.22
selectItemWithTag(tag as Integer) as boolean
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Selects the menu
item with the specified tag.
Notes:
tag: The tag of the item you want to select.
Returns true if the item was successfully selected; otherwise, false.
If no item with the specified tag is found, this method returns false and leaves the menu state unchanged.
You typically assign tags to menu items from Interface Builder, but you can also assign them programmatically using the setTag: method of NSMenuItem.
Available in Mac OS X v10.4 and later.
402
6.24.23
CHAPTER 6. COCOA CONTROLS
selectItemWithTitle(title as string)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Selects the item
with the specified title.
Notes: title: The title of the item to select. If you specify an empty string, or a string that does not match
the title of a menu item, this method deselects the currently selected item.
6.24.24
setTitle(title as string)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets the string
displayed in the receiver when the user isn’t pressing the mouse button.
Notes: If the receiver displays a pop-up menu, this method changes the current item to be the item with
the specified title, adding a new item by that name if one does not already exist. If the receiver displays a
pull-down list, this method sets its title to the specified string.
6.24.25
synchronizeTitleAndSelectedItem
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Ensures that the
item being displayed by the receiver agrees with the selected item.
Notes: If there’s no selected item, this method selects the first item in the item menu and sets the receiver’s
item to match. For pull-down menus, this method makes sure that the first item is being displayed (the
NSPopUpButtonCell object must be set to use the selected menu item, which happens by default).
6.24.26
titleOfSelectedItem as string
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the title of
the item last selected by the user.
Notes: Returns the title of the selected menu item, or an empty string if no item is selected.
6.24.27
Properties
6.24.28
arrowPosition as Integer
Plugin Version: 14.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The position of the
arrow displayed.
Notes:
If you specify NSPopUpNoArrow, the receiver displays no arrow. NSPopUpArrowAtCenter displays the
arrow centered horizontally within the cell. NSPopUpArrowAtBottom displays the arrow at the edge of
the cell. This method works with setPreferredEdge: to determine the exact location and orientation of the
6.24. CLASS NSPOPUPBUTTONMBS
403
arrow. For more information, see setPreferredEdge:.
This method is ignored unless the receiver is a pull-down list with a beveled border.
(Read and Write property)
6.24.29
autoenablesItems as boolean
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the receiver
automatically enables and disables its items every time a user event occurs.
Notes:
true if the receiver automatically enables and disables items; otherwise, false. The default value is true.
(Read and Write property)
6.24.30
menu as NSMenuMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the pop-up
button’s associated menu.
Notes: (Read and Write property)
6.24.31
numberOfItems as Integer
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the number
of items in the menu.
Notes: (Read only property)
6.24.32
pullsDown as boolean
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating the behavior of the control’s menu.
Notes:
True if the menu behaves like a pull-down menu; otherwise, false if it behaves like a pop-up menu.
(Read and Write property)
404
6.24.33
CHAPTER 6. COCOA CONTROLS
selectedItem as NSMenuItemMBS
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the menu
item last selected by the user.
Notes:
Returns the menu item that is currently selected, or nil if no item is selected.
The last selected menu item is the one that was highlighted when the user released the mouse button. It is
possible for a pull-down menu’s selected item to be its first item.
(Read and Write computed property)
6.24.34
Constants
6.24.35
NSPopUpArrowAtBottom = 2
Plugin Version: 14.3. Function: One of the constants for the arrow positions.
Notes: Arrow is drawn at the edge of the button, pointing toward the preferredEdge.
6.24.36
NSPopUpArrowAtCenter = 1
Plugin Version: 14.3. Function: One of the constants for the arrow positions.
Notes: Arrow is centered vertically, pointing toward the preferredEdge.
6.24.37
NSPopUpNoArrow = 0
Plugin Version: 14.3. Function: One of the constants for the arrow positions.
Notes: Does not display any arrow in the receiver.
6.25. CLASS NSPROGRESSINDICATORMBS
6.25
class NSProgressIndicatorMBS
6.25.1
class NSProgressIndicatorMBS
405
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The NSProgressIndicator class lets an application display a progress indicator to show that a lengthy task is under way.
Notes:
Some progress indicators are indeterminate and do nothing more than spin to show that the application is
busy. Others are determinate and show the percentage of the task that has been completed.
This also eliminates the hung appearance is you move the window or open a menu. Unlike the RB progress
controls that pause when you do these things, the Cocoa version continues to update.
You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSViewMBS class.
6.25.2
Methods
6.25.3
Constructor
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
progress indicator with size 100/100 and position 0/0
Example:
dim t as new NSProgressIndicatorMBS
Notes: On success the handle property is not zero.
See also:
• 6.25.4 Constructor(Handle as Integer)
405
• 6.25.5 Constructor(left as Double, top as Double, width as Double, height as Double)
406
6.25.4
Constructor(Handle as Integer)
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSProgressIndicator handle.
Example:
dim t as new NSProgressIndicatorMBS(0, 0, 100, 100)
dim v as new NSProgressIndicatorMBS(t.handle)
406
CHAPTER 6. COCOA CONTROLS
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSProgressIndicator and the plugin retains this handle.
See also:
• 6.25.3 Constructor
405
• 6.25.5 Constructor(left as Double, top as Double, width as Double, height as Double)
406
6.25.5
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
progress indicator with the given size and position.
Example:
dim x as new NSProgressIndicatorMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.
See also:
• 6.25.3 Constructor
405
• 6.25.4 Constructor(Handle as Integer)
405
6.25.6
incrementBy(delta as Double)
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Advances the progress
bar of a determinate progress indicator by the specified amount.
Notes: The amount by which to increment the progress bar. For example, if you want to advance a progress
bar from 0.0 to 100.0 in 20 steps, you would invoke incrementBy 20 times with a delta value of 5.0.
6.25.7
sizeToFit
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: This action method
resizes the receiver to an appropriate size depending on what style returns.
Notes: Use this after you set style to re-size the receiver.
6.25. CLASS NSPROGRESSINDICATORMBS
6.25.8
407
startAnimation
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Starts the animation
of an indeterminate progress indicator.
Notes: Does nothing for a determinate progress indicator.
6.25.9
stopAnimation
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Stops the animation
of an indeterminate progress indicator.
Notes: Does nothing for a determinate progress indicator.
6.25.10
Properties
6.25.11
controlSize as Integer
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The size of the
receiver.
Notes: (Read and Write computed property)
6.25.12
controlTint as Integer
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The receiver’s control
tint.
Notes: (Read and Write computed property)
6.25.13
doubleValue as Double
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A value that indicates
the current extent of the progress bar of a determinate progress indicator.
Notes:
The value representing the current extent of a determinate progress bar. For example, a determinate progress
indicator goes from 0.0 to 100.0 by default. If the progress bar has advanced halfway across the view, the
value returned by doubleValue would be 50.0. An indeterminate progress indicator does not use this value.
(Read and Write computed property)
408
6.25.14
CHAPTER 6. COCOA CONTROLS
isBezeled as boolean
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the receiver’s frame has a bezel.
Notes:
True if the receiver’s frame has a three-dimensional bezel; otherwise, false.
(Read and Write computed property)
6.25.15
isDisplayedWhenStopped as boolean
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the receiver shows itself even when it’s not animating.
Notes:
True if the progress indicator shows itself even when it’s not animating. By default, this returns returns true
if style is NSProgressIndicatorBarStyle and false if style isNSProgressIndicatorSpinningStyle.
(Read and Write computed property)
6.25.16
isIndeterminate as boolean
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the receiver
is indeterminate.
Notes:
This method only has an effect if style returns NSProgressIndicatorBarStyle. If style returns NSProgressIndicatorSpinningStyle, the indicator is always indeterminate, regardless of what you pass to this method.
(Read and Write computed property)
6.25.17
maxValue as Double
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The maximum value
for the receiver.
Notes:
The maximum value of the progress indicator. An indeterminate progress indicator does not use this value.
(Read and Write computed property)
6.25. CLASS NSPROGRESSINDICATORMBS
6.25.18
409
minValue as Double
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The minimum value
for the receiver.
Notes:
An indeterminate progress indicator does not use this value.
(Read and Write computed property)
6.25.19
style as Integer
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The style of the
progress indicator (bar or spinning).
Notes:
Either NSProgressIndicatorBarStyle or NSProgressIndicatorSpinningStyle.
(Read and Write computed property)
6.25.20
usesThreadedAnimation as boolean
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A hint as to whether
the receiver should implement animation of the progress indicator in a separate thread.
Notes:
Value is true to indicate that animation of the progress indicator should occur in a separate thread; otherwise, false. This value is only a hint and may be ignored.
If the application becomes multithreaded as a result of an invocation of this method, the application’s performance could become noticeably slower.
(Read and Write computed property)
6.25.21
Constants
6.25.22
NSBlueControlTint=1
Plugin Version: 8.4. Function: One of the constants to specify a the control tint.
Notes: Aqua control tint
410
6.25.23
CHAPTER 6. COCOA CONTROLS
NSClearControlTint=7
Plugin Version: 8.4. Function: One of the constants to specify a the control tint.
Notes: Clear control tint
6.25.24
NSDefaultControlTint=0
Plugin Version: 8.4. Function: One of the constants to specify a the control tint.
Notes: The current default tint setting
6.25.25
NSGraphiteControlTint=6
Plugin Version: 8.4. Function: One of the constants to specify a the control tint.
Notes: Graphite control tint
6.25.26
NSMiniControlSize=2
Plugin Version: 8.4. Function: One of the values for the ControlSize property.
Notes: The control has a smaller size than NSSmallControlSize.
6.25.27
NSProgressIndicatorBarStyle=0
Plugin Version: 8.4. Function: One of the constants for the style property.
Notes: A rectangular indicator that can be determinate or indeterminate.
6.25.28
NSProgressIndicatorPreferredAquaThickness=12
Plugin Version: 8.4. Function: One of the constants to specify the height of a progress indicator.
6.25.29
NSProgressIndicatorPreferredLargeThickness=18
Plugin Version: 8.4. Function: One of the constants to specify the height of a progress indicator.
6.25. CLASS NSPROGRESSINDICATORMBS
6.25.30
411
NSProgressIndicatorPreferredSmallThickness=10
Plugin Version: 8.4. Function: One of the constants to specify the height of a progress indicator.
6.25.31
NSProgressIndicatorPreferredThickness=14
Plugin Version: 8.4. Function: One of the constants to specify the height of a progress indicator.
6.25.32
NSProgressIndicatorSpinningStyle=1
Plugin Version: 8.4. Function: One of the constants for the style property.
Notes: A small square indicator that can be indeterminate only .
6.25.33
NSRegularControlSize=0
Plugin Version: 8.4. Function: One of the values for the ControlSize property.
Notes: The control is sized as regular.
6.25.34
NSSmallControlSize=1
Plugin Version: 8.4. Function: One of the values for the ControlSize property.
Notes: This constant is for controls that cannot be resized in one direction, such as push buttons, radio
buttons, checkboxes, sliders, scroll bars, pop-up buttons, tabs, and progress indicators. You should use a
small system font with a small control.
412
CHAPTER 6. COCOA CONTROLS
6.26
class NSScrollerMBS
6.26.1
class NSScrollerMBS
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: An NSScroller object
controls scrolling of a document view within an NSScrollView’s clip view (or potentially another kind of
container view).
Notes:
It typically displays a pair of buttons that the user can click to scroll by a small amount (called a line
increment or decrement) and Alt-click to scroll by a large amount (called a page increment or decrement),
plus a slot containing a knob that the user can drag directly to the desired location. The knob indicates both
the position within the document view and, by varying in size within the slot, the amount visible relative to
the size of the document view. You can configure whether an NSScroller object uses scroll buttons, but it
always draws the knob when there’s room for it.
Don’t use an NSScroller when an NSSlider would be better. A slider represents a range of values for something in the application and lets the user choose a setting. A scroller represents the relative position of the
visible portion of a view and lets the user choose which portion to view.
You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSControlMBS class.
6.26.2
Methods
6.26.3
checkSpaceForParts
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Checks to see if there
is enough room in the receiver to display the knob and buttons.
Notes: usableParts returns the state calculated by this method. You should never need to invoke this
method; it’s invoked automatically whenever the NSScroller’s size changes.
6.26.4
Constructor
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new scroller
with size 100/100 and position 0/0
Example:
dim t as new NSScrollerMBS
Notes: On success the handle property is not zero.
6.26. CLASS NSSCROLLERMBS
413
See also:
• 6.26.5 Constructor(Handle as Integer)
413
• 6.26.6 Constructor(left as Double, top as Double, width as Double, height as Double)
413
6.26.5
Constructor(Handle as Integer)
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSScroller handle.
Example:
dim t as new NSScrollerMBS(0, 0, 100, 100)
dim v as new NSScrollerMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSScroller and the plugin retains this handle.
See also:
• 6.26.4 Constructor
412
• 6.26.6 Constructor(left as Double, top as Double, width as Double, height as Double)
413
6.26.6
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new scroller
with the given size and position.
Example:
dim x as new NSScrollerMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.
See also:
• 6.26.4 Constructor
412
• 6.26.5 Constructor(Handle as Integer)
413
6.26.7
drawArrow(Arrow as Integer, highlight as boolean)
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Draws the scroll
button indicated by arrow, which is either NSScrollerIncrementArrow (the down or right scroll button) or
414
CHAPTER 6. COCOA CONTROLS
NSScrollerDecrementArrow (up or left).
Notes:
If flag is true, the button is drawn highlighted; otherwise it’s drawn normally. You should never need to
invoke this method directly, but may wish to override it to customize the appearance of scroll buttons.
Calling this method on CustomNSScrollerMBS objects does not trigger the drawArrow event.
6.26.8
drawKnob
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Draws the knob.
Notes:
You should never need to invoke this method directly, but may wish to override it to customize the appearance of the knob.
Calling this method on CustomNSScrollerMBS objects does not trigger the drawKnob event.
6.26.9
drawKnobSlotInRect(slotRect as NSRectMBS, highlight as boolean)
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Draws the knob slow
in the rectangle.
Notes: Calling this method on CustomNSScrollerMBS objects does not trigger the drawKnobSlotInRect
event.
6.26.10
drawParts
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Caches images for
the scroll buttons and knob.
Notes:
It’s invoked only once when the NSScroller is created. You may want to override this method if you alter
the look of the NSScroller, but you should never invoke it directly.
Calling this method on CustomNSScrollerMBS objects does not trigger the drawParts event.
6.26.11
highlight(flag as boolean)
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Highlights or unhighlights the scroll button the user clicked.
Notes: The receiver invokes this method while tracking the mouse; you should not invoke it directly. If flag
6.26. CLASS NSSCROLLERMBS
415
is true, the appropriate part is drawn highlighted; otherwise it’s drawn normally.
6.26.12
hitPart as Integer
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a part code
indicating the manner in which the scrolling should be performed.
Notes: This method is typically invoked by an NSScrollView to determine how to scroll its document view
when it receives an action message from the NSScroller.
6.26.13
isCompatibleWithOverlayScrollers as boolean
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether the class is compatible with overlay scroller style and behavior.
Notes:
Returns true if the the class is compatible with overlay scroller style and behavior, otherwise false.
The plugin implements this so you can query the value.
6.26.14
NSPreferredScrollerStyleDidChangeNotification as string
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A notification name.
Notes:
Posted if the preferred scroller style changes.
Available in Mac OS X v10.7 and later.
6.26.15
preferredScrollerStyle as Integer
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the style
of scrollers that applications should use wherever possible.
Notes:
The preferred scroller style is determined by the Appearance preference panel’s ”Show scroll bars” setting
for the current user, andwhen the user’s preference is set to ”Automatically based on input device”by the
set of built-in and connected pointing devices and the user’s scroll capability preference settings for them.
The preferred scroller style may therefore change over time, and applications should be prepared to adapt
their user interfaces to the new scroller style if needed.
In most cases, updating to a new scroller style is automatic: When the preferred scroller style changes,
AppKit notifies all NSScrollView instances, sending setScrollerStyle to each with the new style, which causes
416
CHAPTER 6. COCOA CONTROLS
each scroll view to automatically re-tile (update its layout) to adapt to the new scroller style. Some NSScrollView instances may refuse the new scroller style setting if they cannot accommodate it for compatibility
reasons (the presence of accessory views or legacy scroller subclasses prevent use of overlay scrollers), but
most instances will switch to the specified new preferred scroller style.
If you need to be notified of changes to the preferred scroller style, you can register to receive NSPreferredScrollerStyleDidChangeNotification notifications.
Available in Mac OS X v10.7 and later.
6.26.16
rectForPart(part as Integer) as NSRectMBS
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
rectangle occupied by aPart, which for this method is interpreted literally rather than as an indicator of
scrolling direction.
Notes:
Note the interpretations of NSScrollerDecrementPage and NSScrollerIncrementPage. The actual part of an
NSScroller that causes page-by-page scrolling varies, so as a convenience these part codes refer to useful
parts different from the scroll buttons.
Returns NSRectMBS.Zero if the part requested isn’t present on the receiver.
6.26.17
scrollerWidth as Double
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the width of
”normal-sized” instances.
Notes: NSScrollView uses this value to lay out its components. Subclasses that use a different width should
override this method.
6.26.18
scrollerWidthForControlSize(controlsize as Integer) as Double
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the width of
the scroller based on controlSize.
6.26. CLASS NSSCROLLERMBS
6.26.19
417
setFloatValue(aFloat as Double, proportion as Double)
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets the position of
the knob to aFloat, which is a value from 0.0 (indicating the top or left end) to 1.0 (the bottom or right
end).
Notes:
Also sets the proportion of the knob slot filled by the knob to knobProp, also a value from 0.0 (minimal size)
to 1.0 (fills the slot).
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.5.
6.26.20
testPart(p as NSPointMBS) as Integer
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the part
that would be hit by a mouse-down event at p (expressed in the window’s coordinate system).
Notes: Note the interpretations of NSScrollerDecrementPage and NSScrollerIncrementPage. The actual
part of an NSScroller that causes page-by-page scrolling varies, so as a convenience these part codes refer to
useful parts different from the scroll buttons.
6.26.21
trackKnob(theEvent as NSEventMBS)
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Tracks the knob and
sends action messages to the receiver’s target.
Notes: This method is invoked automatically when the receiver receives theEvent mouse-down event in the
knob; you should not invoke it directly.
6.26.22
trackScrollButtons(theEvent as NSEventMBS)
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Tracks the scroll
buttons and sends action messages to the receiver’s target.
Notes: This method is invoked automatically when the receiver receives theEvent mouse-down event in a
scroll button; you should not invoke this method directly.
6.26.23
usableParts as Integer
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a value
indicating which parts of the receiver are displayed and usable.
418
CHAPTER 6. COCOA CONTROLS
6.26.24
Properties
6.26.25
arrowsPosition as Integer
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The location of the
scroll buttons within the receiver.
Notes:
Can be NSScrollerArrowsMaxEnd, NSScrollerArrowsMinEnd, NSScrollerArrowsDefaultSetting or NSScrollerArrowsNone.
(Read and Write computed property)
6.26.26
controlSize as Integer
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The size of the
receiver.
Notes:
Can be NSRegularControlSize, NSMiniControlSize or NSSmallControlSize.
(Read and Write computed property)
6.26.27
controlTint as Integer
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The receiver’s control
tint.
Notes:
Can be NSGraphiteControlTint, NSBlueControlTint, NSClearControlTint or NSDefaultControlTint.
(Read and Write computed property)
6.26.28
knobProportion as Double
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The portion of the
knob slot the knob should fill, as a floating-point value from 0.0 (minimal size) to 1.0 (fills the slot).
Notes:
Can be set on Mac OS X 10.5 directly.
(Read and Write computed property)
6.26. CLASS NSSCROLLERMBS
6.26.29
419
knobStyle as Integer
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The knob style.
Notes:
The value of this property does not affect legacy scrollers. NSScrollerKnobStyleDefault is appropriate for
a wide range of content, but in some cases choosing an alternative knob style may enhance visibility of the
scroller knob atop some kinds of content.
Available in Mac OS X v10.7 and later.
use constants: NSScrollerKnobStyleDefault, NSScrollerKnobStyleDark or NSScrollerKnobStyleLight.
(Read and Write computed property)
6.26.30
scrollerStyle as Integer
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The scroller style.
Notes:
or a scroller that’s managed by an NSScrollView object, the setter is automatically invoked by the scroll
view with the appropriate setting, according to the user’s Appearance preference settings and possibly what
pointing device(s) are present (see preferredScrollerStyle).
Available in Mac OS X v10.7 and later.
(Read and Write computed property)
6.26.31
Constants
6.26.32
NSAllScrollerParts = 2
Plugin Version: 8.4. Function: One of the constants to specify which parts of the scroller are visible.
Notes: Scroller has at least a knob, possibly also scroll buttons.
6.26.33
NSBlueControlTint = 1
Plugin Version: 8.4. Function: One of the constants to specify a the control tint.
Notes: Aqua control tint
420
6.26.34
CHAPTER 6. COCOA CONTROLS
NSClearControlTint = 7
Plugin Version: 8.4. Function: One of the constants to specify a the control tint.
Notes: Clear control tint
6.26.35
NSDefaultControlTint = 0
Plugin Version: 8.4. Function: One of the constants to specify a the control tint.
Notes: The current default tint setting
6.26.36
NSGraphiteControlTint = 6
Plugin Version: 8.4. Function: One of the constants to specify a the control tint.
Notes: Graphite control tint
6.26.37
NSMiniControlSize = 2
Plugin Version: 8.4. Function: One of the values for the ControlSize property.
Notes: The control has a smaller size than NSSmallControlSize.
6.26.38
NSNoScrollerParts = 0
Plugin Version: 8.4. Function: One of the constants to specify which parts of the scroller are visible.
Notes: Scroller has neither a knob nor scroll buttons, only the knob slot.
6.26.39
NSOnlyScrollerArrows = 1
Plugin Version: 8.4. Function: One of the constants to specify which parts of the scroller are visible.
Notes: Scroller has only scroll buttons, no knob.
6.26.40
NSRegularControlSize = 0
Plugin Version: 8.4. Function: One of the values for the ControlSize property.
Notes: The control is sized as regular.
6.26. CLASS NSSCROLLERMBS
6.26.41
421
NSScrollerArrowsDefaultSetting = 0
Plugin Version: 8.4. Function: One of the constants to specify where the scroller’s buttons appear with
the arrowsPosition property.
Notes: Contains the information from the AppleScrollBarVariant default value.
6.26.42
NSScrollerArrowsMaxEnd = 0
Plugin Version: 8.4. Function: One of the constants to specify where the scroller’s buttons appear with
the arrowsPosition property.
Notes: Buttons at bottom or right. This constant has been deprecated.
6.26.43
NSScrollerArrowsMinEnd = 1
Plugin Version: 8.4. Function: One of the constants to specify where the scroller’s buttons appear with
the arrowsPosition property.
Notes: Buttons at top or left. This has been deprecated.
6.26.44
NSScrollerArrowsNone = 2
Plugin Version: 8.4. Function: One of the constants to specify where the scroller’s buttons appear with
the arrowsPosition property.
Notes: No buttons.
6.26.45
NSScrollerDecrementArrow = 1
Plugin Version: 9.6. Function: One of the constants describe the two scroller buttons and are used by
drawArrow.
Notes: The down or right scroll button.
6.26.46
NSScrollerDecrementLine = 4
Plugin Version: 8.4. Function: One of the constants to specify the different parts of the scroller.
Notes: Up or left by a small amount.
422
6.26.47
CHAPTER 6. COCOA CONTROLS
NSScrollerDecrementPage = 1
Plugin Version: 8.4. Function: One of the constants to specify the different parts of the scroller.
Notes: Up or left by a large amount.
6.26.48
NSScrollerIncrementArrow = 0
Plugin Version: 9.6. Function: One of the constants describe the two scroller buttons and are used by
drawArrow.
Notes: The up or left scroll button.
6.26.49
NSScrollerIncrementLine = 5
Plugin Version: 8.4. Function: One of the constants to specify the different parts of the scroller.
Notes: Down or right by a small amount.
6.26.50
NSScrollerIncrementPage = 3
Plugin Version: 8.4. Function: One of the constants to specify the different parts of the scroller.
Notes: Down or right by a large amount.
6.26.51
NSScrollerKnob = 2
Plugin Version: 8.4. Function: One of the constants to specify the different parts of the scroller.
Notes: Directly to the NSScroller’s value, as given by floatValue.
6.26.52
NSScrollerKnobSlot = 6
Plugin Version: 8.4. Function: One of the constants to specify the different parts of the scroller.
Notes: Directly to the NSScroller’s value, as given by floatValue.
6.26.53
NSScrollerKnobStyleDark = 1
Plugin Version: 11.3. Function: One of the knob style constants.
Notes:
6.26. CLASS NSSCROLLERMBS
Specifies a dark knob.
This style is particularly good against a light background.
Available in Mac OS X v10.7 and later.
6.26.54
NSScrollerKnobStyleDefault = 0
Plugin Version: 11.3. Function: One of the knob style constants.
Notes:
Specifies a dark knob with a light border.
This is the default style; it is good against any background.
Available in Mac OS X v10.7 and later.
6.26.55
NSScrollerKnobStyleLight = 2
Plugin Version: 11.3. Function: One of the knob style constants.
Notes:
Specifies a light knob.
This style is particularly good against a dark background.
Available in Mac OS X v10.7 and later.
6.26.56
NSScrollerNoPart = 0
Plugin Version: 8.4. Function: One of the constants to specify the different parts of the scroller.
Notes: Don’t scroll at all.
6.26.57
NSScrollerStyleLegacy = 0
Plugin Version: 11.3. Function: One of the constants to specify the scroller style.
Notes:
Specifies legacy-style scrollers as prior to Mac OS X v10.7.
Available in Mac OS X v10.7 and later.
6.26.58
NSScrollerStyleOverlay = 1
Plugin Version: 11.3. Function: One of the constants to specify the scroller style.
Notes:
423
424
CHAPTER 6. COCOA CONTROLS
Specifies overlay-style scrollers in Mac OS X v10.7 and later.
Available in Mac OS X v10.7 and later.
6.26.59
NSSmallControlSize = 1
Plugin Version: 8.4. Function: One of the values for the ControlSize property.
Notes: This constant is for controls that cannot be resized in one direction, such as push buttons, radio
buttons, checkboxes, sliders, scroll bars, pop-up buttons, tabs, and progress indicators. You should use a
small system font with a small control.
6.27. CLASS NSSCROLLVIEWMBS
6.27
class NSScrollViewMBS
6.27.1
class NSScrollViewMBS
425
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The Cocoa class for
a view which has scrollbars.
Notes:
Embed another view inside it to add scrolling.
You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSViewMBS class.
6.27.2
Methods
6.27.3
Constructor
Plugin Version: 8.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
scrollview with size 100/100 and position 0/0
Example:
dim t as new NSScrollViewMBS
Notes: On success the handle property is not zero.
See also:
• 6.27.4 Constructor(Handle as Integer)
425
• 6.27.5 Constructor(left as Double, top as Double, width as Double, height as Double)
426
6.27.4
Constructor(Handle as Integer)
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSScrollView handle.
Example:
dim t as new NSScrollViewMBS(0, 0, 100, 100)
dim v as new NSScrollViewMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
426
CHAPTER 6. COCOA CONTROLS
Notes: The handle is casted to a NSScrollView and the plugin retains this handle.
See also:
• 6.27.3 Constructor
425
• 6.27.5 Constructor(left as Double, top as Double, width as Double, height as Double)
426
6.27.5
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
scrollview with the given size and position.
Example:
dim x as new NSScrollViewMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.
See also:
• 6.27.3 Constructor
425
• 6.27.4 Constructor(Handle as Integer)
425
6.27.6
flashScrollers
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Flash the overlay
scroll bars.
Notes:
This method is only to scroll views that use overlay scrollers.
This method can be invoked to cause the overlay scroller knobs to be momentarily shown. This may be
desirable when changing a document view’s size or swapping new content into the view, or to give the user
a sense of the current position within the scrollable range at each step of an incremental search or similar
operation.
Available in Mac OS X v10.7 and later.
6.27.7
reflectScrolledClipView(clipView as NSClipViewMBS)
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Adjusts the
receiver’s scrollers to reflect the size and positioning of its content view.
Notes:
6.27. CLASS NSSCROLLVIEWMBS
427
ClipView: The clip view being adjusted to. If aClipView is any view object other than the receiver’s content
view, the method does nothing.
This method is invoked automatically during scrolling and when an NSClipView object’s relationship to its
document view changes; you should rarely need to invoke it yourself, but may wish to override it for custom
updating or other behavior. If you override this method, be sure to call the superclass implementation. If
you do not, other controls (such as the current scrollers) may not be updated properly.
Available in Mac OS X v10.0 and later.
6.27.8
tile
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Lays out the components of the receiver: the content view, the scrollers, and the ruler views.
Notes: You rarely need to invoke this method, but subclasses may override it to manage additional components.
6.27.9
6.27.10
Properties
autohidesScrollers as boolean
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: True when autohiding
is set for scroll bars in the scrollview.
Notes: (Read and Write property)
6.27.11
backgroundColor as NSColorMBS
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The background
color.
Notes: (Read and Write property)
6.27.12
borderType as Integer
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The border type.
Notes:
Specifies the appearance of the style of the scroll view’s border. See NSBorderType for a list of possible
values.
Use constants NSNoBorder = 0, NSLineBorder = 1, NSBezelBorder = 2 or NSGrooveBorder = 3.
428
CHAPTER 6. COCOA CONTROLS
(Read and Write property)
6.27.13
contentSize as NSSizeMBS
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the size of
the receiver’s content view.
Notes: (Read only property)
6.27.14
contentView as NSClipViewMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The content view.
Notes:
If view has a document view, this method also sets the receiver’s document view to be the document view
of view. The original content view retains its document view.
(Read and Write property)
6.27.15
documentCursor as NSCursorMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The cursor used
when the cursor is over the content view.
Notes: (Read and Write property)
6.27.16
documentView as NSViewMBS
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The view the receiver
scrolls within its content view.
Notes: (Read and Write property)
6.27.17
documentVisibleRect as NSRectMBS
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the portion
of the document view, in its own coordinate system, visible through the receiver’s content view.
Notes: (Read only property)
6.27. CLASS NSSCROLLVIEWMBS
6.27.18
429
drawsBackground as boolean
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A Boolean value that
indicates whether the scrollview draws its background.
Notes: (Read and Write property)
6.27.19
hasHorizontalRuler as boolean
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: True if the receiver
maintains a horizontal ruler view, false if it doesn’t.
Notes: (Read and Write property)
6.27.20
hasHorizontalScroller as boolean
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the receiver
keeps a horizontal scroller
Notes: (Read and Write property)
6.27.21
hasVerticalRuler as boolean
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Determines whether
the scrollview keeps a vertical ruler object.
Notes: (Read and Write property)
6.27.22
hasVerticalScroller as boolean
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: True if the scrollview
displays a vertical scroller, false if it doesn’t.
Notes: (Read and Write property)
6.27.23
horizontalLineScroll as Double
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The amount by
which the receiver scrolls itself horizontally when scrolling line by line to aFloat, expressed in the content
view’s coordinate system.
Notes:
430
CHAPTER 6. COCOA CONTROLS
This amount is the amount used when the user clicks the scroll arrows on the horizontal scroll bar without
holding down a modifier key. When displaying text in an NSScrollView, for example, you might set this
amount to the height of a single line of text in the default font.
(Read and Write property)
6.27.24
horizontalPageScroll as Double
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The amount of
the document view kept visible when scrolling horizontally page by page, expressed in the content view’s
coordinate system.
Notes:
This amount is used when the user clicks the scroll arrows on the horizontal scroll bar while holding down
the Option key.
This amount expresses the context that remains when the receiver scrolls by one page, allowing the user to
orient to the new display. It differs from the line scroll amount, which indicates how far the document view
moves. The page scroll amount is the amount common to the content view before and after the document
view is scrolled by one page.
(Read and Write property)
6.27.25
horizontalScrollElasticity as Integer
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The scroll view’s
horizontal elasticity mode.
Notes:
A scroll view can scroll its contents past its bounds to achieve an elastic effect.
When set to NSScrollElasticityAutomatic, scrolling the horizontal axis beyond its document bounds only
occurs if the document width is greater than the view width or, the vertical scroller is hidden and the horizontal scroller is visible.
The default value is NSScrollElasticityAutomatic.
Available in Mac OS X v10.7 and later.
(Read and Write property)
6.27. CLASS NSSCROLLVIEWMBS
6.27.26
431
horizontalScroller as NSScrollerMBS
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The receiver’s
horizontal scroller, regardless of whether the receiver is currently displaying it, or nil if the receiver has none.
Notes: (Read and Write property)
6.27.27
lineScroll as Double
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The horizontal and
vertical line scroll amounts to aFloat.
Notes:
The line scroll is the amount by which the receiver scrolls itself when scrolling line by line, expressed in the
content view’s coordinate system. It’s used when the user clicks the scroll arrows without holding down a
modifier key. When displaying text in an NSScrollView, for example, you might set this value to the height
of a single line of text in the default font.
As part of its implementation, this method sets VerticalLineScroll and HorizontalLineScroll.
(Read and Write property)
6.27.28
pageScroll as Double
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The vertical
page scroll amount: the amount of the document view kept visible when scrolling vertically page by page,
expressed in the content view’s coordinate system.
Notes:
This amount is used when the user clicks the scroll arrows on the vertical scroll bar while holding down the
Option key. As part of its implementation, this method calls verticalPageScroll.
This amount expresses the context that remains when the receiver scrolls by one page, allowing the user to
orient to the new display. It differs from the line scroll amount, which indicates how far the document view
moves. The page scroll amount is the amount common to the content view before and after the document
view is scrolled by one page.
Note that a scroll view can have two different page scroll amounts: verticalPageScroll and horizontalPageScroll. Use this method only if you can be sure they’re both the same.
(Read and Write property)
432
6.27.29
CHAPTER 6. COCOA CONTROLS
rulersVisible as boolean
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether rulers
should be visible.
Notes: (Read and Write property)
6.27.30
scrollerKnobStyle as Integer
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The knob style of
scroll views that use the overlay scroller style.
Notes:
Applicable only to scroll views that use overlay scrollers.
Available in Mac OS X v10.7 and later.
(Read and Write property)
6.27.31
scrollerStyle as Integer
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The scroller style
used by the scroll view.
Notes:
This setting is automatically set at runtime, based on the user’s preference setting and, if relevant, the set of
connected pointing devices and their configured scroll capabilities, as determined by the NSScroller method
preferredScrollerStyle.
Setting an scroll view’s scroller style sets the style of both the horizontal and vertical scrollers. If the scroll
view subsequently creates or is assigned a new horizontal or vertical scroller, they will be assigned the same
scroller style that was assigned to the scroll view..
Available in Mac OS X v10.7 and later.
(Read and Write property)
6.27.32
scrollsDynamically as boolean
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: True if the scrollview
redraws its document view while tracking the knob, false if it redraws only when the scroller knob is released.
Notes:
NSScrollView scrolls dynamically by default.
(Read and Write property)
6.27. CLASS NSSCROLLVIEWMBS
6.27.33
433
usesPredominantAxisScrolling as boolean
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the scroll
view uses a predominant scrolling axis for content.
Notes:
Whether the scroll view supports a predominant scrolling direction. true if there is a predominant scrolling
direction; otherwise false.
Some content is scrollable in both the horizontal and vertical axes, but is predominantly scrolled one axis at
a time. Other content (such as a drawing canvas) should scroll freely in both axes.
Traditionally this is not an issue with scroll wheels since they can only scroll in one direction at a time.
With scroll balls and touch surfaces, it becomes more difficult to determine the user’s intention.
This property helps a scroll view determine the user’s intention by specifying if there is a predominant
scrolling axis for content.
The default value is true.
Available in Mac OS X v10.7 and later.
(Read and Write property)
6.27.34
verticalLineScroll as Double
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The amount by
which the view scrolls itself vertically when scrolling line by line to aFloat, expressed in the content view’s
coordinate system.
Notes:
This value is the amount used when the user clicks the scroll arrows on the vertical scroll bar without holding
down a modifier key. When displaying text in an NSScrollView, for example, you might set this value to the
height of a single line of text in the default font.
(Read and Write property)
6.27.35
verticalPageScroll as Double
Plugin Version: 7.8, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The amount of the
document view kept visible when scrolling vertically page by page to aFloat, expressed in the content view’s
coordinate system.
Notes:
434
CHAPTER 6. COCOA CONTROLS
This amount is used when the user clicks the scroll arrows on the vertical scroll bar while holding down the
Option key.
This amount expresses the context that remains when the receiver scrolls by one page, allowing the user to
orient to the new display. It differs from the line scroll amount, which indicates how far the document view
moves. The page scroll amount is the amount common to the content view before and after the document
view is scrolled by one page. Thus, setting the page scroll amount to 0.0 implies that the entire visible
portion of the document view is replaced when a page scroll occurs.
(Read and Write property)
6.27.36
verticalScrollElasticity as Integer
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The scroll view’s
vertical elasticity mode.
Notes:
A scroll view can scroll its contents past its bounds to achieve an elastic effect.
When set to NSScrollElasticityAutomatic, scrolling the vertical axis beyond its document bounds occurs if
any of the following are true: the vertical scroller is visible, the content height is greater than view height,
or the horizontal scroller hidden.
Available in Mac OS X v10.7 and later.
(Read and Write property)
6.27.37
verticalScroller as NSScrollerMBS
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The receiver’s vertical
scroller, regardless of whether the receiver is currently displaying it, or nil if the receiver has none.
Notes: (Read and Write property)
6.27.38
Constants
6.27.39
NSScrollElasticityAllowed = 2
Plugin Version: 11.3. Function: One of the constants used to determine the elasticity behavior for an axis
of the scrollview..
Notes:
Allow content to be scrolled past its bounds on this axis in an elastic fashion.
6.27. CLASS NSSCROLLVIEWMBS
435
Available in Mac OS X v10.7 and later.
6.27.40
NSScrollElasticityAutomatic = 0
Plugin Version: 11.3. Function: One of the constants used to determine the elasticity behavior for an axis
of the scrollview..
Notes:
Automatically determine whether to allow elasticity on this axis.
Available in Mac OS X v10.7 and later.
6.27.41
NSScrollElasticityNone = 1
Plugin Version: 11.3. Function: One of the constants used to determine the elasticity behavior for an axis
of the scrollview..
Notes:
Disallow scrolling beyond document bounds on this axis.
Available in Mac OS X v10.7 and later.
6.27.42
NSScrollViewFindBarPositionAboveContent = 1
Plugin Version: 11.3. Function: One of the constants used to define the position of the find bar in relation
to the scroll view.
Notes:
The find bar is displayed above the scroll view content.
Available in Mac OS X v10.7 and later.
6.27.43
NSScrollViewFindBarPositionAboveHorizontalRuler = 0
Plugin Version: 11.3. Function: One of the constants used to define the position of the find bar in relation
to the scroll view.
Notes:
The find bar is displayed above the horizontal ruler, if visible.
Available in Mac OS X v10.7 and later.
436
6.27.44
CHAPTER 6. COCOA CONTROLS
NSScrollViewFindBarPositionBelowContent = 2
Plugin Version: 11.3. Function: One of the constants used to define the position of the find bar in relation
to the scroll view.
Notes:
The find bar is displayed below the scroll view content.
Available in Mac OS X v10.7 and later.
6.28. CLASS NSSLIDERMBS
6.28
class NSSliderMBS
6.28.1
class NSSliderMBS
437
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: An NSSlider object
displays a range of values for something in the application.
Notes:
Sliders can be vertical or horizontal bars or circular dials. An indicator, or knob, notes the current setting.
The user can move the knob in the slider’s baror rotate the knob in a circular sliderto change the setting.
The NSSlider class uses the NSSliderCell class to implement its user interface.
Subclass of the NSControlMBS class.
6.28.2
Methods
6.28.3
acceptsFirstMouse(event as NSEventMBS) as boolean
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Overridden by
subclasses to return true if the receiver should be sent a mouseDown event for an initial mouse-down event,
false if not.
Notes:
The receiver can either return a value unconditionally or use the location of event e to determine whether
or not it wants the event. The default implementation ignores the event and returns false.
Implement this event in a subclass to allow instances to respond to click-through. This allows the user to
click on a view in an inactive window, activating the view with one click, instead of clicking first to make the
window active and then clicking the view. Most view objects refuse a click-through attempt, so the event
simply activates the window. Many control objects, however, such as instances of NSButton and NSSlider, do
accept them, so the user can immediately manipulate the control without having to release the mouse button.
6.28.4
closestTickMarkValueToValue(value as Double) as Double
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the value of
the tick mark closest to the specified value.
438
6.28.5
CHAPTER 6. COCOA CONTROLS
Constructor
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new slider
with size 100/100 and position 0/0
Example:
dim t as new NSSliderMBS
Notes: On success the handle property is not zero.
See also:
• 6.28.6 Constructor(Handle as Integer)
438
• 6.28.7 Constructor(left as Double, top as Double, width as Double, height as Double)
438
6.28.6
Constructor(Handle as Integer)
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSSlider handle.
Example:
dim t as new NSSliderMBS(0, 0, 100, 100)
dim v as new NSSliderMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSSlider and the plugin retains this handle.
See also:
• 6.28.5 Constructor
438
• 6.28.7 Constructor(left as Double, top as Double, width as Double, height as Double)
438
6.28.7
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new slider
with the given size and position.
Example:
dim x as new NSSliderMBS(0, 0, 100, 100)
6.28. CLASS NSSLIDERMBS
439
Notes: On success the handle property is not zero.
See also:
• 6.28.5 Constructor
438
• 6.28.6 Constructor(Handle as Integer)
438
6.28.8
indexOfTickMarkAtPoint(p as NSPointMBS) as Integer
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the index of
the tick mark closest to the location of the receiver represented by the given point.
Notes:
Returns the index of the tick mark closest to the location specified by point. If point is not within the
bounding rectangle (plus an extra pixel of space) of any tick mark, the method returns NSNotFound.
In its implementation of this method, the receiving NSSlider instance simply invokes the method of the same
name of its NSSliderCell instance. This method invokes rectOfTickMarkAtIndex: for each tick mark on the
slider until it finds a tick mark containing the point.
See also:
• 6.28.9 indexOfTickMarkAtPoint(x as Double, y as Double) as Integer
6.28.9
439
indexOfTickMarkAtPoint(x as Double, y as Double) as Integer
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the index of
the tick mark closest to the location of the receiver represented by the given point.
Notes: The index of the tick mark closest to the location specified by point. If point is not within the
bounding rectangle (plus an extra pixel of space) of any tick mark, the method returns NSNotFound (&
h7fffffff).
See also:
• 6.28.8 indexOfTickMarkAtPoint(p as NSPointMBS) as Integer
6.28.10
439
isVertical as Integer
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns an integer
indicating the orientation (horizontal or vertical) of the slider.
Notes: 1 if the receiver is vertical, 0 if it’s horizontal, and 1 if the orientation can’t be determined (for example, if the slider hasn’t been displayed yet). A slider is defined as vertical if its height is greater than its width.
6.28.11
rectOfTickMarkAtIndex(index as Integer) as NSRectMBS
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the bounding
rectangle of the tick mark at the given index.
440
CHAPTER 6. COCOA CONTROLS
Notes: If no tick mark is associated with index, the method raises NSRangeException.
6.28.12
tickMarkValueAtIndex(index as Integer) as Double
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the receiver’s
value represented by the tick mark at the specified index.
6.28.13
Properties
6.28.14
allowsTickMarkValuesOnly as boolean
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the receiver fixes its values to those values represented by its tick marks.
Notes:
True if the slider fixes its values to the values represented by its tick marks; otherwise, false.
(Read and Write computed property)
6.28.15
altIncrementValue as Double
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The amount by
which the receiver changes its value when the user Optiondrags the slider knob.
Notes:
The amount by which the value changes when the user drags the slider knob with the Option key held down.
Unless you assign a value to AltIncrementValue, altIncrementValue returns 1.0, and the receiver behaves no
differently with the Option key down than with it up.
(Read and Write computed property)
6.28.16
image as NSImageMBS
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: This method has
been deprecated. Returns nil.
Notes:
The slider may scale and distort barImage to fit inside the bar.
The knob may cover part of the image. If you want the image to be visible all the time, you’re better off
placing it near the slider.
6.28. CLASS NSSLIDERMBS
441
This method has been deprecated by Apple.
(Read and Write computed property)
6.28.17
knobThickness as Double
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The knob’s thickness,
in pixels.
Notes:
The thickness of the slider knob. The thickness is defined to be the extent of the knob along the long dimension of the bar. In a vertical slider, then, a knob’s thickness is its height; in a horizontal slider, a knob’s
thickness is its width.
(Read and Write computed property)
6.28.18
maxValue as Double
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The maximum value
the receiver can send to its target.
Notes:
The slider’s maximum value. A horizontal slider sends its maximum value when the knob is at the right end
of the bar; a vertical slider sends it when the knob is at the top.
(Read and Write computed property)
6.28.19
minValue as Double
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: the minimum value
the receiver can send to its target.
Notes:
The slider’s minimum value. A vertical slider sends its minimum value when its knob is at the bottom; a
horizontal slider, when its knob is all the way to the left.
(Read and Write computed property)
6.28.20
numberOfTickMarks as Integer
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The number of tick
marks associated with the receiver.
Notes:
The number of the slider’s tick marks.The tick marks assigned to the minimum and maximum values are
442
CHAPTER 6. COCOA CONTROLS
included.
(Read and Write computed property)
6.28.21
sliderType as Integer
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The slider type.
Notes:
Either NSLinearSlider or NSCircularSlider.
(Read and Write computed property)
6.28.22
tickMarkPosition as Integer
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: How the receiver’s
tick marks are aligned with it.
Notes:
A constant indicating the position of the tick marks. Possible values are NSTickMarkBelow, NSTickMarkAbove, NSTickMarkLeft, and NSTickMarkRight (the last two are for vertical sliders). The default alignments
are NSTickMarkBelow and NSTickMarkLeft.
(Read and Write computed property)
6.28.23
title as string
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The receiver’s title.
Notes:
The default title is the empty string.
(Read and Write computed property)
6.28.24
titleCell as NSCellMBS
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets the cell used to
draw the receiver’s title.
Notes:
You only need to invoke this method if the default title cell, NSTextFieldCell, doesn’t suit your needsthat
is, you want to display the title in a manner that NSTextFieldCell doesn’t permit. When you do choose to
override the default, titleCell should be an instance of a subclass of NSTextFieldCell.
6.28. CLASS NSSLIDERMBS
443
This method has been deprecated by Apple.
(Read and Write computed property)
6.28.25
titleColor as NSColorMBS
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets the color used
to draw the receiver’s title.
Notes:
This method has been deprecated by Apple.
(Read and Write computed property)
6.28.26
titleFont as NSFontMBS
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets the font used to
draw the receiver’s title.
Notes:
This method has been deprecated by Apple.
(Read and Write computed property)
6.28.27
Constants
6.28.28
NSCircularSlider=1
Plugin Version: 8.4. Function: One of the slider type constants.
Notes: A circular slider; that is, a dial.
6.28.29
NSLinearSlider=0
Plugin Version: 8.4. Function: One of the slider type constants.
Notes: A bar-shaped slider.
6.28.30
NSTickMarkAbove=1
Plugin Version: 8.4. Function: One of the values for the tickMarkPosition property.
Notes: Tick marks above (for horizontal sliders).
444
6.28.31
CHAPTER 6. COCOA CONTROLS
NSTickMarkBelow=0
Plugin Version: 8.4. Function: One of the values for the tickMarkPosition property.
Notes: Tick marks below (for horizontal sliders); the default for horizontal sliders.
6.28.32
NSTickMarkLeft=1
Plugin Version: 8.4. Function: One of the values for the tickMarkPosition property.
Notes: Tick marks to the left (for vertical sliders); the default. for vertical sliders
6.28.33
NSTickMarkRight=0
Plugin Version: 8.4. Function: One of the values for the tickMarkPosition property.
Notes: Tick marks to the right (for vertical sliders).
6.29. CLASS NSSTEPPERMBS
6.29
class NSStepperMBS
6.29.1
class NSStepperMBS
445
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A stepper consists
of two small arrows that can increment and decrement a value that appears beside it, such as a date or time.
Notes:
The illustration below shows a stepper to the right of a text field, which would show the stepper’s value.
Subclass of the NSControlMBS class.
6.29.2
Methods
6.29.3
Constructor
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
stepper with size 100/100 and position 0/0
Example:
dim t as new NSStepperMBS
Notes: On success the handle property is not zero.
See also:
• 6.29.4 Constructor(Handle as Integer)
445
• 6.29.5 Constructor(left as Double, top as Double, width as Double, height as Double)
446
6.29.4
Constructor(Handle as Integer)
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSStepper handle.
Example:
dim t as new NSStepperMBS(0, 0, 100, 100)
dim v as new NSStepperMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSStepper and the plugin retains this handle.
See also:
446
CHAPTER 6. COCOA CONTROLS
• 6.29.3 Constructor
445
• 6.29.5 Constructor(left as Double, top as Double, width as Double, height as Double)
446
6.29.5
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
stepper with the given size and position.
Example:
dim x as new NSStepperMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.
See also:
• 6.29.3 Constructor
445
• 6.29.4 Constructor(Handle as Integer)
445
6.29.6
Properties
6.29.7
autorepeat as boolean
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating how the receiver responds to mouse events.
Notes:
True if the first mouse down does one increment (or decrement) and, after a delay of 0.5 seconds, increments
(or decrements) at a rate of ten times per second. False if the receiver does one increment (decrement) on a
mouse up. The default is true.
(Read and Write computed property)
6.29.8
increment as Double
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The amount by
which the receiver will change per increment (decrement).
Notes: (Read and Write computed property)
6.29. CLASS NSSTEPPERMBS
6.29.9
447
maxValue as Double
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The maximum
value.
Notes: (Read and Write computed property)
6.29.10
minValue as Double
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The minimum
value.
Notes: (Read and Write computed property)
6.29.11
valueWraps as boolean
Plugin Version: 10.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the receiver
wraps around the minimum and maximum values.
Notes:
If true, then when incrementing or decrementing, the value wraps around to the minimum or maximum. If
valueWraps is false, the value stays pinned at the minimum or maximum.
For example for an angle where 359 increases to 0.
(Read and Write computed property)
448
CHAPTER 6. COCOA CONTROLS
6.30
class NSTableColumnMBS
6.30.1
class NSTableColumnMBS
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: An NSTableColumn
stores the display characteristics and attribute identifier for a column in an NSTableView.
Notes: The NSTableColumn determines the width and width limits, resizability, and editability of its column in the NSTableView. It also stores two NSCell objects: the header cell, which is used to draw the
column header, and the data cell, used to draw the values for each row. You can control the display of the
column by setting the subclasses of NSCell used and by setting the font and other display characteristics
for these NSCells. For example, you can use the default NSTextFieldCell for displaying string values or
substitute an NSImageCell to display pictures.
6.30.2
Methods
6.30.3
Constructor(identifier as string)
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Initializes a NSTableColumn with identifier as its identifier and with an NSTextFieldCell as its data cell.
6.30.4
dataCellForRow(row as Integer) as NSCellMBS
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the NSCell
object used by the NSTableView to draw values for the receiver.
Notes: NSTableView always calls this method. By default, this method just calls dataCell. Subclassers
can override if they need to potentially use different cells for different rows. Subclasses should expect this
method to be invoked with row equal to 1 in cases where no actual row is involved but the table view needs
to get some generic cell info.
6.30.5
sizeToFit
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Resizes the receiver
to fit the width of its header cell.
Notes: If the maximum width is less than the width of the header, the maximum is increased to the header’s
width. Similarly, if the minimum width is greater than the width of the header, the minimum is reduced to
the header’s width. Marks the NSTableView as needing display if the width actually changes.
6.30. CLASS NSTABLECOLUMNMBS
6.30.6
Properties
6.30.7
dataCell as NSCellMBS
449
Plugin Version: 9.6, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The NSCell object
used by the NSTableView to draw values for the receiver.
Notes:
You can use this property to control the font, alignment, and other text attributes for an NSTableColumn.
You can also assign a cell to display things other than textfor example, an NSImageCell to display images.
(Read and Write property)
6.30.8
Editable as boolean
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Controls whether the
user can edit cells in the receiver by double-clicking them.
Notes:
If value is true a double click initiates editing; if flag is false it merely sends the double-click event to the
NSTableView. You can initiate editing programmatically regardless of this setting with NSTableView’s editColumn() method.
(Read and Write property)
6.30.9
headerCell as NSTableHeaderCellMBS
Plugin Version: 9.6, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The NSCell used to
draw the receiver’s header to aCell.
Notes: (Read and Write property)
6.30.10
headerToolTip as string
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The tooltip string
that is displayed when the cursor pauses over the header cell of the receiver.
Notes: (Read and Write property)
6.30.11
Hidden as boolean
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether the column
is hidden.
450
CHAPTER 6. COCOA CONTROLS
Notes: (Read and Write property)
6.30.12
identifier as string
Plugin Version: 9.6, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The object used by
the data source to identify the attribute corresponding to the receiver.
Notes: (Read and Write property)
6.30.13
maxWidth as Double
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The maximum width.
Notes:
Setting this value will also adjusting the current width if it’s greater than this value.
(Read and Write property)
6.30.14
minWidth as Double
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The minimum width.
Notes:
Setting this value will also adjusting the current width if it’s less than this value.
(Read and Write property)
6.30.15
Resizable as boolean
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether this column
can be resized.
Notes: (Read and Write property)
6.30.16
resizingMask as Integer
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Defines the resizing
mode for this column.
Notes:
Use kNoResizing, kAutoresizingMask and kUserResizingMask constants.
(Read and Write property)
6.30. CLASS NSTABLECOLUMNMBS
6.30.17
451
sortDescriptorPrototype as NSSortDescriptorMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The table columns
sort descriptor prototype.
Notes:
A table column is considered sortable if it has a sort descriptor that specifies the sorting direction, a key to
sort by, and a selector that defines how to sort.
(Read and Write property)
6.30.18
tableView as NSTableViewMBS
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The owner tableview.
Notes: (Read and Write property)
6.30.19
title as String
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The title of the table
columns header.
Notes: (Read and Write property)
6.30.20
width as Double
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The width of the
column.
Notes: (Read and Write property)
6.30.21
Constants
6.30.22
NSTableColumnAutoresizingMask=1
Plugin Version: 9.6. Function: One of the constants specify the resizing modes available for the table
column.
Notes:
Allows the table column to resize automatically in response to resizing the tableview. Enabling this option
is the same as enabling the ”Live Resizable” option in Interface Builder. The resizing behavior for the table
view is set using the NSTableView method setColumnAutoresizingStyle:.
Available in Mac OS X v10.4 and later.
452
6.30.23
CHAPTER 6. COCOA CONTROLS
NSTableColumnNoResizing=0
Plugin Version: 9.6. Function: One of the constants specify the resizing modes available for the table
column.
Notes:
Prevents the table column from resizing.
Available in Mac OS X v10.4 and later.
6.30.24
NSTableColumnUserResizingMask=2
Plugin Version: 9.6. Function: One of the constants specify the resizing modes available for the table
column.
Notes:
Allows the table column to be resized explicitly by the user. Enabling this option is the same as enabling
the ”User Resizable” option in Interface Builder.
Available in Mac OS X v10.4 and later.
6.31. CONTROL NSTABLECONTROLMBS
6.31
control NSTableControlMBS
6.31.1
control NSTableControlMBS
453
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control for a
NSTableView.
Notes: Please use NSOutlineControlMBS for hierarchical lists and NSTableControlMBS for normal lists.
6.31.2
Properties
6.31.3
AcceptTabs as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether the control
should accept tab keys.
Notes:
If true, the plugin will not forward the tab keydown/keyup events to Xojo, because Xojo would do switch
to next control.
(Read and Write property)
6.31.4
allowsColumnReordering as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the table view allows the user to rearrange columns by dragging their headers.
Notes:
The default value of this property is true, which allows the user to rearrange the table views columns. You
can rearrange columns programmatically regardless of this setting.
(Read and Write property)
6.31.5
allowsColumnResizing as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the table view allows the user to resize columns by dragging between their headers.
Notes:
The default of this property is true, which allows the user to resize the table views columns. You can resize
columns programmatically regardless of this setting.
(Read and Write property)
454
6.31.6
CHAPTER 6. COCOA CONTROLS
allowsColumnSelection as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the table view allows the user to select columns by clicking their headers.
Notes:
The default is false, which prevents the user from selecting columns (if you create the table view in Interface
Builder, the default value is true). You can select columns programmatically regardless of this setting.
(Read and Write property)
6.31.7
allowsEmptySelection as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the table view allows the user to select zero columns or rows.
Notes:
The default is true, which allows the user to select zero columns or rows.
(Read and Write property)
6.31.8
allowsMultipleSelection as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the table view allows the user to select more than one column or row at a time.
Notes:
The default is false, which allows the user to select only one column or row at a time. You can select multiple
columns or rows programmatically regardless of this setting.
(Read and Write property)
6.31.9
autohidesScrollers as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean that
indicates whether the scroll view automatically hides its scroll bars when they are not needed.
Notes:
The horizontal and vertical scroll bars are hidden independently of each other. When the value of this
property is YES and the content of the scroll view doesn’t extend beyond the size of the clip view on a given
axis, the scroller on that axis is removed to leave more room for the content.
(Read and Write property)
6.31. CONTROL NSTABLECONTROLMBS
6.31.10
455
disableCellEvents as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether to disable
cell based events.
Notes:
The table view can work with cell modes and use NSCell to disable cells.
Or since OS X 10.7 it can work with NSView to display cells or rows.
This property lets you explicitly disable cells and use only views.
(Read and Write property)
6.31.11
disableViewEvents as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether to disable
view based events.
Notes:
The table view can work with cell modes and use NSCell to disable cells.
Or since OS X 10.7 it can work with NSView to display cells or rows.
This property lets you explicitly disable views and use only cells.
(Read and Write property)
6.31.12
hasHorizontalScroller as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean that
indicates whether the scroll view has a horizontal scroller.
Notes:
When the value of this property is true, the scroll view allocates and displays a horizontal scroller as needed.
The default value of this property is false.
(Read and Write property)
6.31.13
hasVerticalScroller as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean that
indicates whether the scroll view has a vertical scroller.
Notes:
When the value of this property is true, the scroll view allocates and displays a vertical scroller as needed.
The default value of this property is false.
(Read and Write property)
456
6.31.14
CHAPTER 6. COCOA CONTROLS
ScrollView as NSScrollViewMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The scroll view used
in this control.
Notes: (Read only property)
6.31.15
View as NSTableViewMBS
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The table view used
in this control.
Notes: (Read only property)
See also:
• 6.31.78 view(tableColumn as NSTableColumnMBS, row as Integer) as NSViewMBS
474
6.31.16
Events
6.31.17
acceptDrop(info as NSDraggingInfoMBS, row as Integer, dropOperation as Integer) as boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called by TableView
when the mouse button is released over a table view that previously decided to allow a drop.
Notes:
info: An object that contains more information about this dragging operation.
row: The index of the proposed target row.
operation: The type of dragging operation.
Returns true if the drop operation was successful, otherwise false.
The data source should incorporate the data from the dragging pasteboard in the implementation of this
method. You can use the draggingPasteboard method to get the data for the drop operation from info.
To accept a drop on the second row, row would be 2 and operation would be NSTableViewDropOn. To
accept a drop below the last row, row would be TableView.numberOfRows and operation would be NSTableViewDropAbove.
6.31.18
BoundsChanged
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the bounds, but not the frame, changed.
6.31. CONTROL NSTABLECONTROLMBS
6.31.19
457
ColumnDidMove(notification as NSNotificationMBS, oldColumn as Integer, newColumn as Integer)
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event informs
the delegate that a column was moved by user action in the table view.
6.31.20
ColumnDidResize(notification as NSNotificationMBS, tableColumn as
NSTableColumnMBS, OldWidth as Double)
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event informs
you that a column was resized in the table view.
6.31.21
dataCell(tableColumn as NSTableColumnMBS, row as Int64) as NSCellMBS
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Optional return a
different cells for each row.
Notes:
A different data cell can be returned for any particular tableColumn and row, or a cell that will be used for
the entire row (a full width cell). The returned cell should properly implement copyWithZone:, since the
cell may be copied by NSTableView. If the tableColumn is non-nil, and nil is returned, then the table will
use the default cell from tableColumn.dataCellForRow(Row).
When each row is being drawn, this method will first be called with a nil tableColumn. At this time, you can
return a cell that will be used to draw the entire row, acting like a group. If you do return a cell for the ’nil’
tableColumn, be prepared to have the other corresponding datasource and delegate methods to be called
with a ’nil’ tableColumn value. If don’t return a cell, the method will be called once for each tableColumn
in the tableView, as usual.
6.31.22
didAddRowView(rowView as NSTableRowViewMBS, row as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Tells the delegate
that a row view was added at the specified row.
Notes:
rowView: The row view.
row: The index of the row.
At this point, the delegate can add extra views, or modify the properties of rowView.
458
CHAPTER 6. COCOA CONTROLS
This method is only valid for NSView-based table views.
6.31.23
didClickTableColumn(tableColumn as NSTableColumnMBS)
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called if a table
column was clicked on.
6.31.24
didDragTableColumn(tableColumn as NSTableColumnMBS)
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent at the time the
mouse button goes up in tableView and tableColumn has been dragged during the time the mouse button
was down.
Notes:
tableColumn: The table column.
The behavior of this method on Mac OS X v10.5 is different from prior versions. On Mac OS X v 10.5 the
dragged column is sent to the subclass. In earlier versions the table column that is currently located at the
dragged column’s original index is sent.
6.31.25
didRemoveRowView(rowView as NSTableRowViewMBS, row as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Tells the delegate
that a row view was removed from the table at the specified row.
Notes:
rowView: The row view.
row: The index of the row.
If row equals -1, the row is being deleted from the table and is no longer a valid row; otherwise row is a valid
row that is being removed by being moved off screen.
This method is only valid for NSView-based table views.
6.31.26
didTile
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The tableview did
tile.
6.31. CONTROL NSTABLECONTROLMBS
459
Notes: The internal tile function properly sizes the table view and its header view and marks it as needing
display.
6.31.27
DoubleClick
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The mouse made a
double click.
6.31.28
draggingSessionEnded(session as NSDraggingSessionMBS, screenPoint
as NSPointMBS, operation as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
method to determine when a dragging session has ended.
Notes:
session: The dragging session.
screenPoint: The ending drag location in screen coordinates.
operation: The drag operation. See NSDragOperation for supported values.
This delegate method can be used to determine when the dragging source operation ended at a specific
location, such as the trash, by checking for an operation of NSDragOperationDelete.
6.31.29
draggingSessionWillBegin(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, rowIndexes as NSIndexSetMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
method to determine when a dragging session will begin.
Notes:
session: The dragging session.
screenPoint: The initial drag location in screen coordinates.
rowIndexes: The indexes of the rows to be dragged, excluding rows that were not dragged due to pasteboardItemForRow returning nil.
Implement this method to know when the dragging session is about to begin and to potentially modify the
dragging session.
The dragged item order will directly match the pasteboard writer array used to begin the dragging session
with the NSView method beginDraggingSessionWithItems. Hence, the order is deterministic, and can be
used in acceptDrop when enumerating the NSDraggingInfo pasteboard classes.
460
6.31.30
CHAPTER 6. COCOA CONTROLS
EnableMenuItems
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: Yes, Linux: Yes. Function: The event where
you can enable menu items.
6.31.31
FrameChanged
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the frame changed.
6.31.32
GotFocus
Plugin Version: 16.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control itself
got focus.
Notes: This only fires if the control itself got focus and not a sub control.
6.31.33
heightOfRow(row as Int64) as Double
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
event to support a table with varying row heights.
Notes: The height returned by this method should not include intercell spacing and must be greater than
zero. Performance Considerations: For large tables in particular, you should make sure that this method is
efficient. NSTableView may cache the values this method returns, but this should NOT be depended on, as all
values may not be cached. To signal a row height change, call noteHeightOfRowsWithIndexesChanged. For
a given row, the same row height should always be returned until noteHeightOfRowsWithIndexesChanged
is called, otherwise unpredicable results will happen. NSTableView automatically invalidates its entire row
height cache in reloadData, and noteNumberOfRowsChanged.
6.31.34
isGroupRow(row as Int64) as boolean
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
delegate to indicate that a specified row is a group row.
Notes:
row: The row index.
Return true if the specified row should have the group row style drawn, false otherwise.
6.31. CONTROL NSTABLECONTROLMBS
461
If the cell in row is an NSTextFieldCell and contains only a string, the group row style attributes will automatically be applied to the cell.
Group rows in view-based table views can be made to visually float’ by setting the tableview method setFloatsGroupRows to true.
Note: When configured as a source list style table view, rows identified as group rows draw with a specific
style unique for source lists.
Available in Mac OS X v10.5 and later.
6.31.35
LeftMouseDown(e as NSEventMBS) as boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has pressed the left mouse button.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.31.36
LeftMouseDragged(e as NSEventMBS) as boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has moved the mouse with the left button pressed.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.31.37
LeftMouseUp(e as NSEventMBS) as boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has released the left mouse button.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.31.38
LostFocus
Plugin Version: 16.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control lost
focus.
Notes: This only fires if the control itself lost focus and not a sub control.
462
6.31.39
CHAPTER 6. COCOA CONTROLS
MenuAction(HitItem as MenuItem) As Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when a
menuitem is choosen.
Notes: This allows the control to react on its relevant menu items. Please return true if you handled it or
false to give others a chance.
6.31.40
MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The mouse button
was pressed inside the controls region at the location passed in to x, y.
Notes:
The coordinates x and y are local to the control, i.e. they represent the position of the mouse click relative
to the upper-left corner or the Control.
Return True if you are going to handle the MouseDown. In such a case:
• The Action event, if any, will not execute and the state of the object will not change.
• You will receive the MouseDrag and MouseUp events.
If you return False, the system handles the MouseDown so the above event handlers do not get called.
6.31.41
mouseDownInHeaderOfTableColumn(tableColumn as NSTableColumnMBS)
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent to the subclass
whenever the mouse button is clicked in the table view’s header column.
Notes: tableColumn: The table column.
6.31.42
MouseDrag(x as Integer, y as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event fires
continuously after the mouse button was pressed inside the Control.
Notes:
Mouse location is local to the control passed in to x, y.
As this event is fired continuously (hundreds of time per second), it is your responsibility to determine if the
mouse has really moved.
6.31. CONTROL NSTABLECONTROLMBS
6.31.43
463
MouseUp(x as Integer, y as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The mouse button
was released.
Notes: Use the x and y parameters to determine if the mouse button was released within the control’s
boundaries.
6.31.44
namesOfPromisedFilesDroppedAtDestination(dropDestination as folderItem,
DraggedRowsWithIndexes as NSIndexSetMBS) as string()
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns an array of
filenames that represent the indexSet rows for a drag to dropDestination.
Notes:
dropDestination: The drop location where the files are created.
indexSet: The indexes of the items being dragged.
Returns an array of filenames (not full paths) for the created files that the receiver promises to create.
This method is called when a destination has accepted a promise drag.
For more information on file promise dragging, see documentation on the NSDraggingSource protocol and
namesOfPromisedFilesDroppedAtDestination:.
6.31.45
nextTypeSelectMatchFromRow(startRow as Int64, endRow as Int64,
searchString as string) as Int64
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
subclass to modify how type selection works.
Notes:
startRow: The starting row of the search range.
endRow: The ending row of the search range.
searchString: A string containing the typed selection.
Return the first row in the range of startRow through endRow (excluding endRow itself) that matches selectionString. Return -1 if no match is found.
It is possible for endRow to be less than startRow if the search will wrap.
Available in Mac OS X v10.5 and later.
464
6.31.46
CHAPTER 6. COCOA CONTROLS
numberOfRowsInTableView as Integer
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when the
table view needs to know the number of rows.
Notes: numberOfRowsInTableView is called very frequently, so it must be efficient.
6.31.47
objectValue(column as NSTableColumnMBS, row as Integer) as Variant
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when a value
is required for a given cell.
Notes: Please implement your own arrays to store values.
6.31.48
OtherMouseDown(e as NSEventMBS) as boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has pressed a mouse button other than the left or right one.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.31.49
OtherMouseDragged(e as NSEventMBS) as boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has moved the mouse with a button other than the left or right button pressed.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.31.50
OtherMouseUp(e as NSEventMBS) as boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has released a mouse button other than the left or right button.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.31.51
pasteboardItemForRow(row as Integer) as NSPasteboardItemMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called to allow the
table to support multiple item dragging.
6.31. CONTROL NSTABLECONTROLMBS
465
Notes:
row: The row.
Returns an instance of NSPasteboardItem. Returning nil excludes the row from being dragged.
This method is required for multi-image dragging.
If this method is implemented, then writeRowsWithIndexes will not be called.
6.31.52
RightMouseDown(e as NSEventMBS) as boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the view
that the user has pressed the right mouse button.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.31.53
RightMouseDragged(e as NSEventMBS) as boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has moved the mouse with the right button pressed .
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.31.54
RightMouseUp(e as NSEventMBS) as boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has released the right mouse button.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide
event from Xojo runtime.
6.31.55
rowActionsForRow(row as Integer, edge as Integer) as NSTableViewRowActionMBS()
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Asks the control to
provide an array of row actions to be attached to the specified edge of a table row and displayed when the
user swipes horizontally across the row.
Notes:
row: The index of the target row.
466
CHAPTER 6. COCOA CONTROLS
edge: The edge (NSTableRowActionEdgeLeading or NSTableRowActionEdgeTrailing) for which row actions
are requested. This is based on the direction in which the user swiped on the row. Swiping to the right
results in an edge value of leading. Swiping to the left results in an edge value of trailing.
Returns an array of row actions (of class NSTableViewRowActionMBS) to be enabled on the specified edge
of the table row.
Implement this method if your table row supports actions that are displayed when the user swipes horizontally across the row. For example, your table view could use this method to implement a swipe left to
delete function in your table rows. When called, this method receives the table view, the index of the row
the user swiped, and an edge of type NSTableRowActionEdge. The method should return an array of any
row actions of class NSTableViewRowAction that are supported for the specified edge. If no row actions are
available, an empty array should be returned.
If this method isnt implemented, then the table row displays no actions when the user swipes horizontally
away from the specified edge.
6.31.56
rowViewForRow(row as Integer) as NSTableRowViewMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Asks the delegate
for a view to display the specified row.
Notes:
row: The row index.
Return an instance or subclass of NSTableRowView. If nil is returned, an NSTableRowView instance will
be created and used.
You can implement this event to return a custom NSTableRowView for row.
The reuse queue can be used in the same way as documented in tableView:view:row:. The returned view
will have attributes properly set to it before its added to the tableView.
This method is only valid for NSView-based table views.
6.31.57
ScaleFactorChanged(NewFactor as Double)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The backing store
scale factor has changed.
Notes: Please invalidate any cached bitmaps or other relevant state.
6.31. CONTROL NSTABLECONTROLMBS
6.31.58
467
SelectionDidChange(notification as NSNotificationMBS)
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event informs
you that the table view’s selection has changed.
6.31.59
selectionIndexesForProposedSelection(proposedSelectionIndexes as NSIndexSetMBS) as NSIndexSetMBS
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
delegate to modify the proposed selection.
Notes:
proposedSelectionIndexes: An index set containing the indexes of the proposed selection.
Return an NSIndexSet instance containing the indexes of the new selection. Return proposedSelectionIndexes if the proposed selection is acceptable, or the value of the table view’s existing selection to avoid
changing the selection.
This method may be called multiple times with one new index added to the existing selection to find out if
a particular index can be selected when the user is extending the selection with the keyboard or mouse.
Implementation of this method is optional. If implemented, this method will be called instead of shouldSelectRow.
Available in Mac OS X v10.5 and later.
6.31.60
SelectionIsChanging(notification as NSNotificationMBS)
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event informs
you that the table view’s selection is in the process of changing (typically because the user is dragging the
mouse across a number of rows).
6.31.61
selectionShouldChangeInTableView as boolean
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the selection should change.
Notes:
Return true to allow the table view to change its selection (typically a row being edited), false to deny
selection change.
468
CHAPTER 6. COCOA CONTROLS
The user can select and edit different cells within the same row, but can’t select another row unless the
delegate approves. The subclass can implement this method for complex validation of edited rows based on
the values of any of their cells.
6.31.62
setObjectValue(value as Variant, column as NSTableColumnMBS, row
as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when a cell
value is saved to the datasource.
6.31.63
shouldEditTableColumn(tableColumn as NSTableColumnMBS, row as
Int64) as boolean
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the cell at the specified row and column can be edited.
Notes:
TableColumn: The table column.
rowIndex: The row index.
Return true to allow editing the cell, false to deny editing.
The subclass can implement this method to disallow editing of specific cells.
Note: This method is only valid for cell-based table views.
6.31.64
shouldReorderColumn(columnIndex as Int64, newColumnIndex as Int64)
as boolean
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent to the subclass
to allow or prohibit the specified column to be dragged to a new location.
Notes:
columnIndex: The index of the column being dragged.
newColumnIndex: The proposed target index of the column.
Return true if the column reordering should be allowed, otherwise false.
When a column is initially dragged by the user, the delegate is first called with a newColumnIndex value
of -1. Returning false will disallow that column from being reordered at all. Returning true allows it to be
reordered, and the delegate will be called again when the column reaches a new location.
6.31. CONTROL NSTABLECONTROLMBS
469
The actual NSTableColumn instance can be retrieved from the tableColumns array.
If this method is not implemented, all columns are considered reorderable.
Available in Mac OS X v10.6 and later.
6.31.65
shouldSelectRow(row as Int64) as boolean
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the table view should allow selection of the specified row.
Notes:
rowIndex: The row index.
Return true to permit selection of the row, false to deny selection.
The delegate can implement this method to disallow selection of particular rows.
For better performance and finer-grain control over the selection, use selectionIndexesForProposedSelection.
6.31.66
shouldSelectTableColumn(tableColumn as NSTableColumnMBS) as boolean
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the specified table column can be selected.
Notes:
TableColumn: The table column.
Return true to permit selection, otherwise false.
The subclass can implement this event to disallow selection of particular columns.
6.31.67
shouldShowCellExpansion(tableColumn as NSTableColumnMBS, row
as Int64) as Boolean
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
subclass to control cell expansion for a specific row and column.
Notes:
TableColumn: The table column.
row: The row index.
470
CHAPTER 6. COCOA CONTROLS
Return true if the tooltip cell should expand, false otherwise.
Cell expansion can occur when the mouse hovers over the specified cell and the cell contents are unable to
be fully displayed within the cell. If this method returns true, the full cell contents will be shown in a special
floating tool tip view, otherwise the content is truncated.
Note: This method is only valid for cell-based table views.
Available in Mac OS X v10.5 and later.
6.31.68
shouldTrackCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, row as Int64) as Boolean
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
subclass to control the tracking behavior for a specific cell.
Notes:
cell: The cell to track.
tableColumn: The table column.
row: A row in tableView.
Returns true if the cell should track, false otherwise.
Normally, only selectable or selected cells can be tracked. If you implement this method, cells which are not
selectable or selected can be tracked, and vice-versa.
For example, this allows you to have an NSButtonCell in a table which does not change the selection, but
can still be clicked on and tracked.
Note: This method is only valid for cell-based table views.
Available in Mac OS X v10.5 and later.
6.31.69
shouldTypeSelectForEvent(e as NSEventMBS, searchString as string)
as Boolean
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
subclass to control type select for a specific event.
Notes:
6.31. CONTROL NSTABLECONTROLMBS
471
event: The event.
searchString: The search string or nil if no type select has began.
Return true to allow type select for event, false otherwise.
Typically, this is called from the table view keyDown implementation and the event will be a key event.
Available in Mac OS X v10.5 and later.
6.31.70
sizeToFitWidthOfColumn(column as Int64) as Double
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
subclass to provide custom sizing behavior when a column’s resize divider is double clicked.
Notes:
column: The index of the column.
Returns the width of the specified column.
By default, NSTableView iterates every row in the table, accesses a cell via preparedCellAtColumn, and
requests the cellSize to find the appropriate largest width to use.
For accurate results and performance, it is recommended that this method is implemented when using large
tables. By default, large tables use a monte carlo simulation instead of iterating every row.
Available in Mac OS X v10.6 and later.
6.31.71
sortDescriptorsDidChange(oldDescriptors() as NSSortDescriptorMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called by TableView
to indicate that sorting may need to be done.
Notes: The data source typically sorts and reloads the data, and adjusts the selections accordingly. If you
need to know the current sort descriptors and the data source doesnt manage them itself, you can get the
current sort descriptors by calling TableView.sortDescriptors function.
472
6.31.72
CHAPTER 6. COCOA CONTROLS
textShouldBeginEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as boolean
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called to
decide whether text editing should be allowed.
Notes: Return true to allow.
6.31.73
textShouldEndEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as boolean
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called to
decide whether ending text editing should be allowed.
Notes: Return true to allow.
6.31.74
toolTipForCell(cell as NSCellMBS, r as NSRectMBS, tableColumn as
NSTableColumnMBS, row as Int64, mouseLocation as NSPointMBS)
as string
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a string
that is displayed as a tooltip for the specified cell in the column and row.
Notes:
Cell: The cell.
r: The proposed active area of the tooltip. You can modify rect to provide an alternative active area.
TableColumn: The table column.
row: The row index.
mouseLocation: The mouse location.
Return a string containing the tooltip. Return empty string if no tooltip is desired.
By default, rect is computed as cell.drawingRectForBounds(cellFrame).
Available in Mac OS X v10.4 and later.
6.31.75
typeSelectString(tableColumn as NSTableColumnMBS, row as Int64)
as string
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
subclass to provide an alternate text value used for type selection for a specified row and column.
Notes:
6.31. CONTROL NSTABLECONTROLMBS
473
tableColumn: The table column.
row: The row index.
Returns a string that is used in type select comparison for row and tableColumn. Return ”” if the row or
tableColumn should not be searched.
Implement this method to change the string value that is searched for based on what is displayed. By default,
all cells with text in them are searched.
If this event is not implemented the string value is the cell string value.
Implementation of this event is optional.
Available in Mac OS X v10.5 and later.
6.31.76
updateDraggingItemsForDrag(draggingInfo as NSDraggingInfoMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
method to allow the table to update dragging items as they are dragged over a view.
Notes:
The dragging information.
Required for multi-image dragging. Typically this will involve invoking enumerateDraggingItemsWithOptions on the draggingInfo parameter value and setting the draggingItem objects imageComponentsProvider
to a proper image based on the content.
For view-based table views, you can use the NSTableCellView method draggingImageComponents. For cellbased tables, use the NSCell method draggingImageComponentsWithFrame.
6.31.77
validateDrop(info as NSDraggingInfoMBS, proposedRow as Integer,
dropOperation as Integer) as Integer
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Used by aTableView
to determine a valid drop target.
Notes:
info: An object that contains more information about this dragging operation.
row: The index of the proposed target row.
operation: The type of dragging operation proposed.
Returns the dragging operation the data source will perform.
474
CHAPTER 6. COCOA CONTROLS
The data source may retarget a drop by calling setDropRow and returning something other than NSDragOperationNone. A data source might retarget for various reasons, such as to provide better visual feedback
when inserting into a sorted position.
To propose a drop on the second row, row would be 2 and operation would be NSTableViewDropOn. To
propose a drop below the last row, row would be TableView.numberOfRows and operation would be NSTableViewDropAbove.
6.31.78
view(tableColumn as NSTableColumnMBS, row as Integer) as NSViewMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Asks the delegate
for a view to display the specified row and column.
Notes:
see also
https://developer.apple.com/reference/appkit/nstableviewdelegate/1527449-tableview?language=objc
See also:
• 6.31.15 View as NSTableViewMBS
6.31.79
456
willDisplayCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, row as Int64)
Plugin Version: 15.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs you that
the tableview will display the specified cell at the row in the column.
Notes:
Cell: The cell to be displayed.
TableColumn: The table column.
row: The row index.
The event can modify the display attributes of cell to alter the appearance of the cell.
Because cell is reused for every row in tableColumn, the event must set the display attributes both when
drawing special cells and when drawing normal cells.
Note: The implementation of this method must not draw portions of the cell. It should only alter the state
of the passed in cell.
6.31.80
willTile
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The tableview will
tile.
6.31. CONTROL NSTABLECONTROLMBS
475
Notes: The internal tile function properly sizes the table view and its header view and marks it as needing
display.
6.31.81
writeRowsWithIndexes(rowIndexes as NSIndexSetMBS, pboard as NSPasteboardMBS) as boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether a drag operation is allowed.
Notes:
rowIndexes: An index set of row numbers that will be participating in the drag.
pboard: The pasteboard to which to write the drag data.
Returns true if the drag operation is allowed, false otherwise.
Called by TableView after it has been determined that a drag should begin, but before the drag has been
started.
To refuse the drag, return false. To start a drag, return true and place the drag data onto pboard (data,
owner, and so on). The drag image and other drag-related information will be set up and provided by the
table view once this call returns with true.
476
CHAPTER 6. COCOA CONTROLS
6.32
class NSTableDataSourceMBS
6.32.1
class NSTableDataSourceMBS
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The class for a data
source of a NSTableView.
Notes:
A listbox stores the data itself, but the NSTableView is just a view.
so you need to handle the storage of the table view yourself by subclassing this class and filling the events.
6.32.2
Events
6.32.3
Close
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event is called
when the datasource is destroyed.
6.32.4
numberOfRowsInTableView as Integer
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when the table
view needs to know the number of rows.
Notes: numberOfRowsInTableView is called very frequently, so it must be efficient.
6.32.5
objectValue(column as NSTableColumnMBS, row as Integer) as Variant
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when a value
is required for a given cell.
Notes: Please implement your own arrays to store values.
6.32.6
setObjectValue(value as Variant, column as NSTableColumnMBS, row
as Integer)
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when a cell
value is saved to the datasource.
6.32. CLASS NSTABLEDATASOURCEMBS
6.32.7
477
sortDescriptorsDidChange(oldDescriptors() as NSSortDescriptorMBS)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called by TableView
to indicate that sorting may need to be done.
Notes: The data source typically sorts and reloads the data, and adjusts the selections accordingly. If you
need to know the current sort descriptors and the data source doesnt manage them itself, you can get the
current sort descriptors by calling TableView.sortDescriptors function.
478
CHAPTER 6. COCOA CONTROLS
6.33
class NSTableHeaderCellMBS
6.33.1
class NSTableHeaderCellMBS
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: An NSTableHeaderCell is used by an NSTableHeaderView to draw its column headers.
Notes:
See the NSTableViewMBS class specification for more information on how it’s used.
Subclasses of NSTableHeaderCell can override drawInteriorWithFrame, editWithFrame, and highlight:withFrame to change the way headers appear. See the NSCell class specification, and the following description,
for information on these methods. (This works in Cocoa, but does not yet work in the plugin. If you need,
send in a feature request.)
Subclass of the NSTextFieldCellMBS class.
6.33.2
Methods
6.33.3
drawSortIndicatorWithFrame(cellFrame as NSRectMBS, inView as NSViewMBS,
ascending as boolean, priority as Integer)
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Draws a sorting
indicator given a cellFrame contained inside controlView.
Notes:
If priority is 0, this is the primary sort indicator. If ascending is true, a ”ˆ” indicator will be drawn. Override
this method to customize the sorting user interface.
Available in Mac OS X v10.3 and later.
6.33.4
sortIndicatorRectForBounds(r as NSRectMBS) as NSRectMBS
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the location
to display the sorting indicator given rectangle.
Notes: Available in Mac OS X v10.3 and later.
6.34. CLASS NSTABLEHEADERVIEWMBS
6.34
class NSTableHeaderViewMBS
6.34.1
class NSTableHeaderViewMBS
479
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: An NSTableHeaderView is used by an NSTableView to draw headers over its columns and to handle mouse events in those
headers.
Notes:
NSTableHeaderView uses NSTableHeaderCell to implement its user interface.
You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSViewMBS class.
6.34.2
Methods
6.34.3
columnAtPoint(point as NSPointMBS) as Integer
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the index of
the column whose header lies under aPoint in the receiver, or 1 if no such column is found.
Notes: point: is expressed in the receiver’s coordinate system.
6.34.4
Constructor
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new table
header view with size 100/100 and position 0/0
Example:
dim t as new NSTableHeaderViewMBS
Notes: On success the handle property is not zero.
See also:
• 6.34.5 Constructor(Handle as Integer)
479
• 6.34.6 Constructor(left as Double, top as Double, width as Double, height as Double)
480
6.34.5
Constructor(Handle as Integer)
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSTableHeaderView handle.
480
CHAPTER 6. COCOA CONTROLS
Example:
dim t as new NSTableHeaderViewMBS(0, 0, 100, 100)
dim v as new NSTableHeaderViewMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSTableHeaderView and the plugin retains this handle.
See also:
• 6.34.4 Constructor
479
• 6.34.6 Constructor(left as Double, top as Double, width as Double, height as Double)
480
6.34.6
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new table
header view with the given size and position.
Example:
dim x as new NSTableHeaderViewMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.
See also:
• 6.34.4 Constructor
479
• 6.34.5 Constructor(Handle as Integer)
479
6.34.7
draggedColumn as Integer
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: If the user is dragging
a column in the receiver, returns the index of that column.
Notes: Otherwise returns 1.
6.34.8
draggedDistance as Double
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: If the user is dragging
a column in the receiver, returns the column’s horizontal distance from its original position.
Notes: Otherwise the return value is meaningless.
6.34. CLASS NSTABLEHEADERVIEWMBS
6.34.9
481
headerRectOfColumn(Column as Integer) as NSRectMBS
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the rectangle
containing the header tile for the column at columnIndex.
Notes: Raises an NSInternalInconsistencyException if columnIndex is out of bounds.
6.34.10
resizedColumn as Integer
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: If the user is resizing
a column in the receiver, returns the index of that column.
Notes: Otherwise returns 1.
6.34.11
Properties
6.34.12
tableView as NSTableViewMBS
Plugin Version: 12.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The owner tableview.
Notes: (Read and Write computed property)
482
CHAPTER 6. COCOA CONTROLS
6.35
class NSTableRowViewMBS
6.35.1
class NSTableRowViewMBS
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The NSTableRowView class is the view shown for a row in an NSTableView.
Notes:
It is responsible for displaying attributes associated with the row, including the selection highlight, and group
row look.
Subclass of the NSViewMBS class.
6.35.2
Methods
6.35.3
Constructor
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor.
6.35.4
Properties
6.35.5
backgroundColor as NSColorMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The background
color of the row.
Notes:
The property defaults to the table views backgroundColor, unless usesAlternatingRowBackgroundColors is
set to true. In that case, the colors alternate, and are automatically updated as required by insertions and
deletions.
The value of the background color can be customized in the NSTableViewMBS.didAddRowView event. The
property is animatable.
(Read and Write property)
6.35.6
emphasized as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Determines whether
the row will draw with the alternate or secondary color (unless overridden).
Notes:
When emphasized is true, the view will draw with the alternateSelectedControlColor defined by NSColor.
When false it will use the secondarySelectedControlColor defined by NSColor.
6.35. CLASS NSTABLEROWVIEWMBS
483
(Read and Write property)
6.35.7
Floating as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Specifies whether
the row is drawn using the floating style.
Notes:
Floating is a temporary attribute that is set when a particular group row is actually floating above other
rows. The state may change dynamically based on the position of the group row. Drawing may be different
for rows that are currently ’floating’.
(Read and Write property)
6.35.8
groupRowStyle as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Specifies whether
this row view is a group row.
Notes:
When true this row is a group row and will draw appropriately.
(Read and Write property)
6.35.9
NextRowSelected as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether next row
is selected.
Notes: (Read and Write property)
6.35.10
PreviousRowSelected as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether the previous
row is selected.
Notes: (Read and Write property)
6.35.11
selected as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Determines whether
the row is selected.
Notes:
484
CHAPTER 6. COCOA CONTROLS
True if selected, otherwise false.
(Read and Write property)
6.35.12
selectionHighlightStyle as Integer
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Specifies the selection
highlight style.
Notes:
The possible values are specified in NSTableViewSelectionHighlightStyle in NSTableView.
(Read and Write property)
6.36. CLASS NSTABLEVIEWMBS
6.36
class NSTableViewMBS
6.36.1
class NSTableViewMBS
485
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: An NSTableView
object displays record-oriented data in a table and allows the user to edit values and resize and rearrange
columns.
Notes:
You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSViewMBS class.
6.36.2
Methods
6.36.3
addTableColumn(column as NSTableColumnMBS)
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Adds a given column
as the last column of the receiver.
6.36.4
beginUpdates
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Begins a group of
updates for the table view.
Notes:
For NSView-based table views, multiple row changesthat is, insertions, deletions, and movesare animated
simultaneously by surrounding calls to those method calls with beginUpdates and endUpdates. These methods are nestable.
The selected rows are maintained during the series of insertions, deletions, moves, and scrolling. If a selected
row is deleted, a selection changed notification occurs after removeRowsAtIndexes is called.
It is not necessary to call beginUpdates and endUpdates if only one insertion, deletion, or move is occurring
and the table view is an NSView-based table view. When using an NSCell-based table view, you must
surround any insertion, deletion, or move in an update block for animations to occur.
The main reason for doing a batch update of changes to a table view is to avoid having the table animate
unnecessarily.
Note that these methods should be called to reflect changes in your model; they do not make any underlying
model changes.
For NSCell-based table views, it is required to call beginUpdates if you want to animate the insertRowsAtIndexes, removeRowsAtIndexes, and moveRowAtIndex.
486
6.36.5
CHAPTER 6. COCOA CONTROLS
canDragRowsWithIndexes(rowIndexes as NSIndexSetMBS, mouseDownPoint as NSPointMBS) as Boolean
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value indicating whether the table view allows dragging the rows at with the drag initiated at the specified
point.
Notes:
rowIndexes: The row indexes to drag.
mouseDownPoint: The location where the drag was initiated.
Returns no to disallow the drag.
6.36.6
columnAtPoint(p as NSPointMBS) as Integer
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the index of
the column a given point lies in.
Notes: Returns the index of the column aPoint lies in, or 1 if aPoint lies outside the receiver’s bounds.
See also:
• 6.36.7 columnAtPoint(x as Double, y as Double) as Integer
6.36.7
486
columnAtPoint(x as Double, y as Double) as Integer
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the index of
the column a given point lies in.
Notes: Returns the index of the column aPoint lies in, or 1 if aPoint lies outside the receiver’s bounds.
See also:
• 6.36.6 columnAtPoint(p as NSPointMBS) as Integer
6.36.8
486
columnForView(view as NSViewMBS) as Integer
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the column
index for the specified view.
Notes:
view: The view for which to retrieve the column.
Returns the index of the column containing view in the tableColumns array. This method returns -1 if
the view is not in the table view. This method may also return -1 if the row containing the view is being
animated away, such as during the deletion of a row.
6.36. CLASS NSTABLEVIEWMBS
487
This method is typically called in the action method of an NSButton (or NSControl) to find out what row
(and column) the action should be performed on.
The implementation is O(n) where n is the number of visible rows, so this method should generally not be
called within a loop.
6.36.9
columnIndexesInRect(rect as NSRectMBS) as NSIndexSetMBS
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the indexes
of the receiver’s columns that intersect the specified rectangle.
Notes: Available in Mac OS X v10.5 and later.
6.36.10
columnWithIdentifier(identifier as string) as Integer
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the index of
the first column in the receiver whose identifier is equal to a given identifier.
Notes: Returns the index of the first column in the receiver whose identifier is equal to anObject (when
compared using isEqual:) or 1 if no columns are found with the specified identifier.
6.36.11
Constructor
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new table
view with size 100/100 and position 0/0
Example:
dim t as new NSTableViewMBS
Notes: On success the handle property is not zero.
See also:
• 6.36.12 Constructor(Handle as Integer)
487
• 6.36.13 Constructor(left as Double, top as Double, width as Double, height as Double)
488
6.36.12
Constructor(Handle as Integer)
Plugin Version: 10.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given NSTableView handle.
Example:
488
CHAPTER 6. COCOA CONTROLS
dim t as new NSTableViewMBS(0, 0, 100, 100)
dim v as new NSTableViewMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a NSTableView and the plugin retains this handle.
See also:
• 6.36.11 Constructor
487
• 6.36.13 Constructor(left as Double, top as Double, width as Double, height as Double)
488
6.36.13
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new table
view with the given size and position.
Example:
dim x as new NSTableViewMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.
See also:
• 6.36.11 Constructor
487
• 6.36.12 Constructor(Handle as Integer)
487
6.36.14
deselectAll
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Deselects all selected
rows or columns if empty selection is allowed; otherwise does nothing.
6.36.15
deselectColumn(column as Integer)
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Deselects the column
at a given index if it’s selected.
Notes: Colunn is from 0 to numberOfColumns-1.
6.36. CLASS NSTABLEVIEWMBS
6.36.16
489
deselectRow(row as Integer)
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Deselects the row at
a given index if it’s selected.
Notes: Deselects the row at rowIndex if it’s selected, regardless of whether empty selection is allowed.
6.36.17
Destructor
Plugin Version: 9.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The destructor.
Notes: REALbasic calls this destructor automatically.
6.36.18
dragImageForRowsWithIndexes(dragRows as NSIndexSetMBS, tableColumns()
as NSTableColumnMBS, theEvent as NSEventMBS, byref dragImageOffset as NSPointMBS) as NSImageMBS
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Computes and
returns an image to use for dragging.
Notes:
dragRows: An index set containing the row indexes that should be in the image.
tableColumns: An array of table columns that should be in the image.
dragEvent: The event that initiated the drag.
dragImageOffset: An in/out parameter specifying the offset of the cursor in the image, the default value is
NSZeroPoint. Returning NSZeroPoint causes the cursor to be centered.
Returns an NSImage containing a custom image for the specified rows and columns participating in the drag.
6.36.19
edit(column as Integer, row as Integer, selectit as boolean)
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Edits the cell at
columnIndex and rowIndex, selecting its entire contents if flag is true.
Notes:
This method is invoked automatically in response to user actions; you should rarely need to invoke it directly.
This method scrolls the receiver so that the cell is visible, sets up the field editor, and sends selectWithFrame() and editWithFrame() to the field editor’s NSCell object with the NSTableView as the text delegate.
The row at rowIndex must be selected prior to calling editColumn:row:withEvent:select:, or an exception
will be raised.
490
6.36.20
CHAPTER 6. COCOA CONTROLS
endUpdates
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Ends the group of
updates for the table view.
Notes: Ends the group of updates for the table view. This method, like beginUpdates, is nestable. See
beginUpdates for details.
6.36.21
frameOfCellAtColumnRow(column as Integer, row as Integer) as NSRectMBS
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a rectangle
locating the cell that lies at the intersection of the specified column and row.
Notes:
column: The index in the tableColumns array of the column containing the cell whose rectangle you want.
row: The index of the row containing the cell whose rectangle you want.
Returns a rectangle locating the cell that lies at the intersection of columnIndex and rowIndex. This method
returns NSRectMBS.Zero if columnIndex or rowIndex is greater than the number of columns or rows in the
table view.
You can use this method to update a single cell more efficiently than sending the table view a reloadData
message using reloadData function.
The result of this method is used in a drawWithFrame:inView: message to the table column’s data cell. You
can subclass and override this method to customize the frame of a particular cell. However, never return a
frame larger than the default implementation returns.
The default frame is computed to have a height equal to the rectOfRow: for rowIndex, minus the half intercellSpacing height on the top and half on the bottom. The width of frame is equal to the with of the table
column minus half the intercellSpacing width on the left, and half on the right.
6.36.22
hiddenRowIndexes as NSIndexSetMBS
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The indexes of all
hidden table rows.
Notes: The value of this property is an index set containing the indexes of any hidden table rows. Table
rows may be hidden by invoking the hideRowsAtIndexes method. Some drag-and-drop operations also result
in hidden rows.
6.36. CLASS NSTABLEVIEWMBS
6.36.23
491
hideRowsAtIndexes(indexes as NSIndexSetMBS, animationOptions as
Integer)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Hides the specified
table rows.
Notes:
indexes: An index set containing indexes of the rows to be hidden.
rowAnimation: An animation effect to be applied when the rows are hidden.
Use this method when you no longer want the data to be visible to the user, but you dont want to permanently remove the data. Hidden table rows have a height of zero and cannot be selected by the user.
However, if a selected table row is hidden, it will remain selected.
Hiding a table row causes the didRemoveRowView delegate method to be invoked.
6.36.24
insertRowsAtIndexes(indexes as NSIndexSetMBS, animationOptions
as Integer)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Inserts the rows
using the specified animation.
Notes:
indexes: The final positions of the new rows to be inserted.
animationOptions: The animation displayed during the insert. See NSTableViewAnimationOptions for the
possible values that can be combined using the bitwise OR operator.
The numberOfRows in the table view is automatically increased by the count of indexes.
Calling this method multiple times within the same beginUpdates and endUpdates block is allowed, and
changes are processed incrementally.
NSCell-based table views must first call beginUpdates before calling this method.
6.36.25
isColumnSelected(column as Integer) as boolean
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether the column at a given index is selected.
Notes: column is from 0 to to numberOfColumns.
492
6.36.26
CHAPTER 6. COCOA CONTROLS
isRowSelected(row as Integer) as boolean
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a Boolean
value that indicates whether the row at a given index is selected.
Notes: row is from 0 to to numberOfRows.
6.36.27
moveColumn(column as Integer, toIndex as Integer)
Plugin Version: 9.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Moves the column
and heading at a given index to a new given index.
Notes:
columnIndex: The current index of the column to move.
newIndex: The new index for the moved column.
This method raises the ColumnDidMove event.
6.36.28
moveRowAtIndex(oldIndex as Integer, newIndex as Integer)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Moves the specified
row to the new row location using animation.
Notes:
oldIndex: Initial row index.
newIndex: New row index.
This is similar to removing a row at oldIndex and inserting it at newIndex, except the same view is used
and simply has its position updated to the new location.
Changes happen incrementally as they are sent to the table, so as soon as this method is called the row can
be considered moved. However the underlying view is not moved until endUpdates has been called.
This method can be called multiple times within the same beginUpdates and endUpdates block.
NSCell-based table views must first call beginUpdates before calling this method.
6.36.29
noteHeightOfRowsWithIndexesChanged(indexSet as NSIndexSetMBS)
Plugin Version: 16.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Informs the table
view that the rows specified in indexSet have changed height.
Notes:
6.36. CLASS NSTABLEVIEWMBS
493
indexSet: Index set of rows that have changed their height.
If you implement heightOfRow event this method immediately retiles the table view using the row heights
the event provides.
For NSView-based tables, this method will animate. To turn off the animation, create an NSAnimationContext grouping and set the duration to 0. Then call this method and end the grouping.
For NSCell-based tables, this method normally doesn’t animate. However, it will animate if you call it inside
a beginUpdates/endUpdates block.
6.36.30
noteNumberOfRowsChanged
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the number of records in its data source has changed.
Notes: This method allows the receiver to update the scrollers in its scroll view without actually reloading
data into the receiver. It’s useful for a data source that continually receives data in the background over a
period of time, in which case the table view can remain responsive to the user while the data is received.
6.36.31
rectOfColumn(column as Integer) as NSRectMBS
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the rectangle
containing the column at at a given index.
Notes:
The rectangle containing the column at columnIndex. Returns NSRectMBS.Zero (an empty rectangle) if
columnIndex lies outside the range of valid column indices for the receiver.
You can use this method to update a single column more efficiently than sending the table view a reloadData
message.
aTableView.setNeedsDisplayInRect(aTableView.rectOfColumn(column))
6.36.32
rectOfRow(row as Integer) as NSRectMBS
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the rectangle
containing the row at a given index.
Notes: Returns the rectangle containing the row at rowIndex. Returns NSRectMBS.Zero (an empty rectangle) if rowIndex lies outside the range of valid row indices for the receiver.
494
6.36.33
CHAPTER 6. COCOA CONTROLS
reloadData
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Marks the receiver
as needing redisplay, so it will reload the data for visible cells and draw the new values.
Notes: This method forces redraw of all the visible cells in the receiver. If you want to update the value
in a single cell, column, or row, it is more efficient to use frameOfCellAtColumn(), rectOfColumn(), or
rectOfRow() in conjunction with setNeedsDisplayInRect(). If you just want to update the scroller, use
noteNumberOfRowsChanged; if the height of a set of rows changes, use noteHeightOfRowsWithIndexesChanged().
See also:
• 6.36.34 reloadData(rowIndexes as NSIndexSetMBS, columnIndexes as NSIndexSetMBS)
6.36.34
494
reloadData(rowIndexes as NSIndexSetMBS, columnIndexes as NSIndexSetMBS)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Reloads the data
for only the specified rows and columns.
Notes:
rowIndexes: The indexes of the rows to update.
columnIndexes: The indexes of the columns to update.
For cells that are visible, the appropriate dataSource and delegate methods are called and the cells are
redrawn.
For tables that support variable row heights, the row height is not re-queried from the delegate; it is your
responsibility to invoke noteHeightOfRowsWithIndexesChanged if a row height change is required.
For NSView-based table views, this method drops the view-cells in the table row, but not the NSTableRowView instances.
See also:
• 6.36.33 reloadData
6.36.35
494
removeRowsAtIndexes(indexes as NSIndexSetMBS, animationOptions
as Integer)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Removes the rows
using the specified animation.
Notes:
6.36. CLASS NSTABLEVIEWMBS
495
indexes: An index set containing the rows to remove.
animationOptions: The animation displayed during the insert. See NSTableViewAnimationOptions for the
possible values that can be combined using the bitwise OR operator.
This method deletes from the table the rows represented at indexes and automatically decreases numberOfRows by the count of indexes.
The row indexes should be with respect to the current state displayed in the table view, and not the final
state, because the specified rows do not exist in the final state.
Calling this method multiple times within the same beginUpdates and endUpdates block is allowed, and
changes are processed incrementally.
Changes are processed incrementally as the insertRowsAtIndexes, removeRowsAtIndexes, and the moveRowAtIndex methods are called. It is acceptable to delete row 0 multiple times, as long as there is still a row available.
NSCell-based table views must first call beginUpdates before calling this method.
6.36.36
removeTableColumn(column as NSTableColumnMBS)
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Removes a given
column from the receiver.
6.36.37
rowAtPoint(p as NSPointMBS) as Integer
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the index of
the row a given point lies in.
Notes: Returns the index of the row aPoint lies in, or 1 if aPoint lies outside the receiver’s bounds.
See also:
• 6.36.38 rowAtPoint(x as Double, y as Double) as Integer
6.36.38
495
rowAtPoint(x as Double, y as Double) as Integer
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the index of
the row a given point lies in.
Notes: Returns the index of the row aPoint lies in, or 1 if aPoint lies outside the receiver’s bounds.
See also:
• 6.36.37 rowAtPoint(p as NSPointMBS) as Integer
495
496
6.36.39
CHAPTER 6. COCOA CONTROLS
rowForView(view as NSViewMBS) as Integer
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the index
of the row for the specified view.
Notes:
view: The view for which to retrieve the row.
Returns the index of the row containing to view. This method returns -1 if the view is not in the table view.
This method may also return -1 if the row containing the view is being animated away, such as during the
deletion of a row.
This method is typically called in the action method for an NSButton (or NSControl) to find out what row
(and column) the action should be performed on.
The implementation is O(n) where n is the number of visible rows, so this method should generally not be
called within a loop.
6.36.40
rowsInRect(rect as NSRectMBS) as NSRangeMBS
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a range of
indexes for the rows that lie wholly or partially within the vertical boundaries of the specified rectangle.
Notes:
Rect: A rectangle in the coordinate system of the table view.
Returns a range of indexes for the table views rows that lie wholly or partially within the horizontal boundaries of aRect. If the width or height of aRect is 0, this method returns an NSRange whose length is 0.
The location of the range is the index of the first row in the rectangle, and the length is the number of rows
that lie in the rectangle.
6.36.41
rowViewAtRow(row as Integer, makeIfNecessary as Boolean) as NSViewMBS
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a row view
at the specified index, creating one if necessary.
Notes:
row: The row index.
makeIfNecessary: True if a view is required, NO if you want to update properties on a view, if one is available.
Returns an instance, or subclass, of NSTableRowView. Returning nil is also valid if makeIfNecessary is false
and the view did not exist.
6.36. CLASS NSTABLEVIEWMBS
497
This method first attempts to return a currently displayed view in the visible area. If there is no visible
view, and makeIfNecessary is true, a prepared temporary view is returned. If makeIfNecessary is false, and
the view is not visible, nil is returned.
In general, makeIfNecessary should be true if you require a resulting view, and false if you want to update
properties on a view only if it is available (generally this means it is visible).
An exception is thrown if row falls outside of the number of rows in the table (numberOfRows). The returned result should generally not be held onto for longer than the current run loop cycle. Its better to call
rowViewAtRow whenever a view is required.
6.36.42
scrollColumnToVisible(column as Integer)
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Scrolls the receiver
and header view horizontally in an enclosing NSClipView so the column specified by columnIndex is visible.
6.36.43
scrollRowToVisible(row as Integer)
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Scrolls the receiver
vertically in an enclosing NSClipView so the row specified by rowIndex is visible.
6.36.44
ScrollToLine(Line as Integer, Animated as Boolean)
Plugin Version: 16.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Scrolls to line.
Notes:
If animated is true, the scroll is animated.
The line is centered in the middle of the viewable area if possible.
6.36.45
selectAll
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Selects all rows or
all columns, according to whether rows or columns were most recently selected.
Notes: If the table allows multiple selection, this action method selects all rows or all columns, according
to whether rows or columns were most recently selected. If nothing has been recently selected, this method
selects all rows. If this table doesn’t allow multiple selection, this method does nothing.
498
6.36.46
CHAPTER 6. COCOA CONTROLS
selectColumnIndexes(indexes as NSIndexSetMBS, extend as boolean)
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets the column
selection using indexes.
Notes: f the extend flag is false the selected columns are specified by indexes. If extend is true, the columns
indicated by indexes are added to the collection of already selected columns, providing multiple selection.
6.36.47
selectedColumnIndexes as NSIndexSetMBS
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns an index set
containing the indexes of the selected columns.
Notes: Returns an index set containing the indexes of the selected columns.
6.36.48
selectedRowIndexes as NSIndexSetMBS
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns an index set
containing the indexes of the selected rows.
Notes: Available in Mac OS X v10.3 and later.
6.36.49
selectRowIndexes(indexes as NSIndexSetMBS, extend as boolean)
Plugin Version: 9.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets the row selection
using indexes.
Notes:
If the extend flag is false the selected rows are specified by indexes. If extend is true, the rows indicated by
indexes are added to the collection of already selected rows, providing multiple selection.
Available in Mac OS X v10.3 and later.
6.36.50
setDraggingSourceOperationMask(mask as Integer, isLocal as Boolean)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets the default
operation mask returned by draggingSourceOperationMaskForLocal to mask.
Notes:
mask: The drag operation mask. See NSDragOperation for the supported values.
isLocal: True if the destination is the same application, otherwise false. In either case the specified mask
value is archived and used.
6.36. CLASS NSTABLEVIEWMBS
6.36.51
499
setDropRow(row as Integer, dropOperation as Integer)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Retargets the
proposed drop operation.
Notes:
row: The target row index.
dropOperation: The drop operation. Supported values are specified by NSTableViewDropOperation.
For example, to specify a drop on the second row, specify row as 1, and operation as NSTableViewDropOn.
To specify a drop below the last row, specify row as [ self numberOfRows ] and operation as NSTableViewDropAbove.
Passing a value of 1 for row and NSTableViewDropOn as the operation causes the entire table view to be
highlighted rather than a specific row. This is useful if the data displayed by the table view does not allow
the user to drop items at a specific row location.
6.36.52
setSortDescriptor(sortDescriptor as NSSortDescriptorMBS)
Plugin Version: 14.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets the receiver’s
sort descriptors.
Notes:
A table column is considered sortable if it has a sort descriptor that specifies the sorting direction, a key to
sort by, and a selector defining how to sort.
The array of sort descriptors is archived. Sort descriptors persist along with other column information if an
autosave name is set.
Calling setSortDescriptors may have the side effect of invoking the data source method tableViewSortDescriptorsDidChange.
6.36.53
setSortDescriptors(sortDescriptors() as NSSortDescriptorMBS)
Plugin Version: 14.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets the receiver’s
sort descriptors.
Notes:
A table column is considered sortable if it has a sort descriptor that specifies the sorting direction, a key to
sort by, and a selector defining how to sort.
The array of sort descriptors is archived. Sort descriptors persist along with other column information if an
autosave name is set.
500
CHAPTER 6. COCOA CONTROLS
Calling setSortDescriptors may have the side effect of invoking the data source method tableViewSortDescriptorsDidChange.
6.36.54
sizeLastColumnToFit
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Resizes the last
column if there’s room so the receiver fits exactly within its enclosing clip view.
6.36.55
sizeToFit
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Changes the width
of columns in the receiver so all columns are visible.
Notes: All columns are resized to the same size, up to a column’s maximum size. This method then invokes
tile.
6.36.56
sortDescriptors as NSSortDescriptorMBS()
Plugin Version: 14.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the receivers
sort descriptors.
6.36.57
tableColumns as NSTableColumnMBS()
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns an array
containing the the NSTableColumn objects in the receiver.
Notes: The array returned by tableColumns contains all receiver’s columns, including those that are hidden.
6.36.58
tableColumnWithIdentifier(identifier as string) as NSTableColumnMBS
Plugin Version: 9.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the NSTableColumn object for the first column whose identifier is equal to a given object.
Notes: Returns the NSTableColumn object for the first column whose identifier is equal to anObject, as
compared using isEqual:, or nil if no columns are found with the specified identifier.
6.36. CLASS NSTABLEVIEWMBS
6.36.59
501
tile
Plugin Version: 8.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Properly sizes the
receiver and its header view and marks it as needing display.
Notes: Also resets cursor rectangles for the header view and line scroll amounts for the NSScrollView object.
6.36.60
unhideRowsAtIndexes(indexes as NSIndexSetMBS, animationOptions
as Integer)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Unhides the specified
table rows.
Notes:
indexes: An index set containing indexes of the hidden rows to be shown again.
rowAnimation: An animation effect to be applied when the rows are hidden.
Unhiding a table row causes the didAddRowView event to be invoked.
6.36.61
viewAtColumn(column as Integer, row as Integer, makeIfNecessary as
Boolean) as NSViewMBS
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a view at
the specified row and column indexes, creating one if necessary.
Notes:
column: The index of the column in the tableColumns array.
row: The row index.
makeIfNecessary: true if a view is required, false if you want to update properties on a view, if one is available.
Returns an instance of NSView.
This method first attempts to return an available view, which is generally in the visible area. If there is no
available view, and makeIfNecessary is true, a prepared temporary view is returned. If makeIfNecessary is
false, and the view is not available, nil will be returned.
In general, makeIfNecessary should be true if you require a resulting view, and false if you only want to
update properties on a view only if it is available (generally this means it is visible).
An exception will be thrown if row is not within the numberOfRows. The returned result should generally
not be held onto for longer than the current run loop cycle. Instead they should re-query the table view for
the row view.
502
CHAPTER 6. COCOA CONTROLS
6.36.62
Properties
6.36.63
allowsColumnReordering as boolean
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Controls whether the
user can drag column headers to reorder columns.
Notes:
The default is true. You can rearrange columns programmatically regardless of this setting.
(Read and Write property)
6.36.64
allowsColumnResizing as boolean
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value that
indicates whether the receiver allows the user to resize columns by dragging between their headers.
Notes: (Read and Write property)
6.36.65
allowsColumnSelection as boolean
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Controls whether the
user can select an entire column by clicking its header.
Notes:
The default is false. You can select columns programmatically regardless of this setting.
(Read and Write property)
6.36.66
allowsEmptySelection as boolean
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Controls whether the
receiver allows zero rows or columns to be selected.
Notes:
Unlike with the other settings that affect selection behavior, you cannot set an empty selection programmatically if empty selection is disallowed.
(Read and Write property)
6.36.67
allowsMultipleSelection as boolean
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Controls whether the
user can select more than one row or column at a time.
Notes:
6.36. CLASS NSTABLEVIEWMBS
503
The default is false. You can select multiple columns or rows programmatically regardless of this setting.
(Read and Write property)
6.36.68
allowsTypeSelect as boolean
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether the receiver
allows the user to type characters to select rows.
Notes:
Available in Mac OS X v10.5 and later.
(Read and Write property)
6.36.69
autosaveName as string
Plugin Version: 9.6, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The name under
which table information is automatically saved.
Notes:
The table information is saved separately for each user and for each application that user uses.
Note that even when a table view has an autosave name, it may not be saving table information automatically.
(Read and Write property)
6.36.70
autosaveTableColumns as boolean
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether the order
and width of this table view’s columns are automatically saved.
Notes:
If flag is different from the current value, this method also reads in the saved information and sets the table
options to match.
The table information is saved separately for each user and for each application that user uses. Note that if
autosaveName returns nil, this setting is ignored and table information isn’t saved.
(Read and Write property)
504
6.36.71
CHAPTER 6. COCOA CONTROLS
backgroundColor as NSColorMBS
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The color used to
draw the background of the receiver.
Notes:
The default background color is light gray.
(Read and Write property)
6.36.72
clickedColumn as Integer
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the index of
the column the user clicked to trigger an action message.
Notes:
The index of the column the user clicked to trigger an action message. Returns 1 if the user clicked in an
area of the table view not occupied by columns.
Index is zero based.
(Read only property)
6.36.73
clickedRow as Integer
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the index of
the row the user clicked to trigger an action message.
Notes:
The index of the row the user clicked to trigger an action message. Returns 1 if the user clicked in an area
of the table view not occupied by table rows.
Index is zero based.
(Read only property)
6.36.74
columnAutoresizingStyle as Integer
Plugin Version: 9.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The table’s column
autoresizing style.
Notes:
Use the following constants:
6.36. CLASS NSTABLEVIEWMBS
505
NSTableViewMBS.kFirstColumnOnlyAutoresizingStyle
NSTableViewMBS.kUniformColumnAutoresizingStyle
NSTableViewMBS.kSequentialColumnAutoresizingStyle
NSTableViewMBS.kReverseSequentialColumnAutoresizingStyle
NSTableViewMBS.kNoColumnAutoresizing
NSTableViewMBS.kLastColumnOnlyAutoresizingStyle
Available in Mac OS X v10.4 and later.
(Read and Write property)
6.36.75
cornerView as NSViewMBS
Plugin Version: 9.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The view used to
draw the area to the right of the column headers and above the vertical scroller of the enclosing scroll view.
Notes:
This is by default a simple view that merely fills in its frame, but you can replace it with a custom view
using this property.
(Read and Write property)
6.36.76
dataSource as NSTableDataSourceMBS
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The object that
provides the data displayed in the table view.
Notes: (Read and Write property)
6.36.77
draggingDestinationFeedbackStyle as Integer
Plugin Version: 9.6, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The feedback style
displayed when the user drags over the table view.
Notes:
Available in Mac OS X v10.6 and later.
(Read and Write property)
6.36.78
editedColumn as Integer
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the index of
the column being edited.
Notes:
506
CHAPTER 6. COCOA CONTROLS
First column has index zero.
If sent during editColumn(), the index of the row being edited; otherwise 1.
(Read only property)
6.36.79
editedRow as Integer
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the index of
the row being edited.
Notes:
The first row index is zero.
If sent during editColumn(), the index of the row being edited; otherwise 1.
(Read only property)
6.36.80
effectiveRowSizeStyle as Integer
Plugin Version: 13.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the effective
row size style for the table.
Notes:
If the rowSizeStyle is NSTableViewRowSizeStyleDefault, then this method returns the default size for this
table.
The default size is currently set in the System Preferences by the users.
Available in OS X v10.7 and later.
(Read only property)
6.36.81
floatsGroupRows as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the table view draws grouped rows as if they are floating.
Notes:
Group rows are rows for which the table view delegates isGroupRow method returns true. These rows can
be displayed as if they are floating in a view-based table view.
The default value of this property is true.
(Read and Write property)
6.36.82
focusedColumn as Integer
Plugin Version: 9.6, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The currently focused
column.
6.36. CLASS NSTABLEVIEWMBS
507
Notes:
Returns the index of the column, or -1 if there is no focused column
The focus interaction will always be on the selectedRow of the table. If the selectedRow is a full width cell,
then focusedColumn will return 1 when focused..
Available in Mac OS X v10.6 and later.
(Read and Write property)
6.36.83
gridColor as NSColorMBS
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The color used to
draw grid lines.
Notes:
The default color is gray.
(Read and Write property)
6.36.84
gridStyleMask as Integer
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The receiver’s grid
style mask.
Notes:
use the constants;
kGridNone
kSolidVerticalGridLineMask
kSolidHorizontalGridLineMask
= 0,
=1
=2
(Read and Write property)
6.36.85
headerView as NSTableHeaderViewMBS
Plugin Version: 9.6, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The NSTableHeaderView object used to draw headers over columns.
Notes:
The NSTableHeaderView object used to draw headers over columns, or nil if the receiver has no header view
(Read and Write property)
508
6.36.86
CHAPTER 6. COCOA CONTROLS
highlightedtableColumn as NSTableColumnMBS
Plugin Version: 9.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The table column
highlighted in the receiver.
Notes:
A highlightable column header can be used in conjunction with row selection to highlight a particular column
of the table. An example of this is how the Mail application indicates the currently sorted column.
(Read and Write property)
6.36.87
intercellSpacing as NSSizeMBS
Plugin Version: 9.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The horizontal and
vertical spacing between cells.
Notes:
The default spacing is (3.0, 2.0).
(Read and Write property)
6.36.88
numberOfColumns as Integer
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the number
of columns in the receiver.
Notes:
The value returned includes table columns that are currently hidden.
(Read only property)
6.36.89
numberOfRows as Integer
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the number
of rows in the receiver.
Notes:
Typically you should not ask the table view how many rows it has; instead you should interrogate the table
view’s data source.
(Read only property)
6.36. CLASS NSTABLEVIEWMBS
6.36.90
509
numberOfSelectedColumns as Integer
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the number
of selected columns.
Notes: (Read only property)
6.36.91
numberOfSelectedRows as Integer
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the number
of selected rows.
Notes: (Read only property)
6.36.92
rowActionsVisible as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether a table rows actions are visible.
Notes:
This property contains a Boolean value indicating whether a table rows actions are visible or notthe user
has swiped the row to reveal the row actions. Set the value of this property to false to hide any visible row
actions. Setting the value of this property to true is not supported, and will result in an exception.
(Read and Write property)
6.36.93
rowHeight as Double
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the height of
each row in the receiver.
Notes:
The default row height is 16.0.
(Read and Write property)
6.36.94
rowSizeStyle as Integer
Plugin Version: 13.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The row size used
by the tableview: small, medium, large, or on a custom row by row basis.
Notes:
The row size style can be modified on a row by row basis by invoking the event heightOfRow, if implemented.
510
CHAPTER 6. COCOA CONTROLS
The rowSizeStyle defaults to NSTableViewRowSizeStyleCustom. NSTableViewRowSizeStyleCustom indicates to use the rowHeight of the table, instead of the pre-determined system values.
Generally, rowSizeStyle should always be NSTableViewRowSizeStyleCustom except for ”source lists”. To
implement variable row heights, set the value to NSTableViewRowSizeStyleCustom and implement tableView:heightOfRow: in the delegate.
Available in OS X v10.7 and later.
(Read and Write property)
6.36.95
selectedColumn as Integer
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the index of
the last column selected or added to the selection.
Notes:
Returns the index of the last column selected or added to the selection, or 1 if no column is selected.
(Read only property)
6.36.96
selectedRow as Integer
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the index of
the last row selected or added to the selection.
Notes:
Returns the index of the last row selected or added to the selection, or 1 if no row is selected.
(Read only property)
6.36.97
selectionHighlightStyle as Integer
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The selection highlight
style used by the receiver to indicate row and column selection.
Notes:
Available in Mac OS X v10.5 and later.
(Read and Write property)
6.36. CLASS NSTABLEVIEWMBS
6.36.98
511
usesAlternatingRowBackgroundColors as boolean
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value that
indicates whether the receiver uses the standard alternating row colors for its background.
Notes:
Available in Mac OS X v10.3 and later.
(Read and Write property)
6.36.99
usesStaticContents as Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A Boolean value
indicating whether the table uses static data.
Notes:
A static table does not rely on a data source to provide the number of rows. A static table views contents
are set at design time and can be changed programmatically as needed. Typically, you do not change the
contents of a static table view after setting them.
In Xcode, any rows you add to a static table are saved in the corresponding nib or storyboard file and
loaded with the rest of the table at runtime. You can add table rows programmatically to a static table
view using the insertRowsAtIndexes method. When adding rows programmatically, your table view delegate
must implement the view method to provide the corresponding view for any new rows. You can also remove
rows at any time using the removeRowsAtIndexes method.
A table with static contents must be an NSView-based table view.
Available in macOS 10.10 or later.
(Read and Write property)
6.36.100
verticalMotionCanBeginDrag as boolean
Plugin Version: 8.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether vertical
motion is treated as a drag or selection change to flag.
Notes:
If flag is false then vertical motion will not start a drag. The default is true.
Note that horizontal motion is always a valid motion to begin a drag. Most often, you would want to disable
vertical dragging when it’s expected that horizontal dragging is the natural motion.
(Read and Write property)
512
6.36.101
CHAPTER 6. COCOA CONTROLS
indicatorImageInTableColumn(column as NSTableColumnMBS) as NSImageMBS
Plugin Version: 9.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The indicator image
of a given table column.
Notes:
An indicator image is an arbitrary (small) image that is rendered on the right side of the column header. An
example of its use is in Mail to indicate the sorting direction of the currently sorted column in a mailbox.
(Read and Write computed property)
6.36.102
Events
6.36.103
ColumnDidMove(notification as NSNotificationMBS, oldColumn as
Integer, newColumn as Integer)
Plugin Version: 9.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event informs
the delegate that a column was moved by user action in the table view.
6.36.104
ColumnDidResize(notification as NSNotificationMBS, column as NSTableColumnMBS, index as Integer)
Plugin Version: 9.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event informs
you that a column was resized in the table view.
6.36. CLASS NSTABLEVIEWMBS
6.36.105
513
dataCell(tableColumn as NSTableColumnMBS, row as Int64) as NSCellMBS
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Optional return a
different cells for each row.
Notes:
A different data cell can be returned for any particular tableColumn and row, or a cell that will be used for
the entire row (a full width cell). The returned cell should properly implement copyWithZone:, since the
cell may be copied by NSTableView. If the tableColumn is non-nil, and nil is returned, then the table will
use the default cell from tableColumn.dataCellForRow(Row).
When each row is being drawn, this method will first be called with a nil tableColumn. At this time, you can
return a cell that will be used to draw the entire row, acting like a group. If you do return a cell for the ’nil’
tableColumn, be prepared to have the other corresponding datasource and delegate methods to be called
with a ’nil’ tableColumn value. If don’t return a cell, the method will be called once for each tableColumn
in the tableView, as usual.
6.36.106
didAddRowView(rowView as NSTableRowViewMBS, row as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Tells the delegate
that a row view was added at the specified row.
Notes:
rowView: The row view.
row: The index of the row.
At this point, the delegate can add extra views, or modify the properties of rowView.
This method is only valid for NSView-based table views.
6.36.107
didClickTableColumn(tableColumn as NSTableColumnMBS)
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called if a table
column was clicked on.
6.36.108
didDragTableColumn(tableColumn as NSTableColumnMBS)
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent at the time the
mouse button goes up in tableView and tableColumn has been dragged during the time the mouse button
was down.
Notes:
514
CHAPTER 6. COCOA CONTROLS
tableColumn: The table column.
The behavior of this method on Mac OS X v10.5 is different from prior versions. On Mac OS X v 10.5 the
dragged column is sent to the subclass. In earlier versions the table column that is currently located at the
dragged column’s original index is sent.
6.36.109
didRemoveRowView(rowView as NSTableRowViewMBS, row as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Tells the delegate
that a row view was removed from the table at the specified row.
Notes:
rowView: The row view.
row: The index of the row.
If row equals -1, the row is being deleted from the table and is no longer a valid row; otherwise row is a valid
row that is being removed by being moved off screen.
This method is only valid for NSView-based table views.
6.36.110
DoubleClick
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: A double click was
recognized.
6.36.111
heightOfRow(row as Int64) as Double
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
event to support a table with varying row heights.
Notes: The height returned by this method should not include intercell spacing and must be greater than
zero. Performance Considerations: For large tables in particular, you should make sure that this method is
efficient. NSTableView may cache the values this method returns, but this should NOT be depended on, as all
values may not be cached. To signal a row height change, call noteHeightOfRowsWithIndexesChanged. For
a given row, the same row height should always be returned until noteHeightOfRowsWithIndexesChanged
is called, otherwise unpredicable results will happen. NSTableView automatically invalidates its entire row
height cache in reloadData, and noteNumberOfRowsChanged.
6.36. CLASS NSTABLEVIEWMBS
6.36.112
515
isGroupRow(row as Int64) as boolean
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
delegate to indicate that a specified row is a group row.
Notes:
row: The row index.
Return true if the specified row should have the group row style drawn, false otherwise.
If the cell in row is an NSTextFieldCell and contains only a string, the group row style attributes will automatically be applied to the cell.
Group rows in view-based table views can be made to visually float’ by setting the tableview method setFloatsGroupRows to true.
Note: When configured as a source list style table view, rows identified as group rows draw with a specific
style unique for source lists.
Available in Mac OS X v10.5 and later.
6.36.113
mouseDownInHeaderOfTableColumn(tableColumn as NSTableColumnMBS)
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent to the subclass
whenever the mouse button is clicked in the table view’s header column.
Notes: tableColumn: The table column.
6.36.114
nextTypeSelectMatchFromRow(startRow as Int64, endRow as Int64,
searchString as string) as Int64
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
subclass to modify how type selection works.
Notes:
startRow: The starting row of the search range.
endRow: The ending row of the search range.
searchString: A string containing the typed selection.
Return the first row in the range of startRow through endRow (excluding endRow itself) that matches selectionString. Return -1 if no match is found.
516
CHAPTER 6. COCOA CONTROLS
It is possible for endRow to be less than startRow if the search will wrap.
Available in Mac OS X v10.5 and later.
6.36.115
rowViewForRow(row as Integer) as NSTableRowViewMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Asks the delegate
for a view to display the specified row.
Notes:
row: The row index.
Return an instance or subclass of NSTableRowView. If nil is returned, an NSTableRowView instance will
be created and used.
You can implement this event to return a custom NSTableRowView for row.
The reuse queue can be used in the same way as documented in tableView:view:row:. The returned view
will have attributes properly set to it before its added to the tableView.
This method is only valid for NSView-based table views.
6.36.116
SelectionDidChange(notification as NSNotificationMBS)
Plugin Version: 9.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event informs
you that the table view’s selection has changed.
6.36.117
selectionIndexesForProposedSelection(proposedSelectionIndexes as NSIndexSetMBS) as NSIndexSetMBS
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
delegate to modify the proposed selection.
Notes:
proposedSelectionIndexes: An index set containing the indexes of the proposed selection.
Return an NSIndexSet instance containing the indexes of the new selection. Return proposedSelectionIndexes if the proposed selection is acceptable, or the value of the table view’s existing selection to avoid
changing the selection.
This method may be called multiple times with one new index added to the existing selection to find out if
6.36. CLASS NSTABLEVIEWMBS
517
a particular index can be selected when the user is extending the selection with the keyboard or mouse.
Implementation of this method is optional. If implemented, this method will be called instead of shouldSelectRow.
Available in Mac OS X v10.5 and later.
6.36.118
SelectionIsChanging(notification as NSNotificationMBS)
Plugin Version: 9.2, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event informs
you that the table view’s selection is in the process of changing (typically because the user is dragging the
mouse across a number of rows).
6.36.119
selectionShouldChangeInTableView as boolean
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the selection should change.
Notes:
Return true to allow the table view to change its selection (typically a row being edited), false to deny
selection change.
The user can select and edit different cells within the same row, but can’t select another row unless the
delegate approves. The subclass can implement this method for complex validation of edited rows based on
the values of any of their cells.
6.36.120
shouldEditTableColumn(tableColumn as NSTableColumnMBS, row
as Int64) as boolean
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the cell at the specified row and column can be edited.
Notes:
TableColumn: The table column.
rowIndex: The row index.
Return true to allow editing the cell, false to deny editing.
The subclass can implement this method to disallow editing of specific cells.
Note: This method is only valid for cell-based table views.
518
6.36.121
CHAPTER 6. COCOA CONTROLS
shouldReorderColumn(columnIndex as Int64, newColumnIndex as Int64)
as boolean
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent to the subclass
to allow or prohibit the specified column to be dragged to a new location.
Notes:
columnIndex: The index of the column being dragged.
newColumnIndex: The proposed target index of the column.
Return true if the column reordering should be allowed, otherwise false.
When a column is initially dragged by the user, the delegate is first called with a newColumnIndex value
of -1. Returning false will disallow that column from being reordered at all. Returning true allows it to be
reordered, and the delegate will be called again when the column reaches a new location.
The actual NSTableColumn instance can be retrieved from the tableColumns array.
If this method is not implemented, all columns are considered reorderable.
Available in Mac OS X v10.6 and later.
6.36.122
shouldSelectRow(row as Int64) as boolean
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the table view should allow selection of the specified row.
Notes:
rowIndex: The row index.
Return true to permit selection of the row, false to deny selection.
The delegate can implement this method to disallow selection of particular rows.
For better performance and finer-grain control over the selection, use selectionIndexesForProposedSelection.
6.36.123
shouldSelectTableColumn(tableColumn as NSTableColumnMBS) as
boolean
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the specified table column can be selected.
Notes:
6.36. CLASS NSTABLEVIEWMBS
519
TableColumn: The table column.
Return true to permit selection, otherwise false.
The subclass can implement this event to disallow selection of particular columns.
6.36.124
shouldShowCellExpansion(tableColumn as NSTableColumnMBS, row
as Int64) as Boolean
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
subclass to control cell expansion for a specific row and column.
Notes:
TableColumn: The table column.
row: The row index.
Return true if the tooltip cell should expand, false otherwise.
Cell expansion can occur when the mouse hovers over the specified cell and the cell contents are unable to
be fully displayed within the cell. If this method returns true, the full cell contents will be shown in a special
floating tool tip view, otherwise the content is truncated.
Note: This method is only valid for cell-based table views.
Available in Mac OS X v10.5 and later.
6.36.125
shouldTrackCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, row as Int64) as Boolean
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
subclass to control the tracking behavior for a specific cell.
Notes:
cell: The cell to track.
tableColumn: The table column.
row: A row in tableView.
Returns true if the cell should track, false otherwise.
520
CHAPTER 6. COCOA CONTROLS
Normally, only selectable or selected cells can be tracked. If you implement this method, cells which are not
selectable or selected can be tracked, and vice-versa.
For example, this allows you to have an NSButtonCell in a table which does not change the selection, but
can still be clicked on and tracked.
Note: This method is only valid for cell-based table views.
Available in Mac OS X v10.5 and later.
6.36.126
shouldTypeSelectForEvent(e as NSEventMBS, searchString as string)
as Boolean
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
subclass to control type select for a specific event.
Notes:
event: The event.
searchString: The search string or nil if no type select has began.
Return true to allow type select for event, false otherwise.
Typically, this is called from the table view keyDown implementation and the event will be a key event.
Available in Mac OS X v10.5 and later.
6.36.127
sizeToFitWidthOfColumn(column as Int64) as Double
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
subclass to provide custom sizing behavior when a column’s resize divider is double clicked.
Notes:
column: The index of the column.
Returns the width of the specified column.
By default, NSTableView iterates every row in the table, accesses a cell via preparedCellAtColumn, and
requests the cellSize to find the appropriate largest width to use.
For accurate results and performance, it is recommended that this method is implemented when using large
tables. By default, large tables use a monte carlo simulation instead of iterating every row.
6.36. CLASS NSTABLEVIEWMBS
521
Available in Mac OS X v10.6 and later.
6.36.128
textShouldBeginEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as boolean
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called to
decide whether text editing should be allowed.
Notes: Return true to allow.
6.36.129
textShouldEndEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as boolean
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called to
decide whether ending text editing should be allowed.
Notes: Return true to allow.
6.36.130
toolTipForCell(cell as NSCellMBS, r as NSRectMBS, tableColumn as
NSTableColumnMBS, row as Int64, mouseLocation as NSPointMBS)
as string
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns a string
that is displayed as a tooltip for the specified cell in the column and row.
Notes:
Cell: The cell.
r: The proposed active area of the tooltip. You can modify rect to provide an alternative active area.
TableColumn: The table column.
row: The row index.
mouseLocation: The mouse location.
Return a string containing the tooltip. Return empty string if no tooltip is desired.
By default, rect is computed as cell.drawingRectForBounds(cellFrame).
Available in Mac OS X v10.4 and later.
522
6.36.131
CHAPTER 6. COCOA CONTROLS
typeSelectString(tableColumn as NSTableColumnMBS, row as Int64)
as string
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked to allow the
subclass to provide an alternate text value used for type selection for a specified row and column.
Notes:
tableColumn: The table column.
row: The row index.
Returns a string that is used in type select comparison for row and tableColumn. Return ”” if the row or
tableColumn should not be searched.
Implement this method to change the string value that is searched for based on what is displayed. By default,
all cells with text in them are searched.
If this event is not implemented the string value is the cell string value.
Implementation of this event is optional.
Available in Mac OS X v10.5 and later.
6.36.132
view(tableColumn as NSTableColumnMBS, row as Integer) as NSViewMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Asks the delegate
for a view to display the specified row and column.
Notes:
see also
https://developer.apple.com/reference/appkit/nstableviewdelegate/1527449-tableview?language=objc
6.36.133
willDisplayCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, row as Int64)
Plugin Version: 12.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs you that
the tableview will display the specified cell at the row in the column.
Notes:
Cell: The cell to be displayed.
TableColumn: The table column.
row: The row index.
The event can modify the display attributes of cell to alter the appearance of the cell.
6.36. CLASS NSTABLEVIEWMBS
523
Because cell is reused for every row in tableColumn, the event must set the display attributes both when
drawing special cells and when drawing normal cells.
Note: The implementation of this method must not draw portions of the cell. It should only alter the state
of the passed in cell.
6.36.134
Constants
6.36.135
NSTableRowActionEdgeLeading = 0
Plugin Version: 17.1. Function: One of the constants to define table row edges on which row actions are
attached.
Notes: Denotes the leading, or left, edge of an table row view.
6.36.136
NSTableRowActionEdgeTrailing = 1
Plugin Version: 17.1. Function: One of the constants to define table row edges on which row actions are
attached.
Notes: Denotes the trailing, or right, edge of an table row view.
6.36.137
NSTableViewAnimationEffectFade = 1
Plugin Version: 17.1. Function: Specifies the animation effects to apply when inserting or removing rows.
Notes: Use a fade for row or column removal. The effect can be combined with any of the slide constants.
6.36.138
NSTableViewAnimationEffectGap = 2
Plugin Version: 17.1. Function: Specifies the animation effects to apply when inserting or removing rows.
Notes: Creates a gap for newly inserted rows. This is useful for drag and drop animations that animate to
a newly opened gap and should be used in the acceptDrop event.
6.36.139
NSTableViewAnimationEffectNone = 0
Plugin Version: 17.1. Function: Specifies the animation effects to apply when inserting or removing rows.
Notes: Use no animation effects.
524
6.36.140
CHAPTER 6. COCOA CONTROLS
NSTableViewAnimationSlideDown = & h20
Plugin Version: 17.1. Function: Specifies the animation effects to apply when inserting or removing rows.
Notes: Animates a row insertion or removal by sliding downward.
6.36.141
NSTableViewAnimationSlideLeft = & h30
Plugin Version: 17.1. Function: Specifies the animation effects to apply when inserting or removing rows.
Notes: Animates a row insertion by sliding from the left. Animates a row removal by sliding towards the left.
6.36.142
NSTableViewAnimationSlideRight = & h40
Plugin Version: 17.1. Function: Specifies the animation effects to apply when inserting or removing rows.
Notes: Animates a row insertion by sliding from the right. Animates a row removal by sliding towards the
right.
6.36.143
NSTableViewAnimationSlideUp = & h10
Plugin Version: 17.1. Function: Specifies the animation effects to apply when inserting or removing rows.
Notes: Animates a row insertion or removal by sliding upward.
6.36.144
NSTableViewDashedHorizontalGridLineMask=8
Plugin Version: 17.1. Function: One of the constants to specify grid styles.
Notes: Specifies that the horizontal grid lines should be drawn dashed.
6.36.145
NSTableViewDraggingDestinationFeedbackStyleGap=2
Plugin Version: 17.1. Function: One of the dragging styles.
Notes: Provides a gap insertion when dragging over the table. Note that this style is only officially supported for View Based TableViews, but may partially work in Cell Based TableViews. The decision to
use the gap style (compared to another style) can be made in draggingSessionWillBeginAtPoint, or it can
dynamically be changed.
6.36. CLASS NSTABLEVIEWMBS
6.36.146
525
NSTableViewDraggingDestinationFeedbackStyleNone=-1
Plugin Version: 9.6. Function: One of the constants to specify the drag styles displayed by the table view.
Notes:
Provides no feedback when the user drags over the table view. This option exists to allow subclasses to
implement their dragging destination highlighting, or to make it not show anything all.
Available in Mac OS X v10.6 and later.
6.36.147
NSTableViewDraggingDestinationFeedbackStyleRegular=0
Plugin Version: 9.6. Function: One of the constants to specify the drag styles displayed by the table view.
Notes:
Draws a solid round-rect background on drop target rows, and an insertion marker between rows. This style
should be used in most cases.
Available in Mac OS X v10.6 and later.
6.36.148
NSTableViewDraggingDestinationFeedbackStyleSourceList=1
Plugin Version: 9.6. Function: One of the constants to specify the drag styles displayed by the table view.
Notes:
Draws an outline on drop target rows, and an insertion marker between rows. This style will automatically
be set for source lists when the table’s setSelectionHighlightStyle: is set to NSTableViewSelectionHighlightStyleSourceList. This is the standard look for Source Lists, but may be used in other areas as needed.
Available in Mac OS X v10.6 and later.
6.36.149
NSTableViewDropAbove=1
Plugin Version: 9.6. Function: One of the constants to specify drop operations.
Notes:
Specifies that the drop should occur above the specified row.
For example, given a table with n rows (numbered with row 0 at the top visually), a row of n1 and operation
of NSTableViewDropOn would specify a drop on the last row. To specify a drop below the last row, you use
526
CHAPTER 6. COCOA CONTROLS
a row of n and NSTableViewDropAbove for the operation.
6.36.150
NSTableViewDropOn=0
Plugin Version: 9.6. Function: One of the constants to specify drop operations.
Notes:
Specifies that the drop should occur on the specified row.
For example, given a table with n rows (numbered with row 0 at the top visually), a row of n1 and operation
of NSTableViewDropOn would specify a drop on the last row. To specify a drop below the last row, you use
a row of n and NSTableViewDropAbove for the operation.
6.36.151
NSTableViewFirstColumnOnlyAutoresizingStyle=5
Plugin Version: 9.6. Function: One of the constants to specify the autoresizing style.
Notes:
Autoresize only the first table column.
When that table column can no longer be resized, stop autoresizing. Normally you should use one of the
sequential autoresizing modes instead.
Available in Mac OS X v10.4 and later.
6.36.152
NSTableViewGridNone=0
Plugin Version: 9.6. Function: One of the constants for the grid styles.
Notes: Specifies that no grid lines should be displayed.
6.36.153
NSTableViewLastColumnOnlyAutoresizingStyle=4
Plugin Version: 9.6. Function: One of the constants to specify the autoresizing style.
Notes:
Autoresize only the last table column.
When that table column can no longer be resized, stop autoresizing. Normally you should use one of the
6.36. CLASS NSTABLEVIEWMBS
527
sequential autoresizing modes instead.
Available in Mac OS X v10.4 and later.
6.36.154
NSTableViewNoColumnAutoresizing=0
Plugin Version: 9.6. Function: One of the constants to specify the autoresizing style.
Notes:
Disable table column autoresizing.
Available in Mac OS X v10.4 and later.
6.36.155
NSTableViewReverseSequentialColumnAutoresizingStyle=3
Plugin Version: 9.6. Function: One of the constants to specify the autoresizing style.
Notes:
Autoresize each table column sequentially, from the first auto-resizable column to the last auto-resizable
column; proceed to the next column when the current column has reached its minimum or maximum size.
Available in Mac OS X v10.4 and later.
6.36.156
NSTableViewRowSizeStyleCustom = 0
Plugin Version: 13.4. Function: One of the row size style constants.
Notes:
The table will use the rowHeight or invoke the delegate method tableView:heightOfRow:, if implemented.
The cell layout is not changed.
Available in OS X v10.7 and later.
The row size style constants define the size of the rows in the table view. They are used by the effectiveRowSizeStyle and rowSizeStyle methods. You can also query the row size in the NSTableCellView class’ property
rowSizeStyle.
6.36.157
NSTableViewRowSizeStyleDefault = -1
Plugin Version: 13.4. Function: One of the row size style constants.
Notes:
The table will use the system default layout size: small, medium or large.
528
CHAPTER 6. COCOA CONTROLS
Available in OS X v10.7 and later.
The row size style constants define the size of the rows in the table view. They are used by the effectiveRowSizeStyle and rowSizeStyle methods. You can also query the row size in the NSTableCellView class’ property
rowSizeStyle.
6.36.158
NSTableViewRowSizeStyleLarge = 3
Plugin Version: 13.4. Function: One of the row size style constants.
Notes:
The table will use a row height specified for a small table. It is required that the size be fully tested and
supported if NSTableViewRowSizeStyleCustom is not used.
Available in OS X v10.7 and later.
The row size style constants define the size of the rows in the table view. They are used by the effectiveRowSizeStyle and rowSizeStyle methods. You can also query the row size in the NSTableCellView class’ property
rowSizeStyle.
6.36.159
NSTableViewRowSizeStyleMedium = 2
Plugin Version: 13.4. Function: One of the row size style constants.
Notes:
The table will use a row height specified for a medium table. It is required that the size be fully tested and
supported if NSTableViewRowSizeStyleCustom is not used.
Available in OS X v10.7 and later.
The row size style constants define the size of the rows in the table view. They are used by the effectiveRowSizeStyle and rowSizeStyle methods. You can also query the row size in the NSTableCellView class’ property
rowSizeStyle.
6.36.160
NSTableViewRowSizeStyleSmall = 1
Plugin Version: 13.4. Function: One of the row size style constants.
Notes:
The table will use a row height specified for a small table. It is required that the size be fully tested and
supported if NSTableViewRowSizeStyleCustom is not used.
Available in OS X v10.7 and later.
The row size style constants define the size of the rows in the table view. They are used by the effectiveRowSizeStyle and rowSizeStyle methods. You can also query the row size in the NSTableCellView class’ property
rowSizeStyle.
6.36. CLASS NSTABLEVIEWMBS
6.36.161
529
NSTableViewSelectionHighlightStyleNone=-1
Plugin Version: 9.6. Function: One of the constants to specify the selection highlight styles.
Notes:
Displays no highlight style at all.
Available in Mac OS X v10.6 and later.
6.36.162
NSTableViewSelectionHighlightStyleRegular=0
Plugin Version: 9.6. Function: One of the constants for the selectionHighlightStyle property.
Notes:
The regular highlight style of NSTableView. On Mac OS X v10.5 a light blue (returned by sending NSColor
a alternateSelectedControlColor message) or light gray color (returned by sending NSColor a secondarySelectedControlColor message).
Available in Mac OS X v10.5 and later.
6.36.163
NSTableViewSelectionHighlightStyleSourceList=1
Plugin Version: 9.6. Function: One of the constants for the selectionHighlightStyle property.
Notes:
The source list style of NSTableView. On 10.5, a light blue gradient is used to highlight selected rows.
Note: When using this style, cell subclasses that implement drawsBackground must set the value to false.
Otherwise, the cells will draw over the tableview’s highlighting.
6.36.164
NSTableViewSequentialColumnAutoresizingStyle=2
Plugin Version: 9.6. Function: One of the constants to specify the autoresizing style.
Notes:
Autoresize each table column sequentially, from the last auto-resizable column to the first auto-resizable
column; proceed to the next column when the current column has reached its minimum or maximum size.
Available in Mac OS X v10.4 and later.
530
6.36.165
CHAPTER 6. COCOA CONTROLS
NSTableViewSolidHorizontalGridLineMask=2
Plugin Version: 9.6. Function: One of the constants to specify grid styles.
Notes:
Specifies that horizontal grid lines should be displayed.
Available in Mac OS X v10.3 and later.
You can combine NSTableViewSolidVerticalGridLineMask and NSTableViewSolidHorizontalGridLineMask
with bitwiseor.
6.36.166
NSTableViewSolidVerticalGridLineMask=1
Plugin Version: 9.6. Function: One of the constants to specify grid styles.
Notes:
Specifies that vertical grid lines should be displayed.
Available in Mac OS X v10.3 and later.
You can combine NSTableViewSolidVerticalGridLineMask and NSTableViewSolidHorizontalGridLineMask
with bitwiseor.
6.36.167
NSTableViewUniformColumnAutoresizingStyle=1
Plugin Version: 9.6. Function: One of the constants to specify the autoresizing style.
Notes:
Autoresize all columns by distributing space equally, simultaneously.
Available in Mac OS X v10.4 and later.
6.37. CLASS NSTABLEVIEWROWACTIONMBS
6.37
class NSTableViewRowActionMBS
6.37.1
class NSTableViewRowActionMBS
531
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: An NSTableViewRowAction object defines a single action to present when the user swipes horizontally on a table row.
Notes:
In an editable table, performing a horizontal swipe on a row reveals a button to delete the row by default.
This class lets you define one or more custom actions to display for a given row in your table. Each instance
of this class represents a single action to perform and includes the text, formatting information, and behavior
for the corresponding button.
To add custom actions to your table views rows, implement the rowActionsForRow event in your table views
delegate object. In that method, create and return an array of actions for the specified row. The table
handles the remaining work of displaying the action buttons and executing the appropriate handler block
when the user clicks the button.
6.37.2
Methods
6.37.3
available as boolean
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Check whether this
class is available.
Notes: Returns true on macOS 10.11.
6.37.4
Constructor(Style as Integer, Title as String)
Plugin Version: 17.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates and returns
a new table view row action object.
Notes:
style: The style characteristics to apply to the button. Use this value to apply default appearance characteristics to the button. These characteristics visually communicate, such as by color, information about
what the button does. For example, specify a style of NSTableViewRowActionStyleDestructive to indicate
an action is destructive to the underlying data. For a list of possible style values, see NSTableViewRowActionStyle.
title: The string to display in the button. Specify a string localized for the users current language.
Returns a new table row action object that you can return from your table views event.
The style you specify cannot be changed later. You can change the title of the action button. You can also
532
CHAPTER 6. COCOA CONTROLS
configure other appearance-related properties of the button using the properties of this class.
You can assign the same row action object to multiple rows of your table.
6.37.5
Properties
6.37.6
BackgroundColor as NSColorMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The background
color of the action button.
Notes:
Use this property to specify the background color for your button. If you do not specify a value for this
property, AppKit assigns a default color based on the value in the style property. Generally, this color is red
for destructive actions and blue for nondestructive actions.
(Read and Write property)
6.37.7
Handle as Integer
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The internal object
reference.
Notes: (Read and Write property)
6.37.8
Image as NSImageMBS
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The image.
Notes:
Available in macOS 10.12 or later.
(Read and Write property)
6.37.9
Style as Integer
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The style applied to
the action button.
Notes:
The value of this property is set at creation time and cannot be changed later.
(Read only property)
6.37. CLASS NSTABLEVIEWROWACTIONMBS
6.37.10
533
Title as String
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The title of the
action button.
Notes: (Read and Write property)
6.37.11
Events
6.37.12
Action(row as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when action
is invoked.
Notes: The event to execute when the user clicks the button associated with this action. When the user
selects the action represented by this object, AppKit executes your event on the apps main thread.
6.37.13
Constants
6.37.14
NSTableViewRowActionStyleDestructive = 1
Plugin Version: 17.1. Function: Constants that help define the appearance and behavior of action buttons.
Notes: Apply a style that indicates that the action might change or delete data. This style changes the value
of the backgroundColor property to an appropriate value to reflect the destructive action. After creating the
action object, you can change the background color as needed. Destructive actions require a longer swipe to
activate, and trigger an animation when a table row is deleted.
6.37.15
NSTableViewRowActionStyleRegular = 0
Plugin Version: 17.1. Function: Constants that help define the appearance and behavior of action buttons.
Notes: Apply the default style to the button. This style does not apply any special coloring to the button.
534
CHAPTER 6. COCOA CONTROLS
6.38
control NSTokenFieldControlMBS
6.38.1
control NSTokenFieldControlMBS
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control to host
a NSTokenField.
6.38.2
Properties
6.38.3
View as NSTokenFieldMBS
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The view used for
the control.
Notes: (Read only property)
6.38.4
Events
6.38.5
BoundsChanged
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the bounds, but not the frame, changed.
6.38.6
completionsForSubstring(substring as string, tokenIndex as Integer, byref
selectedIndex as Integer) as Variant()
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to provide an array of appropriate completions for the contents of the receiver.
Notes:
substring: The partial string that is to be completed.
tokenIndex: The index of the token being edited.
selectedIndex: Optionally, you can return by-reference an index into the returned array that specifies which
of the completions should be initially selected. If none are to be selected, return by reference -1.
Returns an array of strings that are possible completions.
If the delegate does not implement this method, no completions are provided.
Available in OS X v10.4 and later.
6.38. CONTROL NSTOKENFIELDCONTROLMBS
6.38.7
535
displayStringForRepresentedObject(representedObject as Variant) as string
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to provide a string to be displayed as a proxy for the given represented object.
Notes:
representedObject: A represented object of the token field.
Returns the string to be used as a proxy for representedObject. If you return nil or do not implement this
method, then representedObject is displayed as the string.
6.38.8
editingStringForRepresentedObject(representedObject as Variant) as string
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to provide a string to be edited as a proxy for a represented object.
Notes:
representedObject: A represented object of the token field.
Returns a string that’s an editable proxy of the represented object, or nil if the token should not be editable.
6.38.9
EnableMenuItems
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: Yes, Linux: Yes. Function: The event where
you can enable menu items.
6.38.10
FrameChanged
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the frame changed.
6.38.11
GotFocus
Plugin Version: 16.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control itself
got focus.
Notes: This only fires if the control itself got focus and not a sub control.
536
6.38.12
CHAPTER 6. COCOA CONTROLS
hasMenuForRepresentedObject(representedObject as Variant) as boolean
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to specify whether the given represented object provides a menu.
Notes:
representedObject: A represented object of the token field.
Returns true if the represented object has a menu, false otherwise.
By default tokens in a token field have no menus.
6.38.13
LostFocus
Plugin Version: 16.5, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control lost
focus.
Notes: This only fires if the control itself lost focus and not a sub control.
6.38.14
MenuAction(HitItem as MenuItem) As Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when a
menuitem is choosen.
Notes: This allows the control to react on its relevant menu items. Please return true if you handled it or
false to give others a chance.
6.38.15
menuForRepresentedObject(representedObject as Variant) as NSMenuMBS
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to provide a menu for the specified represented object.
Notes:
representedObject: A represented object of the token field.
Returns the menu associated with the represented object.
By default tokens in a token field do not return menus.
6.38.16
MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The mouse button
was pressed inside the controls region at the location passed in to x, y.
6.38. CONTROL NSTOKENFIELDCONTROLMBS
537
Notes:
The coordinates x and y are local to the control, i.e. they represent the position of the mouse click relative
to the upper-left corner or the Control.
Return True if you are going to handle the MouseDown. In such a case:
• The Action event, if any, will not execute and the state of the object will not change.
• You will receive the MouseDrag and MouseUp events.
If you return False, the system handles the MouseDown so the above event handlers do not get called.
6.38.17
MouseDrag(x as Integer, y as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event fires
continuously after the mouse button was pressed inside the Control.
Notes:
Mouse location is local to the control passed in to x, y.
As this event is fired continuously (hundreds of time per second), it is your responsibility to determine if the
mouse has really moved.
6.38.18
MouseUp(x as Integer, y as Integer)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The mouse button
was released.
Notes: Use the x and y parameters to determine if the mouse button was released within the control’s
boundaries.
6.38.19
readFromPasteboard(pboard as NSPasteboardMBS) as Variant()
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to return an array of objects representing the data read from the specified pasteboard.
Notes:
pboard: The pasteboard from which to read the represented objects.
Returns an array of represented objects created from the pasteboard data.
538
6.38.20
CHAPTER 6. COCOA CONTROLS
representedObjectForEditingString(editingString as string) as Variant
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to provide a represented object for the given editing string.
Notes:
editingString: The edited string representation of a represented object.
Returns a represented object that is displayed rather than the editing string.
Note: In OS X v10.4, NSTokenField trims whitespace around tokens but it does not trim whitespace in
OS X versions 10.5.0 and 10.5.1. In OS X v10.5.2, you get whitespace-trimming behavior by either linking
against the v10.4 binary or linking against the v10.5 binary and not implementing the this method. If you
do not want the whitespace-trimming behavior, link against the v10.5 binary and implement this method,
returning the editing string if you have no represented object.
6.38.21
ScaleFactorChanged(NewFactor as Double)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The backing store
scale factor has changed.
Notes: Please invalidate any cached bitmaps or other relevant state.
6.38.22
shouldAddObjects(tokens() as Variant, index as Integer) as Variant()
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows to validate
the tokens to be added to the receiver at a particular location.
Notes:
tokens: An array of tokens to be inserted in the receiver at index.
index: The index of the receiver in which the array of tokens to be validated (tokens) will be inserted.
Returns an array of validated tokens.
The event can return the array unchanged or return a modified array of tokens. To reject the add completely,
return an empty array. Returning nil causes an error.
6.38.23
styleForRepresentedObject(representedObject as Variant) as Integer
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to return the token style for editing the specified represented object.
6.38. CONTROL NSTOKENFIELDCONTROLMBS
539
Notes:
representedObject: A represented object of the token field.
Returns the style that should be used to display the representedObject. Possible values are shown in NSTokenStyle Values.
If the event implements this method and returns an NSTokenStyle that differs from the style set by setTokenStyle:, the value the event returns is preferred.
If you don’t implement this method, the token field’s tokenStyle is used.
6.38.24
TextDidBeginEditing(fieldEditor as NSTextMBS, notification as NSNotificationMBS)
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent when a control
with editable text begins an editing session.
Notes:
Notification: The notification object. The name of the notification is always NSControlTextDidBeginEditingNotification.
This event is invoked when the user begins editing text in a control such as a text field or a form field. The
control posts a NSControlTextDidBeginEditingNotification notification, and if the control’s subclass implements this event, it is automatically registered to receive the notification. The field editor is also delivered
for inspection.
See TextDidEndEditing for an explanation of why you may not always get one invocation of TextDidBeginEditing for each invocation of TextDidEndEditing.
6.38.25
TextDidChange(fieldEditor as NSTextMBS, notification as NSNotificationMBS)
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent when the text
in the receiving control changes.
Notes:
Notification: The notification object. The name of the notification is always NSControlTextDidChangeNotification.
This event is invoked when text in a control such as a text field or form changes. The control posts a
540
CHAPTER 6. COCOA CONTROLS
NSControlTextDidChangeNotification notification, and if the control’s subclass implements this event, it is
automatically registered to receive the notification. The field editor is provided as parameter for inspection.
6.38.26
TextDidEndEditing(fieldEditor as NSTextMBS, notification as NSNotificationMBS)
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent when a control
with editable text ends an editing session.
Notes:
Notification: The notification object. The name of the notification is always NSControlTextDidEndEditingNotification.
This event is invoked when the user stops editing text in a control such as a text field or form. The control
posts a NSControlTextDidEndEditingNotification notification, and if the control’ subclass implements this
event, it is automatically registered to receive the notification. The field editor is also provided for inspection.
Warning: In some cases, such as when editing within an instance of NSOutlineView, this method may be
invoked without a previous invocation of TextDidBeginEditing. You will only get the TextDidBeginEditing:
notification if the user actually types something, but you can get the TextDidEndEditing notification if the
user just double-clicks the field and then clicks outside the field, without typing.
6.38.27
textShouldBeginEditing(fieldEditor as NSTextMBS) as boolean
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called to
decide whether text editing should be allowed.
Notes:
Return true to allow text editing or false to deny.
Be aware that an event in Xojo without return will cause false to be returned.
6.38.28
textShouldEndEditing(fieldEditor as NSTextMBS) as boolean
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called to
decide whether ending text editing should be allowed.
Notes:
Return true to allow end of text editing or false to deny.
Be aware that an event in Xojo without return will cause false to be returned.
6.38. CONTROL NSTOKENFIELDCONTROLMBS
6.38.29
541
tokenFieldAction
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control’s action
was triggered.
Notes: For a button if it was pressed.
6.38.30
tokenFieldTextShouldBeginEditing(fieldEditor as NSTextMBS) as boolean
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called to
decide whether text editing should be allowed.
Notes: Return true to allow text editing.
6.38.31
tokenFieldTextShouldEndEditing(fieldEditor as NSTextMBS) as boolean
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called to
decide whether ending text editing should be allowed.
Notes: Return true to allow text editing.
6.38.32
writeRepresentedObjects(objects() as Variant, pboard as NSPasteboardMBS)
as boolean
Plugin Version: 15.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Sent so the delegate
can write represented objects to the pasteboard corresponding to a given array of display strings.
Notes:
objects: An array of represented objects associated with the token field.
pboard: The pasteboard to which to write the represented objects.
Return true if you writes the represented objects to the pasteboard, false otherwise. If false, the token field
writes the display strings to the NSStringPboardType pasteboard.
542
CHAPTER 6. COCOA CONTROLS
6.39
control NSViewControlMBS
6.39.1
control NSViewControlMBS
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The control to host
a generic NSView.
6.39.2
Properties
6.39.3
View as NSViewMBS
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The view used in
the control.
Notes:
Use this object to set more options on the control.
(Read only property)
6.39.4
Events
6.39.5
acceptsFirstMouse(e as NSEventMBS) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Overridden by
subclasses to return true if the receiver should be sent a mouseDown event for an initial mouse-down event,
false if not.
Notes:
The receiver can either return a value unconditionally or use the location of event e to determine whether
or not it wants the event. The default implementation ignores the event and returns false.
Implement this event in a subclass to allow instances to respond to click-through. This allows the user to
click on a view in an inactive window, activating the view with one click, instead of clicking first to make the
window active and then clicking the view. Most view objects refuse a click-through attempt, so the event
simply activates the window. Many control objects, however, such as instances of NSButton and NSSlider, do
accept them, so the user can immediately manipulate the control without having to release the mouse button.
6.39.6
acceptsFirstResponder as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether to accept
first responder.
6.39. CONTROL NSVIEWCONTROLMBS
543
Notes: Return true if your control can have the focus and false if not.
6.39.7
becomeFirstResponder as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when the
object gets focus.
Notes: Return true to accept.
6.39.8
beginGestureWithEvent(e as NSEventMBS) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a touch gesture.
Notes:
e: An event object representing the gesture beginning.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.39.9
canBecomeKeyView as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the receiver can become key view.
Notes: Returns true if the receiver can become key view, false otherwise.
6.39.10
Close
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the custom view is destroyed.
6.39.11
concludeDragOperation(sender as NSDraggingInfoMBS)
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging operation is complete, signaling the receiver to perform any necessary clean-up.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
544
CHAPTER 6. COCOA CONTROLS
For this method to be invoked, the previous performDragOperation must have returned true.
The destination implements this method to perform any tidying up that it needs to do, such as updating its
visual representation now that it has incorporated the dragged data. This message is the last message sent
from sender to the destination during a dragging session.
If the sender object’s animatesToDestination property was set to true in prepareForDragOperation, then the
drag image is still visible. At this point you should draw the final visual representation in the view. When
this method returns, the drag image is removed form the screen. If your final visual representation matches
the visual representation in the drag, this is a seamless transition.
6.39.12
draggingEnded(sender as NSDraggingInfoMBS)
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Implement this
event to be notified when a drag operation ends in some other destination.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
This method might be used by a destination doing auto-expansion in order to collapse any auto-expands.
6.39.13
draggingEntered(sender as NSDraggingInfoMBS) as Integer
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragged image enters destination bounds or frame; delegate returns dragging operation to perform.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is
the value returned by the previous draggingEntered message.
Invoked when a dragged image enters the destination but only if the destination has registered for the pasteboard data type involved in the drag operation. Specifically, this method is invoked when the mouse pointer
enters the destination’s bounds rectangle (if it is a view object) or its frame rectangle (if it is a window object).
This method must return a value that indicates which dragging operation the destination will perform when
the image is released. In deciding which dragging operation to return, the method should evaluate the
overlap between both the dragging operations allowed by the source (obtained from sender with the draggingSourceOperationMask method) and the dragging operations and pasteboard data types the destination
6.39. CONTROL NSVIEWCONTROLMBS
545
itself supports.
If none of the operations is appropriate, this method should return NSDragOperationNone (this is the default
response if the method is not implemented by the destination). A destination will still receive draggingUpdated and draggingExited even if NSDragOperationNone is returned by this method.
6.39.14
draggingExited(sender as NSDraggingInfoMBS)
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragged image exits the destination’s bounds rectangle (in the case of a view object) or its frame rectangle
(in the case of a window object).
Notes: sender: The object sending the message; use it to get details about the dragging operation.
6.39.15
draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging session has completed.
Notes:
session: The dragging session.
screenPoint: The point where the drag ended, in screen coordinates.
operation: The drag operation. See constants for drag operation types.
Available in OS X v10.7 and later.
6.39.16
draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
drag moves on the screen.
Notes:
session: The dragging session.
screenPoint: The point where the drag moved to, in screen coordinates.
Available in OS X v10.7 and later.
546
6.39.17
CHAPTER 6. COCOA CONTROLS
draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Declares the types
of operations the source allows to be performed. (required)
Notes:
session: The dragging session.
context: The dragging context. See NSDraggingContext constants for the supported values.
Return the appropriate dragging operation as defined in constants.
In the future Apple may provide more specific ”within” values in the future. To account for this, for unrecognized localities, return the operation mask for the most specific context that you are concerned with.
6.39.18
draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS,
screenPoint as NSPointMBS)
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
drag will begin.
Notes:
session: The dragging session.
screenPoint: The point where the drag will begin, in screen coordinates.
Available in OS X v10.7 and later.
6.39.19
draggingSourceOperationMaskForLocal(flag as boolean) as Integer
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns an integer
bit mask indicating the types of dragging operations the source object will allow to be performed on the
dragged image’s data.
Notes:
(Deprecated in OS X v10.7. This method is informally deprecated. It is only called if the source does not
implement the NSDraggingSource protocol methods. This method will be formally deprecated in a future
OS release.)
isLocal: True indicates that the candidate destination object (the window or view over which the dragged
image is currently poised) is in the same application as the source, while a false value indicates that the
destination object is in a different application.
6.39. CONTROL NSVIEWCONTROLMBS
547
A mask, created by combining the dragging operations listed in the NSDragOperation section of NSDraggingInfo protocol reference using the C bitwise OR operator.If the source does not permit any dragging
operations, it should return NSDragOperationNone.
If not implemented, the default value is NSDragOperationCopy | NSDragOperationLink | NSDragOperationGeneric | NSDragOperationPrivate.
Available in OS X v10.0 and later. Deprecated in OS X v10.7.
6.39.20
draggingUpdated(sender as NSDraggingInfoMBS) as Integer
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked periodically
as the image is held within the destination area, allowing modification of the dragging operation or mousepointer position.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is
the value returned by the previous draggingEntered message.
For this to be invoked, the destination must have registered for the pasteboard data type involved in the
drag operation. The messages continue until the image is either released or dragged out of the window or view.
This method provides the destination with an opportunity to modify the dragging operation depending on
the position of the mouse pointer inside of the destination view or window object. For example, you may have
several graphics or areas of text contained within the same view and wish to tailor the dragging operation,
or to ignore the drag event completely, depending upon which object is underneath the mouse pointer at the
time when the user releases the dragged image and the performDragOperation method is invoked.
You typically examine the contents of the pasteboard in the draggingEntered method, where this examination is performed only once, rather than in the draggingUpdated method, which is invoked multiple times.
Only one destination at a time receives a sequence of draggingUpdated messages. If the mouse pointer is
within the bounds of two overlapping views that are both valid destinations, the uppermost view receives
these messages until the image is either released or dragged out.
548
6.39.21
CHAPTER 6. COCOA CONTROLS
drawFocusRingMask(g as NSGraphicsMBS) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Draw the focus ring
mask for the view.
Notes:
If false is returned, the default method from NSView class runs.
This method provides the shape of the focus ring mask by drawing the focus ring mask. An implementation
of this method should draw in the view’s interior (bounds) coordinate space, that the focus ring style has
been set (it will be set it to NSFocusRingOnly to capture the focus ring itself), and that the fill and stroke
colors have been set to an arbitrary fully opaque color.
Subclasses that find the default behavior insufficient should only draw the focus ring shape.
The NSView default implementation of this method simply fills self.bounds.
Available in Mac OS X v10.7 and later.
Please use NSGraphicsMBS class for drawing.
6.39.22
DrawRect(g as NSGraphicsMBS, left as Double, top as Double, width
as Double, height as Double)
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The paint event
with the rectangle which needs to be redrawn.
6.39.23
EnableMenuItems
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: Yes, Linux: Yes. Function: The event where
you can enable menu items.
6.39.24
endGestureWithEvent(e as NSEventMBS) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has ended a touch gesture.
Notes:
e: An event object representing the gesture end.
Available in Mac OS X v10.6 and later.
6.39. CONTROL NSVIEWCONTROLMBS
549
Return true if you handled this event.
6.39.25
focusRingMaskBounds as NSRectMBS
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns the focus
ring mask bounds.
Notes:
Return nil to run default NSView method.
Return a rectangle containing the mask in the view’s interior (bounds) coordinate space.
The mask bounds allows the focus ring’s overall size and position to be determined before it is drawn.
Subclasses must override this method if they require the display of a focus ring.
The NSView default implementation of this method simply returns NSRectMBS.Zero.
Note: The information provided by focusRingMaskBounds will enable Accessibility to identify selected
subelements for zoom tracking, so it is important that this method provide a reasonably tight bounding box
and that noteFocusRingMaskChanged is invoked as described.
6.39.26
ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the modifier keys will be ignored for this dragging session.
Notes:
session: The dragging session.
Return true if the modifier keys will be ignored, false otherwise.
Available in OS X v10.7 and later.
6.39.27
isOpaque as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Whether this view
is opaque.
550
6.39.28
CHAPTER 6. COCOA CONTROLS
keyDown(e as NSEventMBS) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the key
events.
Notes:
Return true if you handled this event.
Please return true in becomeFirstResponder and acceptsFirstResponder, so your nsview can become first
responder and receive key events.
6.39.29
keyUp(e as NSEventMBS) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the key
events.
Notes:
Return true if you handled this event.
Please return true in becomeFirstResponder and acceptsFirstResponder, so your nsview can become first
responder and receive key events.
6.39.30
magnifyWithEvent(e as NSEventMBS) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a pinch gesture.
Notes:
e: An event object representing the magnify gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.39.31
MenuAction(HitItem as MenuItem) As Boolean
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Called when a
menuitem is choosen.
Notes: This allows the control to react on its relevant menu items. Please return true if you handled it or
false to give others a chance.
6.39. CONTROL NSVIEWCONTROLMBS
6.39.32
551
menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as
NSMenuMBS
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Overridden by
subclasses to return a context-sensitive pop-up menu for a given mouse-down event.
Notes:
theEvent: An object representing a mouse-down event.
defaultMenu: The menu as constructed by super class.
The receiver can use information in the mouse event, such as its location over a particular element of the
receiver, to determine what kind of menu to return. For example, a text object might display a text-editing
menu when the cursor lies over text and a menu for changing graphics attributes when the cursor lies over
an embedded image.
The default implementation returns the default menu.
6.39.33
mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.39.34
mouseDownCanMoveWindow as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: This event is called
so you can decide what happens with mouse down.
Notes:
Return true if you do not need to handle a mouse down and it can pass through to superviews; False if you
need to handle the mouse down.
This allows iApp-type applications to determine the region by which a window can be moved. By default,
this method returns false if the view is opaque; otherwise, it returns true. Subclasses can override this
method to return a different value.
6.39.35
mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
552
CHAPTER 6. COCOA CONTROLS
Notes: Return true if you handled this event.
6.39.36
mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.39.37
mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.39.38
mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.39.39
mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.39.40
Open
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The event called
when the custom NSView is created.
6.39.41
otherMouseDown(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
6.39. CONTROL NSVIEWCONTROLMBS
553
Notes:
Return true if you handled this event.
Third mouse button.
6.39.42
otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.39.43
otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes:
Return true if you handled this event.
Third mouse button.
6.39.44
performDragOperation(sender as NSDraggingInfoMBS) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked after the
released image has been removed from the screen, signaling the receiver to import the pasteboard data.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Return if the destination accepts the data, it returns true; otherwise it returns false. The default is to return
false.
For this method to be invoked, the previous prepareForDragOperation message must have returned true.
The destination should implement this method to do the real work of importing the pasteboard data represented by the image.
If the sender object’s animatesToDestination was set to true in prepareForDragOperation, then setup any
animation to arrange space for the drag items to animate to. Also at this time, enumerate through the
554
CHAPTER 6. COCOA CONTROLS
dragging items to set their destination frames and destination images.
6.39.45
prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
image is released, allowing the receiver to agree to or refuse drag operation.
Notes:
sender: The object sending the message; use it to get details about the dragging operation.
Returns true if the receiver agrees to perform the drag operation and false if not.
This method is invoked only if the most recent draggingEntered or draggingUpdated message returned an
acceptable drag-operation value.
If you want the drag items to animate from their current location on screen to their final location in your
view, set the sender object’s animatesToDestination property to true in your implementation of this method.
6.39.46
pressureChange(e as NSEventMBS) as boolean
Plugin Version: 15.1, Console & Web: No, Mac: Yes, Win: Yes, Linux: Yes. Function: Informs the current
object that a pressure change occurred on a system that supports pressure sensitivity.
Notes:
This method is invoked automatically in response to user actions. event is the event that initiated the change
in pressure.
Available in OS X v10.10.3 and later.
6.39.47
resignFirstResponder as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Focus is going away.
Notes: Return true to accept.
6.39.48
rightMouseDown(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.39. CONTROL NSVIEWCONTROLMBS
6.39.49
555
rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as
boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.39.50
rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: One of the mouse
events.
Notes: Return true if you handled this event.
6.39.51
rotateWithEvent(e as NSEventMBS) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a rotation gesture.
Notes:
e: An event object representing the rotate gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.39.52
ScaleFactorChanged(NewFactor as Double)
Plugin Version: 17.1, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The backing store
scale factor has changed.
Notes: Please invalidate any cached bitmaps or other relevant state.
6.39.53
scrollWheel(e as NSEventMBS) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the subclass
that the mouse’s scroll wheel has moved.
Notes:
e: An object encapsulating information about the wheel-scrolling event.
The default implementation simply passes this message to the next responder.
Return true to not pass the event.
556
6.39.54
CHAPTER 6. COCOA CONTROLS
swipeWithEvent(e as NSEventMBS) as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that the user has begun a swipe gesture.
Notes:
e: An event object representing the swipe gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
6.39.55
updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
dragging images should be changed.
Notes:
sender: The object sending the message; use this object to get details about the dragging operation.
While a destination may change the dragging images at any time, it is recommended to wait until this
method is called before updating the dragging images.
This allows the system to delay changing the dragging images until it is likely that the user will drop on
this destination. Otherwise, the dragging images will change too often during the drag which would be
distracting to the user.
6.39.56
viewDidMoveToWindow
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Informs the receiver
that it has been added to a new view hierarchy.
Notes:
The default implementation does nothing; subclasses can implement this event to perform whatever actions
are necessary.
window may return nil when this method is invoked, indicating that the receiver does not currently reside in
any window. This occurs when the receiver has just been removed from its superview or when the receiver
has just been added to a superview that does not itself have a window. Overrides of this method may choose
to ignore such cases if they are not of interest.
6.39. CONTROL NSVIEWCONTROLMBS
6.39.57
557
wantsPeriodicDraggingUpdates as boolean
Plugin Version: 15.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Asks the destination
object whether it wants to receive periodic draggingUpdated messages.
Notes:
Return true if the destination wants to receive periodic draggingUpdated messages, false otherwise.
If the destination returns false, these messages are sent only when the mouse moves or a modifier flag changes.
Otherwise the destination gets the default behavior, where it receives periodic dragging-updated messages
even if nothing changes.
558
CHAPTER 6. COCOA CONTROLS
6.40
class ProgressBar
6.40.1
class ProgressBar
Plugin Version: 9.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The built in progressbar class in REALbasic.
6.40.2
Methods
6.40.3
NSProgressIndicatorMBS as NSProgressIndicatorMBS
Plugin Version: 9.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Creates a NSProgressIndicatorMBS object for the given control.
Example:
MsgBox ProgressBar1.NSProgressIndicatorMBS.className
Notes: This way you can manipulate Cocoa controls directly.
6.41. CLASS PROGRESSWHEEL
6.41
class ProgressWheel
6.41.1
class ProgressWheel
559
Plugin Version: 10.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The built in ProgressWheel class in REALbasic.
6.41.2
Methods
6.41.3
NSProgressIndicatorMBS as NSProgressIndicatorMBS
Plugin Version: 10.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Creates a NSProgressIndicatorMBS object for the given control.
Notes: This way you can manipulate Cocoa controls directly.
560
CHAPTER 6. COCOA CONTROLS
6.42
class PushButton
6.42.1
class PushButton
Plugin Version: 9.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The built in pushbutton class in REALbasic.
6.42.2
Methods
6.42.3
NSButtonMBS as NSButtonMBS
Plugin Version: 9.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Creates a NSButtonMBS object for the given control.
Example:
MsgBox PushButton1.NSButtonMBS.className
Notes: This way you can manipulate Cocoa controls directly.
6.43. CLASS SCROLLBAR
6.43
class ScrollBar
6.43.1
class ScrollBar
561
Plugin Version: 9.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The built in Scrollbar
class in REALbasic.
6.43.2
Methods
6.43.3
NSScrollerMBS as NSScrollerMBS
Plugin Version: 9.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Creates a NSScrollerMBS object for the given control.
Example:
MsgBox ScrollBar1.NSScrollerMBS.className
Notes: This way you can manipulate Cocoa controls directly.
562
CHAPTER 6. COCOA CONTROLS
6.44
class Separator
6.44.1
class Separator
Plugin Version: 10.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The built in Separator class in REALbasic.
6.44.2
Methods
6.44.3
NSBoxMBS as NSBoxMBS
Plugin Version: 10.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Creates a NSBoxMBS object for the given control.
Notes: This way you can manipulate Cocoa controls directly.
6.45. CLASS SLIDER
6.45
class Slider
6.45.1
class Slider
563
Plugin Version: 9.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The built in slider
class in REALbasic.
6.45.2
Methods
6.45.3
NSSliderMBS as NSSliderMBS
Plugin Version: 9.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Creates a NSSliderMBS object for the given control.
Example:
MsgBox Slider1.NSSliderMBS.className
Notes: This way you can manipulate Cocoa controls directly.
564
CHAPTER 6. COCOA CONTROLS
6.46
class TextArea
6.46.1
class TextArea
Plugin Version: 9.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The built in textarea
class in REALbasic.
Example:
// make a PDF from a textarea in Cocoa REALbasic target:
// find view
dim n as NSViewMBS = TextArea1.NSViewMBS
if n = nil then
MsgBox ”Only in Cocoa!”
Return
end if
// make pdf data
dim s as string = n.dataWithPDFInsideRect(0,0,n.frame.Width, n.frame.Height)
// save
dim f as FolderItem = GetSaveFolderItem(””, ”test.pdf”)
if f<>Nil then
dim b as BinaryStream = BinaryStream.Create(f, true)
b.Write s
end if
Notes: Requires RB 2009r4 or newer.
6.46.2
Methods
6.46.3
NSScrollViewMBS as NSScrollViewMBS
Plugin Version: 9.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Creates a NSScrollViewMBS object for the given control.
Example:
MsgBox TextArea1.NSScrollViewMBS.className
6.46. CLASS TEXTAREA
Notes: This way you can manipulate Cocoa controls directly.
565
566
CHAPTER 6. COCOA CONTROLS
6.47
class UpDownArrows
6.47.1
class UpDownArrows
Plugin Version: 10.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The build in control
class in REALbasic.
6.47.2
Methods
6.47.3
NSStepperMBS as NSStepperMBS
Plugin Version: 10.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Creates a NSStepperMBS object for the given control.
Notes: This way you can manipulate Cocoa controls directly.
Chapter 7
Cocoa Networking
7.1
7.1.1
class NSHTTPCookieMBS
class NSHTTPCookieMBS
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: An NSHTTPCookie
object represents an HTTP cookie.
Example:
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// we collect domain names
dim domains(-1) as string
for each cookie as NSHTTPCookieMBS in cookies
if domains.IndexOf(cookie.domain) <0 then
domains.Append cookie.domain
end if
next
// and display them
MsgBox ”You have cookies from this domains: ”+Join(domains, ”, ”)
Notes:
It’s an immutable object initialized from a dictionary containing the cookie attributes.
Two versions of cookies are supported:
567
568
CHAPTER 7. COCOA NETWORKING
Version 0: This version refers to ”traditional” or ”old-style” cookies, the original cookie format defined by
Netscape. The majority of cookies encountered are in this format.
Version 1: This version refers to cookies as defined in RFC 2965, HTTP State Management Mechanism.
7.1.2
Methods
7.1.3
comment as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
receiver’s comment string.
Example:
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// pick first one
dim cookie as NSHTTPCookieMBS = cookies(0)
// display comment
MsgBox ”Comment: ”+Cookie.comment
Notes: The receiver’s comment string or ”” if the cookie has no comment. This string is suitable for presentation to the user, explaining the contents and purpose of this cookie.
7.1.4
commentURL as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
receiver’s comment URL.
Example:
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// pick first one
dim cookie as NSHTTPCookieMBS = cookies(0)
// display comment URL
MsgBox ”commentURL: ”+Cookie.commentURL
Notes: The receiver’s comment URL or ”” if the cookie has none. This value specifies a URL which is
suitable for presentation to the user as a link for further information about this cookie.
7.1. CLASS NSHTTPCOOKIEMBS
7.1.5
569
Constructor(properties as dictionary)
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an initialized
NSHTTPCookie object using the provided properties.
Example:
// create dictionary with properties:
dim prop as new Dictionary
dim d as new date
d.Year = d.Year + 1
prop.Value(NSHTTPCookieMBS.NSHTTPCookieVersion)=”0”
prop.Value(NSHTTPCookieMBS.NSHTTPCookieName)=”test”
prop.Value(NSHTTPCookieMBS.NSHTTPCookieValue)=”some value”
prop.Value(NSHTTPCookieMBS.NSHTTPCookieOriginURL)=”http://www.mbsplugins.de/”
prop.Value(NSHTTPCookieMBS.NSHTTPCookieDomain)=”www.mbsplugins.de”
prop.Value(NSHTTPCookieMBS.NSHTTPCookiePath)=”/”
prop.Value(NSHTTPCookieMBS.NSHTTPCookieExpires)=d
// create cookie from properties
dim cookie as new NSHTTPCookieMBS(prop)
// and display properties
dim dic as Dictionary = cookie.properties
dim list(-1) as string
for each key as Variant in dic.keys
List.Append key.StringValue+”: ”+dic.Value(key).StringValue
next
MsgBox Join(list,EndOfLine)
Notes:
properties: The properties for the new cookie object, expressed as key value pairs.
Handle is non zero on success.
570
7.1.6
CHAPTER 7. COCOA NETWORKING
cookiesWithResponseHeaderFields(headerFields as dictionary, URL as
string) as NSHTTPCookieMBS()
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns an array of
NSHTTPCookie objects corresponding to the provided response header fields for the provided URL.
Notes:
headerFields: The header fields used to create the NSHTTPCookie objects.
URL: The URL associated with the created cookies.
Returns the array of created cookies.
This method ignores irrelevant header fields in headerFields, allowing dictionaries to contain additional data.
If headerFields does not specify a domain for a given cookie, the cookie is created with a default domain
value of theURL.
If headerFields does not specify a path for a given cookie, the cookie is created with a default path value of
”/”.
7.1.7
cookieWithProperties(dic as dictionary) as NSHTTPCookieMBS
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates and
initializes an NSHTTPCookie object using the provided properties.
Example:
// create dictionary with properties:
dim prop as new Dictionary
dim d as new date
d.Year = d.Year + 1
prop.Value(NSHTTPCookieMBS.NSHTTPCookieVersion)=”0”
prop.Value(NSHTTPCookieMBS.NSHTTPCookieName)=”test”
prop.Value(NSHTTPCookieMBS.NSHTTPCookieValue)=”some value”
prop.Value(NSHTTPCookieMBS.NSHTTPCookieOriginURL)=”http://www.mbsplugins.de/”
prop.Value(NSHTTPCookieMBS.NSHTTPCookieDomain)=”www.mbsplugins.de”
prop.Value(NSHTTPCookieMBS.NSHTTPCookiePath)=”/”
prop.Value(NSHTTPCookieMBS.NSHTTPCookieExpires)=d
// create cookie from properties
dim cookie as NSHTTPCookieMBS = NSHTTPCookieMBS.cookieWithProperties(prop)
// and display properties
dim dic as Dictionary = cookie.properties
7.1. CLASS NSHTTPCOOKIEMBS
571
dim list(-1) as string
for each key as Variant in dic.keys
List.Append key.StringValue+”: ”+dic.Value(key).StringValue
next
MsgBox Join(list,EndOfLine)
Notes:
dic: The properties for the new cookie object, expressed as key value pairs.
Returns the newly created cookie object. Returns nil if the provided properties are invalid.
See NSHTTPCookie* shared method for more information on the available header field constants and the
constraints imposed on the values in the dictionary.
7.1.8
domain as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the domain
of the receiver’s cookie.
Example:
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// pick first one
dim cookie as NSHTTPCookieMBS = cookies(0)
// display domain:
MsgBox ”Domain: ”+Cookie.Domain
Notes: If the domain does not start with a dot, then the cookie is only sent to the exact host specified by
the domain. If the domain does start with a dot, then the cookie is sent to other hosts in that domain as
well, subject to certain restrictions. See RFC 2965 for more detail.
7.1.9
expiresDate as date
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
receiver’s expiration date.
572
CHAPTER 7. COCOA NETWORKING
Example:
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// pick first one
dim cookie as NSHTTPCookieMBS = cookies(0)
// display date:
MsgBox ”Domain: ”+Cookie.expiresDate.ShortTime+” ”+Cookie.expiresDate.LongTime
Notes: The receiver’s expiration date, or nil if there is no specific expiration date such as in the case of
”session-only” cookies. The expiration date is the date when the cookie should be deleted.
7.1.10
isHTTPOnly as boolean
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the receiver should only be sent to HTTP servers per RFC 2965.
Example:
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// pick first one
dim cookie as NSHTTPCookieMBS = cookies(0)
// display isHTTPOnly value:
MsgBox ”isHTTPOnly: ”+str(Cookie.isHTTPOnly)
Notes:
Returns true if this cookie should only be sent via HTTP headers, false otherwise.
Cookies may be marked as HTTP only by a server (or by a javascript). Cookies marked as such must only be
sent via HTTP Headers in HTTP requests for URL’s that match both the path and domain of the respective
cookies.
Important: Cookies specified as HTTP only should not be delivered to any javascript applications to prevent
cross-site scripting vulnerabilities.
7.1. CLASS NSHTTPCOOKIEMBS
7.1.11
573
isSecure as boolean
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns whether
his cookie should only be sent over secure channels.
Example:
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// pick first one
dim cookie as NSHTTPCookieMBS = cookies(0)
// display isSecure value:
MsgBox ”isSecure: ”+str(Cookie.isSecure)
Notes: True if this cookie should only be sent over secure channels, otherwise false.
7.1.12
isSessionOnly as boolean
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns whether
the receiver should be discarded at the end of the session (regardless of expiration date).
Example:
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// pick first one
dim cookie as NSHTTPCookieMBS = cookies(0)
// display isSessionOnly value:
MsgBox ”isSessionOnly: ”+str(Cookie.isSessionOnly)
Notes: True if the receiver should be discarded at the end of the session (regardless of expiration date),
otherwise false.
7.1.13
name as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
receiver’s name.
Example:
574
CHAPTER 7. COCOA NETWORKING
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// pick first one
dim cookie as NSHTTPCookieMBS = cookies(0)
// display name:
MsgBox ”name: ”+Cookie.name
7.1.14
NSHTTPCookieComment as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary
constants for cookies.
Notes:
An String containing the comment for the cookie.
Only valid for Version 1 cookies and later. This header field is optional.
7.1.15
NSHTTPCookieCommentURL as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary
constants for cookies.
Notes:
An String containing the comment URL for the cookie.
Only valid for Version 1 cookies or later. This header field is optional.
7.1.16
NSHTTPCookieDiscard as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary
constants for cookies.
Notes:
An String stating whether the cookie should be discarded at the end of the session.
String value must be either ”TRUE” or ”FALSE”. This header field is optional. Default is ”FALSE”, unless
this is cookie is version 1 or greater and a value for NSHTTPCookieMaximumAge is not specified, in which
case it is assumed ”TRUE”.
7.1. CLASS NSHTTPCOOKIEMBS
7.1.17
575
NSHTTPCookieDomain as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary
constants for cookies.
Notes:
An String containing the domain for the cookie.
A value must be specified for either NSHTTPCookieDomain or NSHTTPCookieOriginURL. If this header
field is missing the domain is inferred from the value for NSHTTPCookieOriginURL.
7.1.18
NSHTTPCookieExpires as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary
constants for cookies.
Notes:
An Date object or String specifying the expiration date for the cookie.
This header field is only used for Version 0 cookies. This header field is optional.
7.1.19
NSHTTPCookieMaximumAge as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary
constants for cookies.
Notes:
An String containing an integer value stating how long in seconds the cookie should be kept, at most.
Only valid for Version 1 cookies and later. Default is ”0”. This field is optional.
7.1.20
NSHTTPCookieName as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary constants for cookies.
Notes: An String object containing the name of the cookie. This field is required.
7.1.21
NSHTTPCookieOriginURL as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary
constants for cookies.
Notes:
An String containing the URL that set this cookie.
576
CHAPTER 7. COCOA NETWORKING
A value must be specified for either NSHTTPCookieDomain or NSHTTPCookieOriginURL.
7.1.22
NSHTTPCookiePath as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary
constants for cookies.
Notes:
An String containing the path for the cookie. This field is required if you are using the NSHTTPCookieDomain key instead of the NSHTTPCookieOriginURL key.
If you are using the NSHTTPCookieOriginURL key, the path is inferred if it is not provided. The default
value is ”/”.
7.1.23
NSHTTPCookiePort as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary
constants for cookies.
Notes:
An String containing comma-separated integer values specifying the ports for the cookie.
Only valid for Version 1 cookies or later. The default value is an empty string (””). This header field is
optional.
7.1.24
NSHTTPCookieSecure as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary
constants for cookies.
Notes:
An String indicating that the cookie should be transmitted only over secure channels.
Providing any value for this key indicates that the cookie should remain secure.
7.1.25
NSHTTPCookieValue as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary
constants for cookies.
Notes:
An String containing the value of the cookie.
This header field is required.
7.1. CLASS NSHTTPCOOKIEMBS
7.1.26
577
NSHTTPCookieVersion as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary
constants for cookies.
Notes:
An String that specifies the version of the cookie.
Must be either ”0” or ”1”. The default is ”0”. This header field is optional.
7.1.27
path as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
receiver’s path.
Example:
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// pick first one
dim cookie as NSHTTPCookieMBS = cookies(0)
// display path:
MsgBox ”path: ”+Cookie.path
Notes: The cookie will be sent with requests for this path in the cookie’s domain, and all paths that have
this prefix. A path of ”/” means the cookie will be sent for all URLs in the domain.
7.1.28
portList as Integer()
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
receiver’s port list.
Example:
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// pick first one
dim cookie as NSHTTPCookieMBS = cookies(0)
// display port list
dim PortList(-1) as Integer = cookie.portList
if UBound(PortList)=-1 then
578
CHAPTER 7. COCOA NETWORKING
MsgBox ”Port List: all ports.”
else
dim list(-1) as string
for each port as Integer in portList
List.Append str(port)
next
MsgBox ”Port List: ”+Join(list, ”, ”)
end if
Notes: The list of ports for the cookie, returned as an array of integers. If the cookie has no port list
this method returns nil and the cookie will be sent to any port. Otherwise, the cookie is only sent to ports
specified in the port list.
7.1.29
properties as dictionary
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
receiver’s cookie properties.
Example:
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// pick first one
dim cookie as NSHTTPCookieMBS = cookies(0)
// display properties
dim dic as Dictionary = cookie.properties
dim list(-1) as string
for each key as Variant in dic.keys
List.Append key.StringValue+”: ”+dic.Value(key).StringValue
next
MsgBox Join(list,EndOfLine)
Notes:
Returns dictionary representation of the receiver’s cookie properties.
This dictionary can be used with Constructor or cookieWithProperties to create an equivalent NSHTTPCookie object.
7.1. CLASS NSHTTPCOOKIEMBS
7.1.30
579
requestHeaderFieldsWithCookies(cookies() as NSHTTPCookieMBS) as
dictionary
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a dictionary
of header fields corresponding to a provided array of cookies.
Example:
// create dictionary with properties:
dim prop as new Dictionary
dim d as new date
d.Year = d.Year + 1
prop.Value(NSHTTPCookieMBS.NSHTTPCookieVersion)=”0”
prop.Value(NSHTTPCookieMBS.NSHTTPCookieName)=”test”
prop.Value(NSHTTPCookieMBS.NSHTTPCookieValue)=”some value”
prop.Value(NSHTTPCookieMBS.NSHTTPCookieOriginURL)=”http://www.mbsplugins.de/”
prop.Value(NSHTTPCookieMBS.NSHTTPCookieDomain)=”www.mbsplugins.de”
prop.Value(NSHTTPCookieMBS.NSHTTPCookiePath)=”/”
prop.Value(NSHTTPCookieMBS.NSHTTPCookieExpires)=d
// create cookie from properties
dim cookie as new NSHTTPCookieMBS(prop)
dim cookies(-1) as NSHTTPCookieMBS
cookies.Append cookie
// get request headers
dim dic as Dictionary = NSHTTPCookieMBS.requestHeaderFieldsWithCookies(cookies)
// and show them:
dim list(-1) as string
for each key as Variant in dic.keys
List.Append key.StringValue+”: ”+dic.Value(key).StringValue
next
MsgBox Join(list,EndOfLine)
Notes:
cookies: The cookies from which the header fields are created.
Returns the dictionary of header fields created from the provided cookies. This dictionary can be used to
add cookies to a request.
580
7.1.31
CHAPTER 7. COCOA NETWORKING
value as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
receiver’s value.
Example:
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// pick first one
dim cookie as NSHTTPCookieMBS = cookies(0)
// display value
MsgBox ”Value: ”+Cookie.value
7.1.32
version as Integer
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the
receiver’s version.
Example:
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// pick first one
dim cookie as NSHTTPCookieMBS = cookies(0)
// display version value:
MsgBox ”Version: ”+str(Cookie.Version)
Notes: Returns the receiver’s version. Version 0 maps to ”old-style” Netscape cookies. Version 1 maps to
RFC 2965 cookies.
7.1.33
Properties
7.1.34
Handle as Integer
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The internal object
reference.
Notes: (Read and Write property)
7.2. CLASS NSHTTPCOOKIESTORAGEMBS
7.2
7.2.1
581
class NSHTTPCookieStorageMBS
class NSHTTPCookieStorageMBS
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: NSHTTPCookieStorage implements a singleton object (shared instance) that manages the shared cookie storage.
Example:
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// we collect values
dim list(-1) as string
for each cookie as NSHTTPCookieMBS in cookies
List.Append cookie.name+”: ”+cookie.value
next
// and display them
MsgBox join(list, EndOfLine)
Notes:
These cookies are shared among all applications and are kept in sync cross-process.
Note: Changes made to the cookie accept policy affect all currently running applications using the cookie
storage.
This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.
7.2.2
Methods
7.2.3
Constructor
Plugin Version: 12.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The private constructor.
7.2.4
cookies as NSHTTPCookieMBS()
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the cookie
storage’s cookies.
Example:
582
CHAPTER 7. COCOA NETWORKING
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookies
// we collect values
dim list(-1) as string
for each cookie as NSHTTPCookieMBS in cookies
List.Append cookie.name+”: ”+cookie.value
next
// and display them
MsgBox join(list, EndOfLine)
Notes: Returns an array containing all of the cookie storage’s cookies.
7.2.5
cookiesForURL(URL as string) as NSHTTPCookieMBS()
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns all the
cookie storage’s cookies that are sent to a specified URL.
Example:
// query list of all cookies in shared storage
dim cookies(-1) as NSHTTPCookieMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookiesForURL(”http://www.apple.com/”)
// we collect values for apple.com:
dim list(-1) as string
for each cookie as NSHTTPCookieMBS in cookies
List.Append cookie.name+”: ”+cookie.value
next
// and display them
MsgBox join(list, EndOfLine)
Notes: An application can use NSHTTPCookie method requestHeaderFieldsWithCookies to turn this array
into a set of header fields to add to an NSMutableURLRequest object.
7.2.6
cookiesToArray(cookies() as NSHTTPCookieMBS) as Integer
Plugin Version: 16.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Puts the cookie
storage’s cookies in the given array.
Example:
7.2. CLASS NSHTTPCOOKIESTORAGEMBS
583
// get storage
dim s as NSHTTPCookieStorageMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage
// predim an array with a lot of space
dim cookies(5000) as NSHTTPCookieMBS
// now ask plugin to put cookies inside
dim c as Integer = s.cookiesToArray(cookies)
// show count
MsgBox str(c)+” cookies”
// pick first and show name
dim cookie as NSHTTPCookieMBS = cookies(0)
MsgBox cookie.name
Notes:
Returns total number of cookies.
This is for REALbasic 2007 where the cookies function doesn’t work.
For Real Studio and Xojo you can use cookies function.
7.2.7
deleteCookie(cookie as NSHTTPCookieMBS)
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Deletes the specified
cookie from the cookie storage.
7.2.8
NSHTTPCookieManagerAcceptPolicyChangedNotification as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the
notification names you can register with the NSNotificationObserverMBS class.
Notes:
This notification is posted when the acceptance policy of the NSHTTPCookieStorage instance has changed.
In Mac OS X, cookies are shared among applications, meaning this notification can be sent in response to
another application’s actions. Cookies are not shared among applications in iOS.
The notification object is the NSHTTPCookieStorage instance. This notification does not contain a userInfo
dictionary.
584
7.2.9
CHAPTER 7. COCOA NETWORKING
NSHTTPCookieManagerCookiesChangedNotification as string
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the
notification names you can register with the NSNotificationObserverMBS class.
Notes:
This notification is posted when the cookies stored in the NSHTTPCookieStorage instance have changed.
In Mac OS X, cookies are shared among applications, meaning this notification can be sent in response to
another application’s actions. Cookies are not shared among applications in iOS.
The notification object is the NSHTTPCookieStorage instance. This notification does not contain a userInfo
dictionary.
7.2.10
setCookie(cookie as NSHTTPCookieMBS)
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Stores a specified
cookie in the cookie storage if the cookie accept policy permits.
Notes: The cookie replaces an existing cookie with the same name, domain, and path, if one exists in
the cookie storage. This method accepts the cookie only if the receiver’s cookie accept policy is NSHTTPCookieAcceptPolicyAlways or NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain. The cookie
is ignored if the receiver’s cookie accept policy is NSHTTPCookieAcceptPolicyNever.
7.2.11
setCookies(cookies() as NSHTTPCookieMBS, URL as string, mainDocumentURL as string)
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Adds an array of
cookies to the receiver if the receiver’s cookie acceptance policy permits.
Notes:
cookies: The cookies to add.
URL: The URL associated with the added cookies.
mainDocumentURL: The URL of the main HTML document for the top-level frame, if known. Can be ””.
This URL is used to determine if the cookie should be accepted if the cookie accept policy is NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain.
The cookies will replace existing cookies with the same name, domain, and path, if one exists in the cookie
storage. The cookie will be ignored if the receiver’s cookie accept policy is NSHTTPCookieAcceptPolicyNever.
To store cookies from a set of response headers, an application can use cookiesWithResponseHeaderFields
passing a header field dictionary and then use this method to store the resulting cookies in accordance with
the receiver’s cookie acceptance policy.
7.2. CLASS NSHTTPCOOKIESTORAGEMBS
7.2.12
585
sharedHTTPCookieStorage as NSHTTPCookieStorageMBS
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the shared
cookie storage instance.
Example:
dim s as NSHTTPCookieStorageMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage
dim cookies() as NSHTTPCookieMBS = s.cookies
MsgBox str(UBound(cookies)+1)+” cookies”
7.2.13
Properties
7.2.14
Handle as Integer
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The internal
reference to the NSHTTPCookieStorage object.
Notes: (Read and Write property)
7.2.15
cookieAcceptPolicy as Integer
Plugin Version: 11.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The cookie storage’s
cookie accept policy.
Example:
Select case NSHTTPCookieStorageMBS.sharedHTTPCookieStorage.cookieAcceptPolicy
case NSHTTPCookieStorageMBS.NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain
MsgBox ”Cookies: only from main document domain”
case NSHTTPCookieStorageMBS.NSHTTPCookieAcceptPolicyNever
MsgBox ”Cookies: never”
case NSHTTPCookieStorageMBS.NSHTTPCookieAcceptPolicyAlways
MsgBox ”Cookies: always”
else
MsgBox ”Cookies: unknown setting”
end Select
Notes:
The default cookie accept policy is NSHTTPCookieAcceptPolicyAlways.
Changing the cookie policy affects all currently running applications using the cookie storage.
(Read and Write computed property)
586
CHAPTER 7. COCOA NETWORKING
7.2.16
Constants
7.2.17
NSHTTPCookieAcceptPolicyAlways = 0
Plugin Version: 11.1. Function: One of the cookie accept policy constants.
Notes: Accept all cookies. This is the default cookie accept policy.
7.2.18
NSHTTPCookieAcceptPolicyNever = 1
Plugin Version: 11.1. Function: One of the cookie accept policy constants.
Notes: Reject all cookies.
7.2.19
NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2
Plugin Version: 11.1. Function: One of the cookie accept policy constants.
Notes: Accept cookies only from the main document domain.
Chapter 8
Controls
8.1
8.1.1
class Bevelbutton
class Bevelbutton
Plugin Version: 3.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: An extension of
Realbasic’s internal control.
Notes:
The clock functions are hacks to REALbasic which uses undocumented functions.
This function does currently not work with the Mac Cocoa target of REALbasic. If you need it, please send
in a feature request.
8.1.2
Methods
8.1.3
NSButtonMBS as NSButtonMBS
Plugin Version: 9.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Creates a NSButtonMBS object for the given control.
Example:
MsgBox BevelButton1.NSButtonMBS.className
Notes: This way you can manipulate Cocoa controls directly.
587
588
8.2
8.2.1
CHAPTER 8. CONTROLS
class Checkbox
class Checkbox
Plugin Version: 2.9, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: An extension of
Realbasic’s internal control.
8.2.2
Methods
8.2.3
NSButtonMBS as NSButtonMBS
Plugin Version: 9.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Creates a NSButtonMBS object for the given control.
Example:
MsgBox CheckBox1.NSButtonMBS.className
Notes: This way you can manipulate Cocoa controls directly.
8.3. CLASS LISTBOX
8.3
class Listbox
8.3.1
class Listbox
589
Plugin Version: 13.0, Console & Web: No, Mac: Yes, Win: Yes, Linux: Yes. Function: The built in listbox
class in REALbasic.
8.3.2
Methods
8.3.3
HorizontalNSScrollerMBS as NSScrollerMBS
Plugin Version: 13.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns horizontal
scrollbar for a listbox.
Notes: Only for Cocoa target.
8.3.4
VerticalNSScrollerMBS as NSScrollerMBS
Plugin Version: 13.0, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Returns vertical
scrollbar for a listbox.
Notes: Only for Cocoa target.
590
8.4
8.4.1
CHAPTER 8. CONTROLS
class Radiobutton
class Radiobutton
Plugin Version: 2.9, Console & Web: No, Mac: Yes, Win: Yes, Linux: Yes. Function: An extension of
Realbasic’s internal control.
8.4.2
Methods
8.4.3
NSButtonMBS as NSButtonMBS
Plugin Version: 9.7, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Creates a NSButtonMBS object for the given control.
Example:
MsgBox RadioButton1.NSButtonMBS.className
Notes: This way you can manipulate Cocoa controls directly.
Chapter 9
CoreGraphics
9.1
9.1.1
class QuartzFilterManagerMBS
class QuartzFilterManagerMBS
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The class to manage
the quartz filters on the system.
9.1.2
Methods
9.1.3
filterPanel as NSPanelMBS
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the panel
where users can select a filter.
Example:
dim m as QuartzFiltermanagerMBS
dim p as NSPanelMBS
m=new QuartzFiltermanagerMBS
p=m.filterPanel
p.Show
Notes: Returns nil on any error.
591
592
9.1.4
CHAPTER 9. COREGRAPHICS
filters as QuartzFilterMBS()
Plugin Version: 11.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns an array
with all filters.
Example:
dim q as new QuartzFilterManagerMBS
dim a() as QuartzFilterMBS
a=q.filters
MsgBox str(ubound(a)+1)+” filters found.”
9.1.5
filtersInDomains(domains() as string) as QuartzFilterMBS()
Plugin Version: 11.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns an array
with all filters in the given domains.
Example:
dim domains() as string = array(QuartzFilterManagerMBS.kQuartzFilterPrintingDomain)
dim a() as QuartzFilterMBS = QuartzFilterManagerMBS.filtersInDomains(domains)
MsgBox str(ubound(a)+1)+” filters found.”
9.1.6
filterView as QuartzFilterViewMBS
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The view which you
can use to select views.
Notes: You can use the panel as an extra window or add this view to one of your settings windows.
9.1.7
selectedFilter as QuartzFilterMBS
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The currently
selected filter.
9.1. CLASS QUARTZFILTERMANAGERMBS
9.1.8
593
selectFilter(filter as QuartzFilterMBS) as boolean
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Selects a filter.
Notes: Returns true on success.
9.1.9
9.1.10
Properties
Handle as Integer
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The internal used
handle to the filter manager.
Notes: (Read and Write property)
9.1.11
Events
9.1.12
didAddFilter(filter as QuartzFilterMBS)
Plugin Version: 8.6, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The given filter was
added to the filter list.
9.1.13
didModifyFilter(filter as QuartzFilterMBS)
Plugin Version: 8.6, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The given filter was
modified.
9.1.14
didRemoveFilter(filter as QuartzFilterMBS)
Plugin Version: 8.6, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The given filter was
removed.
9.1.15
didSelectFilter(filter as QuartzFilterMBS)
Plugin Version: 8.6, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: The selection changed
to the new filter.
594
CHAPTER 9. COREGRAPHICS
9.1.16
Constants
9.1.17
kQuartzFilterApplicationDomain=”kQuartzFilterApplicationDomain”
Plugin Version: 11.2. Function: One of the filter domain constants.
Example:
dim domains() as string = array(QuartzFilterManagerMBS.kQuartzFilterApplicationDomain)
dim a() as QuartzFilterMBS = QuartzFilterManagerMBS.filtersInDomains(domains)
MsgBox str(ubound(a)+1)+” filters found.”
9.1.18
kQuartzFilterPDFWorkflowDomain=”kQuartzFilterPDFWorkflowDomain”
Plugin Version: 11.2. Function: One of the filter domain constants.
Example:
dim domains() as string = array(QuartzFilterManagerMBS.kQuartzFilterPDFWorkflowDomain)
dim a() as QuartzFilterMBS = QuartzFilterManagerMBS.filtersInDomains(domains)
MsgBox str(ubound(a)+1)+” filters found.”
9.1.19
kQuartzFilterPrintingDomain=”kQuartzFilterPrintingDomain”
Plugin Version: 11.2. Function: One of the filter domain constants.
Example:
dim domains() as string = array(QuartzFilterManagerMBS.kQuartzFilterPrintingDomain)
dim a() as QuartzFilterMBS = QuartzFilterManagerMBS.filtersInDomains(domains)
MsgBox str(ubound(a)+1)+” filters found.”
9.2. CLASS QUARTZFILTERMBS
9.2
9.2.1
595
class QuartzFilterMBS
class QuartzFilterMBS
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The Quartz filter
class.
Example:
// Create a couple of PDF files to test different Quartz filters
// get some picture
dim pic as Picture = LogoMBS(500)
dim image as new NSImageMBS(pic)
// create page with picture
dim page as new PDFPageMBS(image)
// create new document
dim doc as new PDFDocumentMBS
// add page
doc.insertPage(page,0)
// get filters
dim manager as new QuartzFilterManagerMBS
dim filters() as QuartzFilterMBS = Manager.filters
for each filter as QuartzFilterMBS in filters
// save PDF with this filter
dim file as FolderItem = SpecialFolder.Desktop.Child(filter.localizedName+”.pdf”)
call doc.write(file, filter)
next
Notes:
This filters can be used to change PDFs on writing like to reduce the file size.
This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.
596
CHAPTER 9. COREGRAPHICS
9.2.2
Methods
9.2.3
applyToContext(CGContextHandle as Integer) as boolean
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Applies a filter to a
given context.
Example:
dim c as CGContextMBS // your context
dim fi as QuartzFilterMBS
fi=QuartzFilterMBS.quartzFilterWithFile(SpecialFolder.Desktop.Child(”Reduce File Size.qfilter”))
call fi.applyToContext(c.Handle)
Notes: Returns true on success.
9.2.4
Constructor
Plugin Version: 13.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The private constructor.
9.2.5
localizedName as string
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The localized name
of the filter.
Example:
dim q as new QuartzFilterManagerMBS
dim s(-1) as string
dim a() as QuartzFilterMBS = q.filters
for each f as QuartzFilterMBS in a
s.append f.localizedName
next
MsgBox Join(s,EndOfLine)
9.2. CLASS QUARTZFILTERMBS
9.2.6
597
quartzFilterWithFile(file as folderitem) as QuartzFilterMBS
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Loads a quartz filter
from the given folderitem.
Example:
dim c as CGContextMBS // your context
dim fi as QuartzFilterMBS
dim file as folderitem
file=SpecialFolder.Desktop.Child(”Reduce File Size.qfilter”)
fi=QuartzFilterMBS.quartzFilterWithFile(file)
call fi.applyToContext(c.Handle)
Notes:
Returns nil on any error.
Requires Mac OS X 10.5.
9.2.7
quartzFilterWithURL(url as string) as QuartzFilterMBS
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Loads the quartz
filter from the given URL.
Notes:
Returns nil on any error.
Requires Mac OS X 10.5.
9.2.8
removeFromContext(CGContextHandle as Integer)
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Removes a filter
from a CGContext.
Notes: Pass CGContextMBS.handle and make sure it is not 0.
9.2.9
url as string
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The URL where this
filter is located.
Example:
598
CHAPTER 9. COREGRAPHICS
dim q as new QuartzFilterManagerMBS
dim s(-1) as string
dim a() as QuartzFilterMBS = q.filters
for each f as QuartzFilterMBS in a
s.append f.url
next
MsgBox Join(s,EndOfLine)
9.2.10
Properties
9.2.11
Handle as Integer
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The internal handle
to the filter object.
Notes: (Read and Write property)
9.3. CLASS QUARTZFILTERVIEWMBS
9.3
9.3.1
599
class QuartzFilterViewMBS
class QuartzFilterViewMBS
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The view to select
quartz filters.
Notes:
You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSViewMBS class.
9.3.2
Methods
9.3.3
Constructor
Plugin Version: 12.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
Quartz Filter View with size 100/100 and position 0/0
Example:
dim t as new QuartzFilterViewMBS
Notes: On success the handle property is not zero.
See also:
• 9.3.4 Constructor(Handle as Integer)
599
• 9.3.5 Constructor(left as Double, top as Double, width as Double, height as Double)
600
9.3.4
Constructor(Handle as Integer)
Plugin Version: 12.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an object
based on the given QuartzFilterViewMBS handle.
Example:
dim t as new QuartzFilterViewMBS(0, 0, 100, 100)
dim v as new QuartzFilterViewMBS(t.handle)
MsgBox str(v.Bounds.Width)+” x ”+str(v.Bounds.Height)
Notes: The handle is casted to a QuartzFilterView and the plugin retains this handle.
See also:
600
CHAPTER 9. COREGRAPHICS
• 9.3.3 Constructor
599
• 9.3.5 Constructor(left as Double, top as Double, width as Double, height as Double)
600
9.3.5
Constructor(left as Double, top as Double, width as Double, height as
Double)
Plugin Version: 12.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a new
Quartz Filter View with the given size and position.
Example:
dim x as new QuartzFilterViewMBS(0, 0, 100, 100)
Notes:
On success the handle property is not zero.
The new movie view object must be inserted into the view hierarchy of an NSWindow before it can be used.
This method is the designated initializer for the QuartzFilterView class.
See also:
• 9.3.3 Constructor
599
• 9.3.4 Constructor(Handle as Integer)
599
9.3.6
sizeToFit
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Resizes the view to
the best size.
Chapter 10
DiscRecording
10.1
class DRBurnMBS
10.1.1
class DRBurnMBS
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A class to perform
and monitor the burning of a CD or DVD disc.
Notes:
Each time you want to burn to a disc, an instance of DRBurnMBS needs to be created.
When an instance is created, you pass in an instance of DRDevice to let the DRBurn object know what
device to use. This object is retained for the life of the DRBurn instance. Before burning, you can set several
options that control the behavior of the burn and the handling of the disc once the burn completes.
A DRBurn object will send out notifications through the DRNotificationCenter mechanism to broadcast
the burn state to any interested observers. However, if for some reason you don’t want to use notifications,
you can poll the burn object at any time for the current status using the status properties. This is not
recommended in any application using a run loop, because it involves polling.
All methods in this class will catch exceptions from Cocoa and raise a NSExceptionMBS instead. Using the
message, name and reason properties you can see what was the reason for this exception. Please report if
you find a method which does not handle exceptions correct.
601
602
CHAPTER 10. DISCRECORDING
10.1.2
Methods
10.1.3
abort
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Stops the burn.
Notes:
When this method returns the burn might not actually be fully stopped but it has been cancelled and only
cleanup is going on. If a burn has not completed writing data to disc, you just made a coaster.
Typically this method is only used as a result of the user hitting a cancel/stop button somewhere in the user
interface.
10.1.4
burnForDevice(device as DRDeviceMBS) as DRBurnMBS
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates an autoreleased burn object.
Notes: Once a burn is created with this method, the object is ready to write data to the disc.
10.1.5
Constructor(device as DRDeviceMBS)
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a burn
object.
Notes: Once a burn is created with this method, the object is ready to write data to the disc.
10.1.6
device as DRDeviceMBS
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the device
being used for the burn.
Notes: Returns nil on any error.
10.1.7
DRBurnAppendableKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the property
key constants.
Notes: The burn property whose value is a boolean indicating if the disc will still be appendable after the
burn. If this key is not present, the burn will default to a value of false and the disc will be marked as not
appendable.
10.1. CLASS DRBURNMBS
10.1.8
603
DRBurnCompletionActionEject as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: An string value for
the CompletionAction indicating that the burn object should eject the disc from the drive when the burn
completes.
10.1.9
DRBurnCompletionActionKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the property
key constants.
Notes: The burn property whose value is a String containing one of the completion actions possible for the
disc handling. If this key is not present, the burn will default to a value of DRBurnCompletionActionEject
and the disc will be ejected.
10.1.10
DRBurnCompletionActionMount as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: An string value for
the CompletionAction property indicating that the burn object should mount the disc on the desktop when
the burn completes.
10.1.11
DRBurnDoubleLayerL0DataZoneBlocksKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the property
key constants.
Notes:
The burn property key whose value is an double containing the number of blocks desired for the layer 0 data
zone on a double layer writable disc.
The size of the layer 0 data zone dictates where the transition point is from layer 0 to layer 1. If this key is
present, the data zone size will be set prior to the start of the burn using the value for this key. If it is not
present, the default layer 0 data zone will be used (half the available blocks on an empty disc).
The transition point can be specified two ways. If the value specified in this key is greater than 1.0, then
it will designate an absolute block number for the transition point. In this case, the block number should
be a multiple of 16 and at least 40000h per specification. If the value is less than 1.0, it will specify the
percentage of the burn that should reside on layer 0. A typical value is 0.5, designating half the burn for
each layer. A value of 0.0 or 1.0 will not change the layer 0 transition point.
604
10.1.12
CHAPTER 10. DISCRECORDING
DRBurnFailureActionEject as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: An string constant
for FailureAction indicating that the burn object should eject the disc from the drive if the burn fails.
10.1.13
DRBurnFailureActionKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the property
key constants.
Notes:
The burn property whose value is a string containing a one of the failure actions possible for the disc handling.
If this key is not present, the burn will default to a value of DRBurnFailureActionEject and the disc will be
ejected.
10.1.14
DRBurnFailureActionNone as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: An string constant
for FailureAction indicating that the burn object should do nothing with the disc if the burn fails.
10.1.15
DRBurnOverwriteDiscKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the property
key constants.
Notes: The burn property whose value is a boolean indicating if the disc will be overwritten from block
zero for the burn. If this key is not present, the burn will default to a value of false and the disc will be
appended.
10.1.16
DRBurnRequestedSpeedKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the property
key constants.
Notes: The burn property whose value is a number containing the speed at which the burn should run,
expressed as a float value of kilobytes per second. If this key is not present, the speed will default to DRDeviceBurnSpeedMax.
10.1. CLASS DRBURNMBS
10.1.17
605
DRBurnStatusChangedNotification as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The notification
name for a status update on a burn operation.
Notes: See the ”DataBurn with Events and Notification” example project.
10.1.18
DRBurnStrategyBDDAO as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the string
constants for the burn strategy.
Notes: An string value for DRBurnStrategyKey representing the DAO (disc-at-once) burn strategy for BD
(Blu-ray). This strategy applies only to BDs.
10.1.19
DRBurnStrategyCDSAO as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the string
constants for the burn strategy.
Notes: An String value for DRBurnStrategyKey representing the SAO (session-at-once) burn strategy for
CD.
10.1.20
DRBurnStrategyCDTAO as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the string
constants for the burn strategy.
Notes: An String value for DRBurnStrategyKey representing the TAO (track-at-once) burn strategy for CD.
10.1.21
DRBurnStrategyDVDDAO as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the string
constants for the burn strategy.
Notes: An String value for DRBurnStrategyKey representing the DAO (disc-at-once) burn strategy for
DVD. This strategy applies only to DVDs; it is invalid when burning to CD media.
10.1.22
DRBurnStrategyIsRequiredKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the property
key constants.
Notes:
606
CHAPTER 10. DISCRECORDING
The burn property whose value is a BOOL indicating whether the burn strategy/strategies listed for DRBurnStrategyKey are the only strategies allowed. If this key is not present, the burn will default to a value of false.
If this value is set to true, and the device does not support the type(s) of burn requested, the burn will fail
with kDRDeviceBurnStrategyNotAvailableErr .
If this value is set to false, and the device does not support the type(s) of burn requested, the engine will
choose an alternate burn strategy automatically - one that will provide an equivalent disc.
10.1.23
DRBurnStrategyKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the property
key constants.
Notes:
The burn property whose value is a string, or array of strings, indicating the burn strategy or strategies that
are suggested. If this key is not present, the burn engine picks an appropriate burn strategy automatically.
Most clients will not need to specify a specific burn strategy.
When more than one strategy is suggested, the burn engine will attempt to use the first strategy in the list
which is available. A burn strategy will never be used if it cannot write the required data: for example, TAO
cannot be used to write CD-Text.
The presence of this key by itself is just a suggestion, and if the burn engine cannot fulfill the request it will
burn using whatever strategy is available. To make the suggestion into a requirement, add DRBurnStrategyIsRequiredKey with a value of true.
10.1.24
DRBurnTestingKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the property
key constants.
Notes:
The burn property whose value is a boolean indicating if the burn will run as a test burn.
When this is set and the burn object is sent writeLayout, the entire burn process proceeds as if data would
be written to the disc, but the laser is not turned on to full power, so the physical disc is not modified.
If this key is not present or the selected burning device does not support test burning, the burn will default
to a value of false and a normal burn will occur.
10.1. CLASS DRBURNMBS
10.1.25
607
DRBurnUnderrunProtectionKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the property
key constants.
Notes:
The burn property whose value is a boolean indicating if burn underrun protection will be on or off for
devices which support it.
For those devices which support it, burn underrun protection is enabled by default.
If the device supports burn underrun protection and this key is not present, the burn will default to a value
of true and burn underrun protection will be enabled.
10.1.26
DRBurnVerifyDiscKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the property
key constants.
Notes: The burn property whose value is a boolean indicating if the disc will be verified after being burned.
If this key is not present, the burn will default to a value of true and the disc will be verified.
10.1.27
DRCDTextKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the property
key constants.
Notes:
This key points to a DRCDTextBlockMBS, or array of DRCDTextBlockMBS objects containing the CDText information for the disc. If this key is not present, the burn will not write CD-Text.
Before using this key, you should to make sure that the device supports CD-Text by checking the value of
DRDeviceCanWriteCDTextKey in the device’s write capabilities dictionary.
If this value is set to true, and the device does not support writing CD-Text, the burn will fail with kDRDeviceCantWriteCDTextErr.
10.1.28
DRErrorStatusAdditionalSenseStringKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary keys for the burn status dictionary.
608
CHAPTER 10. DISCRECORDING
Notes: String describing the RBC additional sense code and additional sense code qualifier pair returned
by the device. If no sense is reported, this key will not be present.
10.1.29
DRErrorStatusErrorInfoStringKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary keys for the burn status dictionary.
Notes: String describing extended error information in a user appropriate manner.
10.1.30
DRErrorStatusErrorKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary keys for the burn status dictionary.
Notes: Number containing the OS error code for the error.
10.1.31
DRErrorStatusErrorStringKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary keys for the burn status dictionary.
Notes: String describing the error in a user appropriate manner.
10.1.32
DRErrorStatusKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary keys for the burn status dictionary.
Notes: The key in the status dictionary for the error dictionary.
10.1.33
DRErrorStatusSenseCodeStringKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary keys for the burn status dictionary.
Notes: String describing the RBC sense code returned by the device. If no sense is reported, this key will
not be present.
10.1. CLASS DRBURNMBS
10.1.34
609
DRErrorStatusSenseKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary keys for the burn status dictionary.
Notes: String containing the raw RBC sense information structure reported by the device. If no sense is
reported, this key will not be present.
10.1.35
DRMediaCatalogNumberKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the property
key constants.
Notes:
The burn property whose value is a memoryblock containing exactly 13 bytes of data, which will be written
to the disc as the Media Catalog Number. If this key is not present, it will default to all zeroes, indicating
that a MCN is not supplied.
This value is the UPC/EAN product number, and should conform to the specifications of the UCC and
EAN. See ean-int.org and uc-council.org for more details on the UPC/EAN standard.
http://www.ean-int.org/
http://www.uc-council.org/
10.1.36
DRStatusCurrentSessionKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary keys for the burn status dictionary.
Notes: Number indicating the current session being burned.
10.1.37
DRStatusCurrentSpeedKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary keys for the burn status dictionary.
Notes: Number indicating the current burn speed.
10.1.38
DRStatusCurrentTrackKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary keys for the burn status dictionary.
610
CHAPTER 10. DISCRECORDING
Notes: Number indicating the current track being burned.
10.1.39
DRStatusEraseTypeKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary keys for the burn status dictionary.
Notes: String indicating the type of erase operation.
10.1.40
DRStatusPercentCompleteKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary
keys for the burn status dictionary.
Notes:
A key for the status dictionaries.
Number containing the percent complete of the operation expressed as a floating point number from 0 to 1.
10.1.41
DRStatusProgressCurrentKPS as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The current burn
speed in kilobytes per second.
Notes: This is an optional key within the DRStatusProgressInfoKey dictionary. The value of this key, if
present, is a Number containing the write speed of the burn.
10.1.42
DRStatusProgressCurrentXFactor as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The current burn
speed in a media appropriate x-factor
Notes: This is an optional key within the DRStatusProgressInfoKey dictionary. The value of this key, if
present, is a number containing the appropriate x-factor for the media.
10.1.43
DRStatusProgressInfoKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary
keys for the burn status dictionary.
Notes:
A dictionary of extended progress information.
A key for the status dictionary. The value of this key is a reference to a Dictionary object containing ex-
10.1. CLASS DRBURNMBS
611
tended progress information.
10.1.44
DRStatusStateDone as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
for DRStatusStateKey. Indicates the operation is finished and it succeeded.
10.1.45
DRStatusStateErasing as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
for DRStatusStateKey in the erase status dictionary.
Notes: Indicates the erase is currently in progress.
10.1.46
DRStatusStateFailed as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
for DRStatusStateKey. Indicates the operation is finished and it failed.
10.1.47
DRStatusStateFinishing as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
for DRStatusStateKey in the burn status dictionary.
Notes: Indicates the burn is finishing up (closing the last session, writing the TOC, etc).
10.1.48
DRStatusStateKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary
keys for the burn status dictionary.
Notes:
A key for the status dictionaries.
String indicating the current state of the operation.
612
10.1.49
CHAPTER 10. DISCRECORDING
DRStatusStateNone as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
for DRStatusStateKey. Indicates the operation has not yet begun.
10.1.50
DRStatusStatePreparing as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
for DRStatusStateKey. Indicates the operation is preparing to begin.
10.1.51
DRStatusStateSessionClose as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
for DRStatusStateKey in the burn status dictionary.
Notes: Indicates the burn is closing a session on disc. The exact session being closing is contained in
DRStatusCurrentSessionKey.
10.1.52
DRStatusStateSessionOpen as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
for DRStatusStateKey in the burn status dictionary.
Notes: Indicates the burn is opening a session on disc. The exact session being opened is contained in
DRStatusCurrentSessionKey.
10.1.53
DRStatusStateTrackClose as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
for DRStatusStateKey in the burn status dictionary.
Notes: Indicates the burn is closing a track on disc. The exact track being closed is contained in DRStatusCurrentTrackKey.
10.1.54
DRStatusStateTrackOpen as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
for DRStatusStateKey in the burn status dictionary.
Notes: Indicates the burn is opening a track on disc. The exact track being opened is contained in DRStatusCurrentTrackKey.
10.1. CLASS DRBURNMBS
10.1.55
613
DRStatusStateTrackWrite as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
for DRStatusStateKey in the burn status dictionary.
Notes: Indicates the burn is writing a track on disc. The exact track being written is contained in DRStatusCurrentTrackKey.
10.1.56
DRStatusStateVerifying as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
for DRStatusStateKey. Indicates the operation is verifying what it did.
10.1.57
DRStatusTotalSessionsKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary keys for the burn status dictionary.
Notes: Number indicating the total number of sessions being burned.
10.1.58
DRStatusTotalTracksKey as string
Plugin Version: 11.0, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the dictionary keys for the burn status dictionary.
Notes: Number indicating the total number of tracks in the current session being burned.
10.1.59
DRSynchronousBehaviorKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the property
key constants.
Notes:
The burn property whose value is a BOOL indicating if burn operations will behave synchronously. If this
key is not present, it will default to a value of false and burn operations will behave asynchronously.
Synchronous operations do not post status notifications, and will not return until they are completed. Status
can still be queried at any time, and will remain valid even after the burn operation has finished.
614
10.1.60
CHAPTER 10. DISCRECORDING
status as dictionary
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a dictionary
describing the status of the burn.
Notes: The same dictionary is returned through the DRBurnStatusChangedNotification notification.
10.1.61
writeImageFile(ImageFile as FolderItem) as boolean
Plugin Version: 7.5, Console & Web: Yes, Mac: Yes, Win: Yes, Linux: Yes. Function: Writes the image
tracks to the disc.
Notes:
Requires Mac OS X 10.4.
ImageFile: The path to the image file. This file must be one that can be read by DiscRecording. The
supported image types include: .dmg, .iso, .cue, and .toc. For .cue and .toc files the corresponding data files
(.bin, .img, etc) must also be present and correctly referenced in the .cue/.toc file.
Returns true on success and false on failure.
See also:
• 10.1.62 writeImageFile(ImagePath as String) as boolean
10.1.62
614
writeImageFile(ImagePath as String) as boolean
Plugin Version: 7.5, Console & Web: Yes, Mac: Yes, Win: Yes, Linux: Yes. Function: Writes the image
tracks to the disc.
Notes:
Requires Mac OS X 10.4.
ImageFile: The path to the image file. This file must be one that can be read by DiscRecording. The
supported image types include: .dmg, .iso, .cue, and .toc. For .cue and .toc files the corresponding data files
(.bin, .img, etc) must also be present and correctly referenced in the .cue/.toc file.
Returns true on success and false on failure.
See also:
• 10.1.61 writeImageFile(ImageFile as FolderItem) as boolean
614
10.1. CLASS DRBURNMBS
10.1.63
615
writeLayout(track as DRTrackMBS)
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Writes the track to
the disc.
Notes: A single session disc will be created with the given track.
See also:
• 10.1.64 writeLayout(tracks() as DRTrackMBS)
10.1.64
615
writeLayout(tracks() as DRTrackMBS)
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Writes the tracks to
the disc.
Notes: A multi session disc will be created with the given tracks.
See also:
• 10.1.63 writeLayout(track as DRTrackMBS)
10.1.65
Properties
10.1.66
appendable as boolean
615
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Indicates whether
the burn is appendable.
Example:
dim b as DRBurnMBS // get a burn object
b.appendable=true
Notes:
When a burn completes, it can mark the disc so that no more data can be written to it. This creates a closed
or non-appendable disc (which is the most compatible with audio CD players). If this method returns false,
then the disc will be marked as closed and no data can be appended to it. A return value of true indicates
further burns can be appended to the disc.
(Read and Write computed property)
10.1.67
BurnFailureAction as string
Plugin Version: 7.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: What to do on a
failure.
Notes:
616
CHAPTER 10. DISCRECORDING
The burn property whose value is a string containing a one of the failure actions possible for the disc handling.
If this key is not present, the burn will default to a value of DRBurnFailureActionEject and the disc will be
ejected.
(Read and Write computed property)
10.1.68
completionAction as string
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The action to be
performed at the end of the burn.
Notes:
Value must be DRBurnCompletionActionEject, DRBurnCompletionActionMount or empty for default.
(Read and Write computed property)
10.1.69
DoubleLayerL0DataZoneBlocks as Double
Plugin Version: 8.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A double containing
the number of blocks desired for the layer 0 data zone on a double layer writable disc.
Notes:
The size of the layer 0 data zone dictates where the transition point is from layer 0 to layer 1. If this key is
present, the data zone size will be set prior to the start of the burn using the value for this key. If it is not
present, the default layer 0 data zone will be used (half the available blocks on an empty disc).
The transition point can be specified two ways. If the value specified in this key is greater than 1.0, then
it will designate an absolute block number for the transition point. In this case, the block number should
be a multiple of 16 and at least & h40000 per specification. If the value is less than 1.0, it will specify the
percentage of the burn that should reside on layer 0. A typical value is 0.5, designating half the burn for
each layer. A value of 0.0 or 1.0 will not change the layer 0 transition point.
(Read and Write computed property)
10.1.70
MediaCatalogNumber as memoryblock
Plugin Version: 7.5, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The media catalog
number as a binary data string.
Notes:
The burn property whose value is a memoryblock containing exactly 13 bytes of data, which will be written
to the disc as the Media Catalog Number. If this key is not present, it will default to all zeroes, indicating
that a MCN is not supplied.
This value is the UPC/EAN product number, and should conform to the specifications of the UCC and
10.1. CLASS DRBURNMBS
617
EAN. See
http://www.ean-int.org/
and
http://www.uc-council.org/
for more details on the UPC/EAN standard.
(Read and Write computed property)
10.1.71
Overwrite as boolean
Plugin Version: 8.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The burn property
whose value is a boolean indicating if the disc will be overwritten from block zero for the burn.
Notes:
If this key is not present, the burn will default to a value of false and the disc will be appended.
(Read and Write computed property)
10.1.72
properties as dictionary
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The properties
dictionary of the burn.
Notes: (Read and Write computed property)
10.1.73
requestedBurnSpeed as single
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The speed at which
this burn will attempt to write data.
Notes:
The actual speed also depends on the capabilities of the bus the device is on, the maximum speed of the
device itself, and the media used.
Value is a float indicating the speed the burn should run at in kilobytes per second.
(Read and Write computed property)
10.1.74
Testing as boolean
Plugin Version: 8.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Whether the burn
will run as a test burn.
Notes:
618
CHAPTER 10. DISCRECORDING
When this is set and the burn starts, the entire burn process proceeds as if data would be written to the
disc, but the laser is not turned on to full power, so the physical disc is not modified.
If this key is not present or the selected burning device does not support test burning, the burn will default
to a value of false and a normal burn will occur.
(Read and Write computed property)
10.1.75
UnderrunProtection as boolean
Plugin Version: 8.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A boolean indicating
if burn underrun protection will be on or off for devices which support it.
Notes:
For those devices which support it, burn underrun protection is enabled by default.
If the device supports burn underrun protection and this key is not present, the burn will default to a value
of <i>true</i>and burn underrun protection will be enabled.
(Read and Write computed property)
10.1.76
verifyDisc as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Indicates whether
the resulting disc will be verified.
Example:
dim b as DRBurnMBS // get a burn object
b.verifyDisc=true
Notes:
After data is written to disc, the data can be verified. The verification
process will read the data on the disc back into memory and compare it to the
data originally used to write to disc. The type of verification is determined
by a track property on a track-by-track basis. See the DRTrackMBS documentation for more information
on verification types.
(Read and Write computed property)
10.2. CLASS DRBURNPROGRESSPANELMBS
10.2
class DRBurnProgressPanelMBS
10.2.1
class DRBurnProgressPanelMBS
619
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Run and display
progress while burning data to media.
Example:
dim track as DRTrackMBS
dim bsp as DRBurnSetupPanelMBS
dim bpp as DRBurnProgressPanelMBS
// we need a track
track=CreateTrack
if track<>nil then
bsp=new DRBurnSetupPanelMBS
// set a few options
bsp.setCanSelectAppendableMedia true
bsp.setCanSelectTestBurn true
if bsp.runSetupPanel=bsp.NSOKButton then
bpp=new DRBurnProgressPanelMBS
// And start off the burn itself. This will put up the progress dialog
// and do all the nice pretty things that a happy app does.
bpp.beginProgressPanelForBurn bsp.burnObject, track
else
MsgBox ”You pressed cancel.”
end if
end if
Notes:
All methods in this class will catch exceptions from Cocoa and raise a NSExceptionMBS instead. Using the
message, name and reason properties you can see what was the reason for this exception. Please report if
you find a method which does not handle exceptions correct.
Subclass of the NSPanelMBS class.
620
CHAPTER 10. DISCRECORDING
10.2.2
Methods
10.2.3
beginProgressPanelForBurn(burn as DRBurnMBS, track as DRTrackMBS)
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Presents the progress
panel on screen and begins the burn process.
Notes:
This method returns control to the caller after it has displayed the progress sheet and begun the burn. Once
the method has returned the caller can perform other operations while the burn continues.
Burns a single session disc with one track.
See also:
• 10.2.4 beginProgressPanelForBurn(burn as DRBurnMBS, tracks() as DRTrackMBS)
10.2.4
620
beginProgressPanelForBurn(burn as DRBurnMBS, tracks() as DRTrackMBS)
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Presents the progress
panel on screen and begins the burn process.
Notes:
This method returns control to the caller after it has displayed the progress sheet and begun the burn. Once
the method has returned the caller can perform other operations while the burn continues.
Burns a multi session disc with several tracks.
See also:
• 10.2.3 beginProgressPanelForBurn(burn as DRBurnMBS, track as DRTrackMBS)
10.2.5
620
beginProgressPanelForImageFile(burn as DRBurnMBS, file as folderitem)
as boolean
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Presents the progress
panel on screen and begins the burn process.
Notes:
This method returns control to the caller after it has displayed the progress sheet and begun the burn. Once
the method has returned the caller can perform other operations while the burn continues.
Burns the image file located on the given position.
This file must be one that can be read by DiscRecording. The supported image types include: .dmg, .iso,
.cue, and .toc. For .cue and .toc files the corresponding data files (.bin, .img, etc) must also be present and
10.2. CLASS DRBURNPROGRESSPANELMBS
621
correctly referenced in the .cue/.toc file.
See also:
• 10.2.6 beginProgressPanelForImageFile(burn as DRBurnMBS, file as string) as boolean
10.2.6
621
beginProgressPanelForImageFile(burn as DRBurnMBS, file as string)
as boolean
Plugin Version: 8.6, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Presents the progress
panel on screen and begins the burn process.
Notes:
This method returns control to the caller after it has displayed the progress sheet and begun the burn. Once
the method has returned the caller can perform other operations while the burn continues.
Burns the image file located on the given position.
This file must be one that can be read by DiscRecording. The supported image types include: .dmg, .iso,
.cue, and .toc. For .cue and .toc files the corresponding data files (.bin, .img, etc) must also be present and
correctly referenced in the .cue/.toc file.
See also:
• 10.2.5 beginProgressPanelForImageFile(burn as DRBurnMBS, file as folderitem) as boolean
10.2.7
620
beginProgressSheetForBurn(burn as DRBurnMBS, track as DRTrackMBS,
docWindow as NSWindowMBS)
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Presents the
progress panel as a sheet and begins the burn process.
Notes:
docWindow: The window the sheet will be attached to. If docWindow is not nil, the panel slides down as a
sheet running as a document modal window. If owner is nil, this is an error.
This method returns control to the caller after it has displayed the progress sheet and begun the burn. Once
the method has returned the caller can perform other operations while the burn continues.
Burns a single session disc with one track.
See also:
• 10.2.8 beginProgressSheetForBurn(burn as DRBurnMBS, tracks() as DRTrackMBS, docWindow as
NSWindowMBS)
622
622
10.2.8
CHAPTER 10. DISCRECORDING
beginProgressSheetForBurn(burn as DRBurnMBS, tracks() as DRTrackMBS,
docWindow as NSWindowMBS)
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Presents the
progress panel as a sheet and begins the burn process.
Notes:
docWindow: The window the sheet will be attached to. If docWindow is not nil, the panel slides down as a
sheet running as a document modal window. If owner is nil, this is an error.
This method returns control to the caller after it has displayed the progress sheet and begun the burn. Once
the method has returned the caller can perform other operations while the burn continues.
Burns a multi session disc with several tracks.
See also:
• 10.2.7 beginProgressSheetForBurn(burn as DRBurnMBS, track as DRTrackMBS, docWindow as NSWindowMBS)
621
10.2.9
beginProgressSheetForImageFile(burn as DRBurnMBS, file as folderitem,
docWindow as NSWindowMBS) as boolean
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Presents the
progress panel as a sheet and begins the burn process.
Notes:
docWindow: The window the sheet will be attached to. If docWindow is not nil, the panel slides down as a
sheet running as a document modal window. If owner is nil, this is an error.
This method returns control to the caller after it has displayed the progress sheet and begun the burn. Once
the method has returned the caller can perform other operations while the burn continues.
Burns the image file located on the given position.
This file must be one that can be read by DiscRecording. The supported image types include: .dmg, .iso,
.cue, and .toc. For .cue and .toc files the corresponding data files (.bin, .img, etc) must also be present and
correctly referenced in the .cue/.toc file.
See also:
• 10.2.10 beginProgressSheetForImageFile(burn as DRBurnMBS, file as string, docWindow as NSWindowMBS) as boolean
623
10.2. CLASS DRBURNPROGRESSPANELMBS
10.2.10
623
beginProgressSheetForImageFile(burn as DRBurnMBS, file as string,
docWindow as NSWindowMBS) as boolean
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Presents the
progress panel as a sheet and begins the burn process.
Notes:
docWindow: The window the sheet will be attached to. If docWindow is not nil, the panel slides down as a
sheet running as a document modal window. If owner is nil, this is an error.
This method returns control to the caller after it has displayed the progress sheet and begun the burn. Once
the method has returned the caller can perform other operations while the burn continues.
Burns the image file located on the given position.
This file must be one that can be read by DiscRecording. The supported image types include: .dmg, .iso,
.cue, and .toc. For .cue and .toc files the corresponding data files (.bin, .img, etc) must also be present and
correctly referenced in the .cue/.toc file.
See also:
• 10.2.9 beginProgressSheetForImageFile(burn as DRBurnMBS, file as folderitem, docWindow as NSWindowMBS) as boolean
622
10.2.11
Constructor
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor to
create a new burn progress panel.
10.2.12
DRBurnProgressPanelDidFinishNotification as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the
notification names for use with a burn progress panel.
Notes:
Posted when the DRBurnProgressPanel has finished and is about to go away.
This notification contains a notification object but no userInfo dictionary. The notification object is the
DRBurnProgressPanel that will be closed.
10.2.13
DRBurnProgressPanelWillBeginNotification as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the
notification names for use with a burn progress panel.
624
CHAPTER 10. DISCRECORDING
Notes:
Posted when the DRBurnProgressPanel is about to begin displaying progress.
This notification contains a notification object but no userInfo dictionary. The notification object is the
DRBurnProgressPanel that will be displayed.
10.2.14
stopBurn
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
user clicks the panel’s stop button.
Notes: If you overwrite this method in Real Studio, your method will not be called. You can only call this
method to trigger the same behavior as if the user clicked the control.
10.2.15
Properties
10.2.16
Description as string
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The description
string displayed in the panel.
Notes:
If no description is explicitly set, this method will return the standard text string.
The panel’s description is typically a short text string that gives an indication to the user what operation is
being performed. If no description is explicitly set, the progress panel uses a standard text string suitable
to the burn.
(Read and Write computed property)
10.2.17
VerboseProgressStatus as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The vebosity of the
progress feedback.
Notes:
If verbose is true, the panel will update status for every change. If verbose is false, the panel will filter some
status messages and only update for major changes. The default for the panel is filter the status messages.
(Read and Write computed property)
10.2. CLASS DRBURNPROGRESSPANELMBS
625
10.2.18
Events
10.2.19
burnProgressPanelBurnDidFinish(burn as DRBurnMBS) as boolean
Plugin Version: 7.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to handle the end-of-burn feedback.
Notes: This method allows the delegate to handle or modify the end-of-burn feedback performed by the
progress panel. Return true to indicate the delegate handled the burn completion and the standard feedback
should be supressed. If this method returns false, the normal end-of-burn handling is performed (displaying
an error if appropriate, playing an ”I’m done” sound, etc). The delegate is messaged before the progress
panel is ordered out so a sheet may be displayed on a progress panel displayed as a window.
10.2.20
burnProgressPanelDidFinish
Plugin Version: 7.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Notification sent by
the panel after ordering out.
Notes: If the delegate implements this method it will receive the message after the panel is removed from
display.
10.2.21
burnProgressPanelWillBegin
Plugin Version: 7.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Notification sent by
the panel before display.
Notes: If the delegate implements this method it will receive the message immediately before the panel is
displayed.
626
CHAPTER 10. DISCRECORDING
10.3
class DRBurnSetupPanelMBS
10.3.1
class DRBurnSetupPanelMBS
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Manages a panel
that allows users to specify the parameters of an burn.
Example:
dim track as DRTrackMBS
dim bsp as DRBurnSetupPanelMBS
dim bpp as DRBurnProgressPanelMBS
// we need a track
track=CreateTrack
if track<>nil then
bsp=new DRBurnSetupPanelMBS
// set a few options
bsp.setCanSelectAppendableMedia true
bsp.setCanSelectTestBurn true
if bsp.runSetupPanel=bsp.NSOKButton then
bpp=new DRBurnProgressPanelMBS
// And start off the burn itself. This will put up the progress dialog
// and do all the nice pretty things that a happy app does.
bpp.beginProgressPanelForBurn bsp.burnObject, track
else
MsgBox ”You pressed cancel.”
end if
end if
Notes:
This class supports choosing the the device to use, whether or not to verify the burned data and how to
handle the burned disc when it completes.
All methods in this class will catch exceptions from Cocoa and raise a NSExceptionMBS instead. Using the
message, name and reason properties you can see what was the reason for this exception. Please report if
you find a method which does not handle exceptions correct.
Subclass of the DRSetupPanelMBS class.
10.3. CLASS DRBURNSETUPPANELMBS
10.3.2
Methods
10.3.3
appendable
627
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
user clicks the panel’s appendable checkbox.
Notes: If you overwrite this method in Real Studio, your method will not be called. You can only call this
method to trigger the same behavior as if the user clicked the control.
10.3.4
burnObject as DRBurnMBS
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates and returns
a new DRBurn object that’s configured to write data to the currently selected device.
Notes:
The new DRBurn object is configured based on the settings in the setup panel when the user clicks the OK
button.
Do not invoke this method within a modal session because the burn object information is only updated just before the
modal session ends.
Returns nil on any error.
10.3.5
burnSpeed
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
user clicks the panel’s burn speed popup button.
Notes: If you overwrite this method in Real Studio, your method will not be called. You can only call this
method to trigger the same behavior as if the user clicked the control.
10.3.6
completionAction
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
user clicks one of the panel’s completion action radio buttons.
Notes: If you overwrite this method in Real Studio, your method will not be called. You can only call this
method to trigger the same behavior as if the user clicked the control.
628
10.3.7
CHAPTER 10. DISCRECORDING
Constructor
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor to
create a new burn setup panel.
10.3.8
DRBurnSetupPanelDefaultButtonDefaultTitle as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constant to use
for the build title so it is replaced by the real default title string.
10.3.9
expand
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
user clicks the panel’s expand button.
Notes: If you overwrite this method in Real Studio, your method will not be called. You can only call this
method to trigger the same behavior as if the user clicked the control.
10.3.10
setCanSelectAppendableMedia(flag as boolean)
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Specifies whether
the user can choose to leave the disc appendable.
Notes:
This method controls whether the appendable checkbox is enabled.
If the data being writen to disc does not lend itself to having more data appended on to it, you can disable
the ability of the user to leave the disc open.
This method must be called before the panel is displayed.
Set to yes to enable the appendable checkbox, false to disable.
10.3.11
setCanSelectTestBurn(flag as boolean)
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Specifies whether
the user can choose to make a test burn.
Notes:
This method controls whether a checkbox should be added to the receiver that allows the user to set the
10.3. CLASS DRBURNSETUPPANELMBS
629
burn to be a test burn. By default, the test burn button is not displayed.
This method must be called before the panel is displayed.
Set to yes to show the test burn checkbox, false to hide it.
10.3.12
setDefaultButtonTitle(title as string)
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Sets the title for the
receiver’s default button to title.
Example:
dim panel as new DRBurnSetupPanelMBS
panel.setDefaultButtonTitle ”Do Burn”
Notes: Normally, the default button is ”Burn”.
10.3.13
testBurn
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
user clicks the panel’s test burn checkbox.
Notes: If you overwrite this method in Real Studio, your method will not be called. You can only call this
method to trigger the same behavior as if the user clicked the control.
10.3.14
verifyBurn
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Invoked when the
user clicks the panel’s verify burn checkbox.
Notes: If you overwrite this method in Real Studio, your method will not be called. You can only call this
method to trigger the same behavior as if the user clicked the control.
630
CHAPTER 10. DISCRECORDING
10.4
class DRCDTextBlockMBS
10.4.1
class DRCDTextBlockMBS
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A class for a Text
block.
Notes:
All methods in this class will catch exceptions from Cocoa and raise a NSExceptionMBS instead. Using the
message, name and reason properties you can see what was the reason for this exception. Please report if
you find a method which does not handle exceptions correct.
This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.
10.4.2
Methods
10.4.3
Constructor
Plugin Version: 13.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The private constructor.
10.4.4
encoding as Integer
Plugin Version: 8.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The text encoding
to use.
10.4.5
language as string
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The language of this
text block.
10.5. CLASS DRDEVICEMBS
10.5
class DRDeviceMBS
10.5.1
class DRDeviceMBS
631
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Represents a physical
CD/DVD drive connected to the computer.
Notes:
All methods in this class will catch exceptions from Cocoa and raise a NSExceptionMBS instead. Using the
message, name and reason properties you can see what was the reason for this exception. Please report if
you find a method which does not handle exceptions correct.
This is an abstract class. You can’t create an instance, but you can get one from various plugin functions.
10.5.2
Methods
10.5.3
acquireExclusiveAccess as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Attempts to acquire
an exclusive access session with the device.
Notes:
Acquiring exclusive access to the device prevents any process other than the one acquiring access from communicating with the device. So once exclusive access is granted, the device is unusable by any other process.
Because of this all volumes mounted from media in the drive must be unmounted before exclusive access can
be granted.
Exclusive access can be acquired multiple times. Each time this method is called, a call to releaseExclusiveAccess must be made at a later time, otherwise the process will never release its exclusive access.
Returns true if the exclusinve access is acquired and false if not.
10.5.4
acquireMediaReservation
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Indicate an interest
in the blank media reservation.
Example:
dim d as DRDeviceMBS // get a device
d.AcquireMediaReservation
Notes: Blank media participates in a reservation system thats allows applications to express their claim on
632
CHAPTER 10. DISCRECORDING
blank media to other applications. Indicating an interest in the reservation isn’t enough to assume its been
acquired, as there are likely to be other applications in the system whom have also indicated an interest in
the blank media reservation.
10.5.5
bsdName as string
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the bsd /dev
node name.
10.5.6
closeTray as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Commands the
device to close its tray.
Notes:
Does nothing if the device does not have a tray (slotload).
Returns true if the tray could be closed and false if not.
10.5.7
Constructor
Plugin Version: 13.1, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The private constructor.
10.5.8
device(index as UInt32) as DRDeviceMBS
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Queries the device
with the given index.
Notes:
Index from 0 to deviceCount-1.
Same as devices(), but if you only need one, this method is more efficient.
10.5.9
deviceCount as UInt32
Plugin Version: 11.3, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Queries the number
of devices on this computer.
10.5. CLASS DRDEVICEMBS
10.5.10
633
deviceForBSDName(bsdName as string) as DRDeviceMBS
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Obtains a DRDevice
for the device corresponding to the bsd /dev node.
Notes: If the device is not an authoring device (i.e., CDR, CDRW, DVR-R, etc), returns nil.
10.5.11
deviceForIORegistryEntryPath(path as string) as DRDeviceMBS
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Obtains a DRDevice
for the device at the path.
Notes: If the device is not an authoring device (i.e., CDR, CDRW, DVR-R, etc), returns nil.
10.5.12
devices as DRDeviceMBS()
Plugin Version: 11.2, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Obtains a static list
of devices connected to the computer.
Example:
// shows all devices with their product names:
dim devices() as DRDeviceMBS = DRDeviceMBS.devices
for each dd as DRDeviceMBS in devices
MsgBox dd.info.lookup(DRDeviceMBS.DRDeviceProductNameKey, ”?”)
next
Notes: Returns all CD/DVD devices connected to the computer at the time this method is called. Since
devices can come and go at any time, the output of this method is simply a snapshot of the set of devices
connected.
10.5.13
displayName as string
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a string
suitable for display in the user interface.
10.5.14
DRDeviceAppearedNotification as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the
notification names used with a DRBurn object.
634
CHAPTER 10. DISCRECORDING
Notes:
Posted by a DRNotificationCenter when a device is added to the system.
This notification is registered for only by name.
The object associated with this notification is the the device that has appeared. The userInfo is the same
dictionary returned by info for that device.
10.5.15
DRDeviceBurnSpeedBD1x as single
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
burn speed values.
Notes: 4496.0 KB/sec.
10.5.16
DRDeviceBurnSpeedCD1x as single
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
burn speed values.
Notes: 176.4 KB/sec.
10.5.17
DRDeviceBurnSpeedDVD1x as single
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
burn speed values.
Notes: 1385.0 KB/sec.
10.5.18
DRDeviceBurnSpeedHDDVD1x as single
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
burn speed values.
Notes: 4568.0 KB/sec.
10.5.19
DRDeviceBurnSpeedMax as single
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
burn speed values.
10.5. CLASS DRDEVICEMBS
635
Notes: A value representing the maximum speed at which a device can burn. The actual speed will vary
from device to device.
10.5.20
DRDeviceBurnSpeedsKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the status method.
Notes: An array containing the possible burn speeds available to use. This key may not be present if no
media is inserted.
10.5.21
DRDeviceCanTestWriteCDKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Value for this key is a boolean value indicating whether the device can perform a test burn to CD
media.
10.5.22
DRDeviceCanTestWriteDVDKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: A boolean value indicating whether the device can perform a test burn to DVD media.
10.5.23
DRDeviceCanUnderrunProtectCDKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device supports burn underrun protection when writing to
CD media.
10.5.24
DRDeviceCanUnderrunProtectDVDKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device supports burn underrun protection when writing to
DVD media.
636
10.5.25
CHAPTER 10. DISCRECORDING
DRDeviceCanWriteBDKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to some type of BD (Blu-ray) based media.
10.5.26
DRDeviceCanWriteBDREKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to BD-RE media.
10.5.27
DRDeviceCanWriteBDRKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to BD-R media.
10.5.28
DRDeviceCanWriteCDKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to some type of CD based media.
10.5.29
DRDeviceCanWriteCDRawKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device supports a raw mode burn strategy for CD. Raw mode
is sometimes incorrectly referred to as DAO (disc-at-once).
10.5.30
DRDeviceCanWriteCDRKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to CD-R media.
10.5. CLASS DRDEVICEMBS
10.5.31
637
DRDeviceCanWriteCDRWKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to CD-RW media.
10.5.32
DRDeviceCanWriteCDSAOKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device supports a SAO (session-at-once) burn strategy for CD.
10.5.33
DRDeviceCanWriteCDTAOKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device supports a TAO (track-at-once) burn strategy for CD.
10.5.34
DRDeviceCanWriteCDTextKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write CD-Text information to media.
10.5.35
DRDeviceCanWriteDVDDAOKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device supports a DAO (disc-at-once) burn strategy on DVD
media.
10.5.36
DRDeviceCanWriteDVDKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to some type of DVD based media.
638
10.5.37
CHAPTER 10. DISCRECORDING
DRDeviceCanWriteDVDPlusRDoubleLayerKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to DVD+R DL media.
10.5.38
DRDeviceCanWriteDVDPlusRKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to DVD+R media.
10.5.39
DRDeviceCanWriteDVDPlusRWDoubleLayerKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to DVD+RW DL media.
10.5.40
DRDeviceCanWriteDVDPlusRWKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to DVD+RW media.
10.5.41
DRDeviceCanWriteDVDRAMKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to DVD-RAM media.
10.5.42
DRDeviceCanWriteDVDRDualLayerKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to DVD-R DL media.
10.5. CLASS DRDEVICEMBS
10.5.43
639
DRDeviceCanWriteDVDRKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to DVD-R media.
10.5.44
DRDeviceCanWriteDVDRWDualLayerKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to DVD-RW DL media.
10.5.45
DRDeviceCanWriteDVDRWKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to DVD-RW media.
10.5.46
DRDeviceCanWriteHDDVDKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to some type of HDDVD based media.
10.5.47
DRDeviceCanWriteHDDVDRAMKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to HD DVD-RAM media.
10.5.48
DRDeviceCanWriteHDDVDRDualLayerKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to HD DVD-R DL media.
640
10.5.49
CHAPTER 10. DISCRECORDING
DRDeviceCanWriteHDDVDRKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to HD DVD-R media.
10.5.50
DRDeviceCanWriteHDDVDRWDualLayerKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to HD DVD-RW DL media.
10.5.51
DRDeviceCanWriteHDDVDRWKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to HD DVD-RW media.
10.5.52
DRDeviceCanWriteIndexPointsKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write index points to CD media.
10.5.53
DRDeviceCanWriteISRCKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write ISRC to CD media.
10.5.54
DRDeviceCanWriteKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceWriteCapabilitiesKey dictionary.
Notes: Boolean value indicating whether the device can write to some type of media.
10.5. CLASS DRDEVICEMBS
10.5.55
641
DRDeviceCurrentWriteSpeedKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the status method.
Notes: Number containing the current burning speed of this device.
10.5.56
DRDeviceDisappearedNotification as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the
notification names used with a DRBurn object.
Notes:
Posted by a DRNotificationCenter when a device is removed from the system.
The object associated with this notification is the the device that has disappeared. The userInfo is the same
dictionary returned by info for that device.
10.5.57
DRDeviceFirmwareRevisionKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the info method.
Notes: String containing the firmeware revision extracted from the device.
10.5.58
DRDeviceIORegistryEntryPathKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: String containing
the path of the device in the IO Registry.
Notes: One of the keys in the dictionary returned by the info method.
10.5.59
DRDeviceIsBusyKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the status method.
Notes: Number containing a boolean value indicating whether the device is busy or not.
642
10.5.60
CHAPTER 10. DISCRECORDING
DRDeviceIsTrayOpenKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the status method.
Notes: Number containing a boolean value indicating whether the device’s tray is open or not.
10.5.61
DRDeviceLoadingMechanismCanEjectKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the info method.
Notes: Number describing if the loading mechanism of the drive can eject.
10.5.62
DRDeviceLoadingMechanismCanInjectKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the info method.
Notes: Number describing if the loading mechanism of the drive can inject.
10.5.63
DRDeviceLoadingMechanismCanOpenKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the info method.
Notes: Number describing if the loading mechanism of the drive can open.
10.5.64
DRDeviceMaximumWriteSpeedKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the status method.
Notes: Number containing the maximum burning speed of this device.
10.5.65
DRDeviceMediaBlocksFreeKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes: Number containing the amount of space available (in blocks) on the media to be written to. If the
media already contains data and this value will be less than the normal maximum size of the disc. This
value will normally only be used if the intent is to append data onto an open disc.
10.5. CLASS DRDEVICEMBS
10.5.66
643
DRDeviceMediaBlocksOverwritableKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes:
Number containing the total amount of writable space available (in blocks) on the media to be written to if that media can be overwritten. Media that can be overwitten is designated through the DRDeviceMediaIsOverwritableKey .
The overwritable space is the amount of space on the disc that would be available if any data currently on
the disc is first erased.
10.5.67
DRDeviceMediaBlocksUsedKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes: Number containing the amount of space currently used (in blocks) for exising data.
10.5.68
DRDeviceMediaBSDNameKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes: String containing the BSD /dev node name assigned to the media in the device.
10.5.69
DRDeviceMediaClassBD as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
of the DRDeviceMediaClassKey.
Notes: Indicates the media is some type of BD (Blu-ray) based media.
10.5.70
DRDeviceMediaClassCD as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
of the DRDeviceMediaClassKey.
Notes: Indicates the media is some type of CD based media.
644
10.5.71
CHAPTER 10. DISCRECORDING
DRDeviceMediaClassDVD as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
of the DRDeviceMediaClassKey.
Notes: Indicates the media is some type of DVD based media.
10.5.72
DRDeviceMediaClassHDDVD as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
of the DRDeviceMediaClassKey.
Notes: Indicates the media is some type of HD DVD based media.
10.5.73
DRDeviceMediaClassKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes: String containing the class of media present in the drive.
10.5.74
DRDeviceMediaClassUnknown as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One possible value
of the DRDeviceMediaClassKey.
Notes: Indicates the media class is unknown.
10.5.75
DRDeviceMediaDoubleLayerL0DataZoneBlocksKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes: Number containing the amount of space available (in blocks) on layer 0 of a double layer piece of
media.
10.5.76
DRDeviceMediaFreeSpaceKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes: MSF value of the amount of space available on the media to be written to. If the media already
contains data and this value will be less than the normal maximum size of the disc. This value will normally
10.5. CLASS DRDEVICEMBS
645
only be used if the intent is to append data onto an open disc.
10.5.77
DRDeviceMediaInfoKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the status method.
Notes: Dictionary of information describing the media currently in the device. This key may not be present
if no media is inserted.
10.5.78
DRDeviceMediaIsAppendableKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes: Number containing a boolean value indicating that data can be appended to the exisiting data (if
any).
10.5.79
DRDeviceMediaIsBlankKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes: Number containing a boolean value indicating whether data has previously been written to the
media.
10.5.80
DRDeviceMediaIsErasableKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes: Number containing a boolean value indicating whether this media can be erased.
10.5.81
DRDeviceMediaIsOverwritableKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes:
Number containing a boolean value indicating that the data on the disc (if any) can be overwritten.
Rewritable media can always be erased, and then rewritten in its entirety, so it is always considered over-
646
CHAPTER 10. DISCRECORDING
writable.
Write-once media, if its blank, can also be written in its entirety and is also considered overwritable.
Write-once media, that has been partially written, can never again enter a state where it is entirely writable
and will have lost its overwritable designation.
10.5.82
DRDeviceMediaIsReservedKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes: Number containing a boolean value indicating whether the media is reserved for exclusive use by
the current process.
10.5.83
DRDeviceMediaOverwritableSpaceKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes:
MSF value of the amount of writable space available on the media to be written to - if that media can be
overwritten. Media that can be overwitten is designated through the DRDeviceMediaIsOverwritableKey .
The overwritable space is the amount of space on the disc that would be available if any data currently on
the disc is first erased.
10.5.84
DRDeviceMediaSessionCountKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes: Number containing the current number of sessions present on the media.
10.5.85
DRDeviceMediaStateInTransition as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values for the DRDeviceMediaStateKey.
Notes: The media is transitioning from one state to another (i.e., being spun up/down).
10.5. CLASS DRDEVICEMBS
10.5.86
647
DRDeviceMediaStateKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the status method.
Notes: String describing the state of the media.
10.5.87
DRDeviceMediaStateMediaPresent as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values for the DRDeviceMediaStateKey.
Notes: Device contains media of some type.
10.5.88
DRDeviceMediaStateNone as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values for the DRDeviceMediaStateKey.
Notes: No media is present in the device.
10.5.89
DRDeviceMediaTrackCountKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes: Number containing the number of tracks present on the media.
10.5.90
DRDeviceMediaTypeBDR as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a BD-R.
10.5.91
DRDeviceMediaTypeBDRE as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a BD-RE.
648
10.5.92
CHAPTER 10. DISCRECORDING
DRDeviceMediaTypeBDROM as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a BD-ROM.
10.5.93
DRDeviceMediaTypeCDR as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a CD-R.
10.5.94
DRDeviceMediaTypeCDROM as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a CD-ROM.
10.5.95
DRDeviceMediaTypeCDRW as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a CD-RW.
10.5.96
DRDeviceMediaTypeDVDPlusR as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a DVD+R.
10.5.97
DRDeviceMediaTypeDVDPlusRDoubleLayer as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a DVD+R Double Layer.
10.5. CLASS DRDEVICEMBS
10.5.98
649
DRDeviceMediaTypeDVDPlusRW as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a DVD+RW.
10.5.99
DRDeviceMediaTypeDVDPlusRWDoubleLayer as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a DVD+RW Double Layer.
10.5.100
DRDeviceMediaTypeDVDR as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a DVD+RW.
10.5.101
DRDeviceMediaTypeDVDRAM as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a DVD-RAM.
10.5.102
DRDeviceMediaTypeDVDRDualLayer as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a DVD-R DL.
650
10.5.103
CHAPTER 10. DISCRECORDING
DRDeviceMediaTypeDVDROM as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a DVD-ROM.
10.5.104
DRDeviceMediaTypeDVDRW as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a DVD-RW.
10.5.105
DRDeviceMediaTypeDVDRWDualLayer as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a DVD-RW DL.
10.5.106
DRDeviceMediaTypeHDDVDR as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a HD DVD-R.
10.5.107
DRDeviceMediaTypeHDDVDRAM as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a HD DVD-RAM.
10.5.108
DRDeviceMediaTypeHDDVDRDualLayer as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a HD DVD-R DL.
10.5. CLASS DRDEVICEMBS
10.5.109
651
DRDeviceMediaTypeHDDVDROM as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a HD DVD-ROM.
10.5.110
DRDeviceMediaTypeHDDVDRW as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a HD DVD-RW.
10.5.111
DRDeviceMediaTypeHDDVDRWDualLayer as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: Media is a HD DVD-RW DL.
10.5.112
DRDeviceMediaTypeKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes: String containing the type of media inserted in the device.
10.5.113
DRDeviceMediaTypeUnknown as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDeviceMediaTypeKey.
Notes: The type of the media cannot be determined.
10.5.114
DRDeviceMediaUsedSpaceKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the DRDeviceMediaInfoKey dictionary.
Notes: MSF value of the amount of space currently used for exising data.
652
10.5.115
CHAPTER 10. DISCRECORDING
DRDevicePhysicalInterconnectATAPI as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDevicePhysicalInterconnectKey.
Notes: Device is connected on an ATAPI interface.
10.5.116
DRDevicePhysicalInterconnectFibreChannel as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDevicePhysicalInterconnectKey.
Notes: Device is connected through a Fibre Channel interface.
10.5.117
DRDevicePhysicalInterconnectFireWire as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDevicePhysicalInterconnectKey.
Notes: Device is connected through a Firewire interface.
10.5.118
DRDevicePhysicalInterconnectKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the info method.
Notes: String describing the connection of the device to the computer.
10.5.119
DRDevicePhysicalInterconnectLocationExternal as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDevicePhysicalInterconnectLocationKey.
Notes: Device is connected to the machine externally.
10.5.120
DRDevicePhysicalInterconnectLocationInternal as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDevicePhysicalInterconnectLocationKey.
Notes: Device is connected to the machine internally.
10.5. CLASS DRDEVICEMBS
10.5.121
653
DRDevicePhysicalInterconnectLocationKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the info method.
Notes: String describing the location of the device (e.g. internal/external).
10.5.122
DRDevicePhysicalInterconnectLocationUnknown as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDevicePhysicalInterconnectLocationKey.
Notes: It’s not known how the device is connected.
10.5.123
DRDevicePhysicalInterconnectSCSI as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDevicePhysicalInterconnectKey.
Notes: Device is connected on a SCSI interface.
10.5.124
DRDevicePhysicalInterconnectUSB as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the possible
values of the DRDevicePhysicalInterconnectKey.
Notes: Device is connected through a USB interface.
10.5.125
DRDeviceProductNameKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the info method.
Example:
// shows all devices with their product names:
dim devices() as DRDeviceMBS = DRDeviceMBS.devices
for each dd as DRDeviceMBS in devices
MsgBox dd.info.lookup(DRDeviceMBS.DRDeviceProductNameKey, ”?”)
next
654
CHAPTER 10. DISCRECORDING
Notes: String containing the product name extracted from the device.
10.5.126
DRDeviceStatusChangedNotification as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the
notification names used with a DRBurn object.
Notes:
Posted by a DRNotificationCenter when the media in a device changes state. This can include being ejected,
inserted, becoming busy, etc.
The object for this notification is the device who’s media is changing state. The userInfo for this notification
is the same dictionary returned by status for that device.
10.5.127
DRDeviceSupportLevelAppleShipping as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the values
for DRDeviceSupportLevelKey.
Notes: This value indicates this device is shipping in some Apple machine.
10.5.128
DRDeviceSupportLevelAppleSupported as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the values
for DRDeviceSupportLevelKey.
Notes: This value indicates this device has been tested by Apple for support.
10.5.129
DRDeviceSupportLevelKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the info method.
Notes: String describing the support level the device enjoys from the engine.
10.5.130
DRDeviceSupportLevelNone as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the values
for DRDeviceSupportLevelKey.
Notes: This value indicates this device is not supported.
10.5. CLASS DRDEVICEMBS
10.5.131
655
DRDeviceSupportLevelUnsupported as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the values
for DRDeviceSupportLevelKey.
Notes: This value indicates the device is unsupported, but the engine will try to use it anyway.
10.5.132
DRDeviceSupportLevelVendorSupported as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the values
for DRDeviceSupportLevelKey.
Notes: This value indicates this device has been tested by a third party for support.
10.5.133
DRDeviceTrackInfoKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the status method.
Notes: Dictionary containing dictionaries describing the tracks. DRTracks from the DRDeviceTrackRefsKey
are used as keys into this dictionary.
10.5.134
DRDeviceTrackRefsKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the status method.
Notes: An array containing a list of DRTrack objects describing any tracks that are already on the disc.
10.5.135
DRDeviceVendorNameKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the info method.
Notes: String containing the vendor name extracted from the device.
10.5.136
DRDeviceWriteBufferSizeKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the info method.
Notes: Number containing the size of the write buffer of the device.
656
10.5.137
CHAPTER 10. DISCRECORDING
DRDeviceWriteCapabilitiesKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the keys in
the dictionary returned by the info method.
Notes: Dictionary containing the capabilities of the device for writing different kinds of media.
10.5.138
ejectMedia as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Commands the
device to eject the media.
Notes:
This command first unmounts any volumes associated with the media and then eject the media from the
drive. If the media could not be ejected, most likely this is because a volume associated with the media
could not be unmounted.
Returns true if the media could be ejected and false if not.
10.5.139
info as dictionary
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a dictionary
of information describing the device.
Notes: The information returned include the types of media the device can write to, how it’s connected
and its identifying information such as the vendor and product name.
10.5.140
ioRegistryEntryPath as string
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the path to
the device in the IO Registry.
10.5.141
isEqualToDevice(value as DRDeviceMBS) as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Compares the
receiver to another device.
Notes: Returns true if the receiver is equal to otherDevice.
10.5. CLASS DRDEVICEMBS
10.5.142
657
isValid as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns whether or
not the device represented by the receiver is still attached to the computer.
Notes:
Because of the way some physical interconnects work, a device which is unplugged and replugged in does
not necessarily look like the same device to the computer and would be invalid in that instance.
Returns true if the device is valid and false if not.
10.5.143
mediaIsAppendable as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns true if the
media in the device can have more data appended to any existing data.
10.5.144
mediaIsBlank as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns true the
media in the device is blank.
10.5.145
mediaIsBusy as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns true if the
media is in use by some process - even the one making this call.
10.5.146
mediaIsErasable as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns true if the
media can be erased (i.e., CD-RW, DVD-RW, etc).
10.5.147
mediaIsOverwritable as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns true if the
media in the device can be fully (re)written.
658
10.5.148
CHAPTER 10. DISCRECORDING
mediaIsPresent as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Reports the presence
of the media.
10.5.149
mediaIsReserved as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns true if the
application calling this method currently holds the reservation on the media.
10.5.150
mediaIsTransitioning as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns true if the
media is in transition (spinning up or down for example).
10.5.151
mediaSpaceFree as DRMSFMBS
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the amount
of free space on the media.
10.5.152
mediaSpaceOverwritable as DRMSFMBS
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the amount
of writable space on the media.
10.5.153
mediaSpaceUsed as DRMSFMBS
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the amount
of used space on the media.
10.5.154
mediaType as string
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the type of
media currently inserted into the device.
10.5. CLASS DRDEVICEMBS
10.5.155
659
openTray as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Commands the
device to open it’s tray.
Notes:
Does nothing if the device does not have a tray (slotload). If there is media in the drive this method will do
nothing and return false. In this case use ejectMedia to eject the media and open the tray.
Returns true if the tray could be opened and false if not.
10.5.156
PhysicalInterconnect as string
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The connection of
the device to the computer.
10.5.157
PhysicalInterconnectLocation as string
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The location of the
device (internal/external/unknown).
Notes: Use the DRDevicePhysicalInterconnectLocation* constants.
10.5.158
releaseExclusiveAccess
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Releases the latest
exclusive access request for the device.
Notes: A call to this method must be made for every call to acquireExclusiveAccess, otherwise the process
will never release its exclusive access.
10.5.159
releaseMediaReservation
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Releases any media
reservation that might be in place for the device.
Notes: If media is inserted and reserved, then the reservation will be passed on to the next process with a
reservation request.
660
10.5.160
CHAPTER 10. DISCRECORDING
status as dictionary
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a dictionary
of information describing the media in the device.
Notes: In addition to information about the media (type, space available/used, etc), the dictionary returned
includes those pieces of information about the device itself which are in part determined by the media (i.e.,
maximum burn speed).
10.5.161
trayIsOpen as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Reports the tray
state of the device.
Notes: Returns true if the device has a tray and it is open.
10.5.162
writesCD as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Reports the device’s
ability to burn to CD-type media.
Notes: Returns true if the device has the ability to write to CD-R media.
10.5.163
writesDVD as boolean
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Reports the device’s
ability to burn to DVD-type media.
Notes: Returns true if the device has the ability to write to DVD-R media.
10.6. CLASS DRERASEMBS
10.6
class DREraseMBS
10.6.1
class DREraseMBS
661
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Perform and monitor
the erasing a rewritable CD or DVD disc.
Notes: All methods in this class will catch exceptions from Cocoa and raise a NSExceptionMBS instead.
Using the message, name and reason properties you can see what was the reason for this exception. Please
report if you find a method which does not handle exceptions correct.
10.6.2
Methods
10.6.3
Constructor(device as DRDeviceMBS)
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Initializes an erase
object.
10.6.4
device as DRDeviceMBS
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns the device
being used for the erase.
10.6.5
DREraseStatusChangedNotification as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the notification names you can use to register notifications on the erase status.
10.6.6
DREraseTypeComplete as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A constant to be
used for the eraseType property.
Notes: Configures the erase object to perform a complete erase, erasing every byte on the disk. This operation is slow (on the order of 30 minutes) to complete.
662
10.6.7
CHAPTER 10. DISCRECORDING
DREraseTypeKey as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the property
names in the properties dictionary of the erase object.
10.6.8
DREraseTypeQuick as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: A constant to be
used for the eraseType property.
Notes: Configures the erase object to perform a quick erase, doing the minimal amount of work to make
the disc appear blank. This operation typically takes only a minute or two.
10.6.9
eraseForDevice(device as DRDeviceMBS) as DREraseMBS
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates and returns
an erase object.
Notes: Returns nil on any error.
10.6.10
start
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Begin the process of
erasing media.
Notes: This method only kicks off the erase. Once the erasure starts, control returns to the caller.
10.6.11
status as dictionary
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Returns a dictionary
containing the status of the erase.
Notes: The same dictionary is returned through the DREraseStatusChangedNotification notification.
10.6.12
Properties
10.6.13
eraseType as string
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The type of erase to
be performed.
10.6. CLASS DRERASEMBS
663
Notes: (Read and Write computed property)
10.6.14
properties as dictionary
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The properties
dictionary of the erase.
Notes: (Read and Write computed property)
664
CHAPTER 10. DISCRECORDING
10.7
class DREraseProgressPanelMBS
10.7.1
class DREraseProgressPanelMBS
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Panel to display
progress while erasing media.
Notes:
All methods in this class will catch exceptions from Cocoa and raise a NSExceptionMBS instead. Using the
message, name and reason properties you can see what was the reason for this exception. Please report if
you find a method which does not handle exceptions correct.
Subclass of the NSPanelMBS class.
10.7.2
Methods
10.7.3
beginProgressPanelForErase(erase as DREraseMBS)
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Presents the progress
panel on screen and begins the erase process.
Notes: This method returns control to the caller after it has displayed the progress sheet and begun the
erase. Once the method has returned the caller can perform other operations while the erase continues.
10.7.4
beginProgressSheetForErase(erase as DREraseMBS, docWindow as NSWindowMBS)
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Presents the
progress panel as a sheet and begins the erase process.
Notes:
erase: The object performing the erase.
docWindow: The window the sheet will be attached to. If docWindow is not nil, the panel slides down as a
sheet running as a document modal window. If owner is nil, this is an error.
This method returns control to the caller after it has displayed the progress sheet and begun the erase. Once
the method has returned the caller can perform other operations while the erase continues.
10.7.5
Constructor
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor
which creates the erase progress panel.
10.7. CLASS DRERASEPROGRESSPANELMBS
10.7.6
665
DREraseProgressPanelDidFinishNotification as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the
notification names for use with an erase progress panel.
Notes:
Posted when the DREraseProgressPanel has finished and is about to go away.
This notification contains a notification object but no userInfo dictionary. The notification object is the
DREraseProgressPanel that will be closed.
10.7.7
DREraseProgressPanelWillBeginNotification as string
Plugin Version: 10.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: One of the
notification names for use with an erase progress panel.
Notes:
Posted when the DREraseProgressPanel is about to begin displaying progress.
This notification contains a notification object but no userInfo dictionary. The notification object is the
DREraseProgressPanel thatwill be displayed.
10.7.8
Properties
10.7.9
Description as string
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The description
string displayed in the panel.
Notes:
If no description is explicitly set, this method will return the standard text string.
The panel’s description is typically a short text string that gives an indication to the user what operation is
being performed. If no description is explicitly set, the progress panel uses a standard text string suitable
to the erase.
(Read and Write computed property)
666
CHAPTER 10. DISCRECORDING
10.7.10
Events
10.7.11
eraseProgressPanelDidFinish
Plugin Version: 7.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Notification sent by
the panel after ordering out.
10.7.12
eraseProgressPanelEraseDidFinish(erase as DREraseMBS) as boolean
Plugin Version: 7.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Allows the delegate
to handle the end-of-erase feedback.
Notes: This method allows the delegate to handle or modify the end-of-erase feedback performed by the
progress panel. Return true to indicate the delegate handled the erase completion and the standard feedback
should be supressed. If this method returns false, the normal end-of-erase handling is performed (displaying
an error if appropriate, playing an ”I’m done” sound, etc). The delegate is messaged before the progress
panel is ordered out so a sheet may be displayed on a progress panel displayed as a window.
10.7.13
eraseProgressPanelWillBegin
Plugin Version: 7.4, Console & Web: No, Mac: Yes, Win: No, Linux: No. Function: Notification sent by
the panel before display.
10.8. CLASS DRERASESETUPPANELMBS
10.8
class DREraseSetupPanelMBS
10.8.1
class DREraseSetupPanelMBS
667
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Manages a panel
that allows users to specify the parameters of an erase.
Notes:
This class supports choosing the device to use and what sort of erase to perform. When the panel is closed
by the user choosing to erase the media in the device, the device is exclusively held by the application for
its own use to prevent possible bad or corrupt media from causing problem for the rest of the system. This
means that if the erase object obtained from the panel is not used to do an erase, the device will remain
unavailable to other applications until the exclusive access is released.
Subclass of the DRSetupPanelMBS class.
10.8.2
Methods
10.8.3
Constructor
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: The constructor to
create the erase setup panel.
Example:
dim d as DREraseSetupPanelMBS
d=new DREraseSetupPanelMBS
call d.runSetupPanel
10.8.4
eraseObject as DREraseMBS
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates and returns
a new DRErase object that’s configured to erase the disc in the currently selected device.
Notes:
The new DRErase object is configured based on the settings in the setup panel when the user clicks the OK
button.
Do not invoke this method within a modal session runSetupPanel because the erase object information is
only updated just before the modal session ends.
Returns a new DRErase object.
668
CHAPTER 10. DISCRECORDING
10.9
class DRFileMBS
10.9.1
class DRFileMBS
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Represents a file to
be created on the disc.
Notes:
A file can be either a pointer to an exiting file (residing on a hard drive for example) or can be created at
burn time from data passed into the file object as requested. DRFiles can only exist inside of DRFolder
objects.
All methods in this class will catch exceptions from Cocoa and raise a NSExceptionMBS instead. Using the
message, name and reason properties you can see what was the reason for this exception. Please report if
you find a method which does not handle exceptions correct.
Subclass of the DRFSObjectMBS class.
10.9.2
Methods
10.9.3
Constructor
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Dummy constructor.
See also:
• 10.9.4 Constructor(name as string)
668
• 10.9.5 Constructor(name as string, data as memoryblock)
669
• 10.9.6 Constructor(path as folderitem)
669
10.9.4
Constructor(name as string)
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a ”virtual”
file object.
Notes:
This type of DRFile burns the data produced to the output disc, creating a file with the passed in name.
You need to subclass the DRFileMBS class and handle the events.
See also:
• 10.9.3 Constructor
668
• 10.9.5 Constructor(name as string, data as memoryblock)
669
• 10.9.6 Constructor(path as folderitem)
669
10.9. CLASS DRFILEMBS
10.9.5
669
Constructor(name as string, data as memoryblock)
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Creates a ”virtual”
file object.
Notes: This type of DRFile burns the data passed in to disc, creating a file with the passed in name.
See also:
• 10.9.3 Constructor
668
• 10.9.4 Constructor(name as string)
668
• 10.9.6 Constructor(path as folderitem)
669
10.9.6
Constructor(path as folderitem)
Plugin Version: 7.4, Console & Web: Yes, Mac: Yes, Win: No, Linux: No. Function: Initializes a ”real”
file object
Notes: This type of DRFile