outlineView:createNewItemAtChildIndex:ofItem: |
- ( BOOL ) outlineView: (id ) sender createNewItemAtChildIndex: (int ) childIndex ofItem: (id ) item;
This method is sent by the -createNewItem: action method to ask the dataSource to create a new item at a given childIndex of a given parent item in the outline. If the dataSource is able to successfully create the item it should return YES, if it cannot create the item for any reason it should return NO.
- sender
- The sending MOExtendedOutlineView.
- childIndex
- The child index where the new item should be inserted within the given parent.
- item
- The parent item that the new item should be inserted into.
outlineView:deleteItems: |
- ( BOOL ) outlineView: (id ) sender deleteItems: (NSArray *) items;
This method is sent by the -delete: and -cut: action methods to ask the dataSource to delete one or more items. The array is guaranteed to be sorted in ascending row index order. If the dataSource is able to successfully delete the items it should return YES, if it cannot delete the items for any reason it should return NO. If this method does not alter the selection, then the outline will deselect all rows after a successful deletion.
- sender
- The sending MOExtendedOutlineView.
- items
- The array of items.
outlineView:draggedImage:beganAt: |
- ( void ) outlineView: (id ) sender draggedImage: (NSImage *) image beganAt: (NSPoint ) screenPoint;
Data source method for notification of drag source activity. This method is invoked from MOExtendedOutlineView's -draggedImage:beganAt: implementation if the dataSource responds.
- sender
- The sending MOExtendedOutlineView.
- image
- The drag image.
- screenPoint
- The screen point where the drag began.
outlineView:draggedImage:endedAt:operation: |
- ( void ) outlineView: (id ) sender draggedImage: (NSImage *) image endedAt: (NSPoint ) screenPoint operation: (NSDragOperation ) operation;
Data source method for notification of drag source activity. This method is invoked from MOExtendedOutlineView's -draggedImage:endedAt:operation: implementation if the dataSource responds.
- sender
- The sending MOExtendedOutlineView.
- image
- The drag image.
- screenPoint
- The screen point where the drag ended.
- operation
- The operation that was performed (or NSDragOperationNone if the drag was not successful).
outlineView:draggedImage:movedTo: |
- ( void ) outlineView: (id ) sender draggedImage: (NSImage *) image movedTo: (NSPoint ) screenPoint;
Data source method for notification of drag source activity. This method is invoked from MOExtendedOutlineView's -draggedImage:movedTo: implementation if the dataSource responds.
- sender
- The sending MOExtendedOutlineView.
- image
- The drag image.
- screenPoint
- The screen point where the drag is currently.
outlineView:draggingSourceOperationMaskForLocal: |
- ( NSDragOperation ) outlineView: (id ) sender draggingSourceOperationMaskForLocal: (BOOL ) localFlag;
This method is invoked from MOExtendedOutlineView's draggingSourceOperationMaskForLocal: implementation if the dataSource responds.
- sender
- The sending MOExtendedOutlineView.
- localFlag
- Whether the drag destination is in the current application or a different one.
outlineView:readItemsFromPasteboard:item:childIndex:pasteboardSourceType: |
- ( BOOL ) outlineView: (id ) sender readItemsFromPasteboard: (NSPasteboard *) pboard item: (id ) item childIndex: (int ) childIndex pasteboardSourceType: (MOPasteboardSourceType ) sourceType;
This method provides a single funnel point for reading items from the pasteboard for drag&frop, copy/paste, and Services. It is sent by the outlines' -paste: and -readSelectionFromPasteboard: methods. It is also sent from MOKit's delfault NSObject implementation of the standard NSOutlineView drag&drop dataSource method -outlineView:acceptDrop:item:childIndex:. An implementation should read the data from the pasteboard and insert new items (usually).
In case the exact semantics for handling the different kinds of operations is required, an enumeration constant is passed in that identifies why the method is being called (ie whether it is for copy/paste or drag&drop or Services.) For drag&drop the constant also tells you whether the source of the new rows is the same outline that is receiving them or some other source.
For copy/paste and Services, the child index and item will be computed so that the new rows will be inserted as siblings after the last selected item. In some circumstances for copy/paste or for Services, especially, you may want to ignore the childIndex and item parameters and work directly from the selection. For instance, if a Service took row data as input from the selected rows, you may want to replace the selected rows with the output data. Note that for Services to be enabled, someone must call NSApplication's -registerServicesMenuSendTypes:returnTypes: with arrays of the supported send and return types to make the application globally aware that these types are supported.
For drag&drop, you can use the information about whether the source was the same outline to decide whether to move or copy the rows by default. Note also that to accept drops, someone must register the outline for the drop types it supports by sending the outline a -registerForDraggedTypes: message.
- sender
- The sending MOExtendedOutlineView.
- pboard
- The pasteboard to read the data from.
- childIndex
- The child index of where to insert the new items within the given parent item. May be NSOutlineViewDropOnItemIndex if the drop is "onto" an item instead of between two items.
- item
- The parent item into which the new items should be inserted. May be nil if the items should be inserted as top-level objects.
- sourceType
- Where the pasteboard came from (ie what sort of operation is happening).
outlineView:validRequestorForSendType:returnType: |
- ( id ) outlineView: (id ) sender validRequestorForSendType: (NSString *) sendType returnType: (NSString *) returnType;
This method is sent by -validRequestorForSendType:returnType: to validate Service menu items, and it is also sent by -validateUserInterfaceItem: to validate the Paste command. Implementors should return sender if the send and return types are able to be handled and nil otherwise. When this is sent to validate the Paste command, the sendType is nil and the returnType is one of the types currently on the pasteboard. Note that for Services to be enabled, someone must call NSApplication's -registerServicesMenuSendTypes:returnTypes: with arrays of the supported send and return types to make the application globally aware that these types are supported.
- sender
- The sending MOExtendedOutlineView.
- sendType
- The type of data that will be requested as input for a Service.
- returnType
- The type of data that will be provided as output for a Service or that is on the pasteboard for Paste.
outlineViewDraggingExited: |
- ( void ) outlineViewDraggingExited: (id ) sender;
This method is invoked from MOExtendedOutlineView's draggingExited: implementation if the dataSource responds.
- sender
- The sending MOExtendedOutlineView.
outlineViewIgnoreModifierKeysWhileDragging: |
- ( BOOL ) outlineViewIgnoreModifierKeysWhileDragging: (id ) sender;
Data source method for controlling whether modifiers are ignored. This method is invoked from MOExtendedOutlineView's -ignoreModifierKeysWhileDragging implementation if the dataSource responds.
- sender
- The sending MOExtendedOutlineView.
(Last Updated 3/20/2005)