NSObject(MOViewListViewDelegate)


Abstract

Informal delegate protocol for MOViewListView.

Discussion

Informal delegate protocol for MOViewListView. This category declares the methods that MOViewListView will send to its delegate if it implements them.



Methods

viewListView:shouldExpandViewListViewItem:
Control whether to allow expanding.
viewListView:willExpandViewListViewItem:
Tells the delegate that an item will expand.
viewListView:didExpandViewListViewItem:
Tells the delegate that an item did expand.
viewListView:shouldCollapseViewListViewItem:
Control whether to allow collapsing.
viewListView:willCollapseViewListViewItem:
Tells the delegate that an item will collapse.
viewListView:didCollapseViewListViewItem:
Tells the delegate that an item did collapse.
viewListView:writeItem:toPasteboard:
Writes the given view list view item to the pasteboard.
viewListView:dragEndedAtPoint:withOperation:forItem:
Notification that a drag of a label item has concluded.
viewListView:validateDrop:proposedItemIndex:proposedDropOperation:
Validates a proposed drop operation.
viewListView:acceptDrop:itemIndex:dropOperation:
Performs the drop.

viewListView:acceptDrop:itemIndex:dropOperation:

Performs the drop.
- ( BOOL ) viewListView:
        (MOViewListView *) viewListView acceptDrop:
        (id ) info itemIndex:
        (int ) itemIndex dropOperation:
        (MOViewListViewDropOperation ) op;

Performs the drop. This method is called when the mouse is released over a view list view that previously decided to allow a drop via the -viewListView:validateDrop:proposedItemIndex:proposedDropOperation: method. The delegate should incorporate the data from the dragging pasteboard at this time. The itemIndex and op will be whatever values were last passed to -setDropItemIndex:dropOperation: or, if the delegate never called that method, the last proposed index and op that were passed to the -viewListView:validateDrop:proposedItemIndex:proposedDropOperation: method.

Parameter Descriptions
viewListView
The sender.
info
The NSDraggingInfo for the in-progress drag operation.
itemIndex
The drop index.
op
The drop operation.
method result
Whether the drop was completed successfully.

viewListView:didCollapseViewListViewItem:

Tells the delegate that an item did collapse.
- ( void ) viewListView:
        (MOViewListView *) viewListView didCollapseViewListViewItem:
        (MOViewListViewItem *) viewListViewItem;

This method is sent to the delegate if it implements it whenever a view has been collapsed. This message is sent after the collapsing but before the final relayout and display of the MOViewListView.

Parameter Descriptions
viewListView
The MOViewListView whose item has collapsed.
viewListViewItem
The MOViewListViewItem that has collapsed.

viewListView:didExpandViewListViewItem:

Tells the delegate that an item did expand.
- ( void ) viewListView:
        (MOViewListView *) viewListView didExpandViewListViewItem:
        (MOViewListViewItem *) viewListViewItem;

This method is sent to the delegate if it implements it whenever a view has been expanded. This message is sent after the expanding but before the final relayout and display of the MOViewListView.

Parameter Descriptions
viewListView
The MOViewListView whose item has expanded.
viewListViewItem
The MOViewListViewItem that has expanded.

viewListView:dragEndedAtPoint:withOperation:forItem:

Notification that a drag of a label item has concluded.
- ( void ) viewListView:
        (MOViewListView *) viewListView dragEndedAtPoint:
        (NSPoint ) aPoint withOperation:
        (NSDragOperation ) dragOp forItem:
        (MOViewListViewItem *) item;

Notification that a drag of a label item has concluded. This method is called after a drag initiated by the view list view has ended. dragOp indicates what the operation was and can be used to determine if the drag succeeded or not.

Parameter Descriptions
viewListView
The sender.
aPoint
The drop point in screen coordinates.
dragOp
The drag operation (NSDragOperationNone if there was no successful drop).
item
The item for the tab that was dragged.

viewListView:shouldCollapseViewListViewItem:

Control whether to allow collapsing.
- ( BOOL ) viewListView:
        (MOViewListView *) viewListView 
        shouldCollapseViewListViewItem:
        (MOViewListViewItem *) viewListViewItem;

This method is sent to the delegate if it implements it whenever the user initiates collapsing one of the viewListView's stacked views. If the delegate returns NO, the collapsing is not allowed, otherwise it is.

Parameter Descriptions
viewListView
The MOViewListView whose item is collapsing. This method is not sent when collapsing is initiated by the programmer
viewListViewItem
The MOViewListViewItem that is collapsing.
method result
NO if the delegate wants to disallow the collapse, otherwise YES.

viewListView:shouldExpandViewListViewItem:

Control whether to allow expanding.
- ( BOOL ) viewListView:
        (MOViewListView *) viewListView shouldExpandViewListViewItem
        :
        (MOViewListViewItem *) viewListViewItem;

This method is sent to the delegate if it implements it whenever the user initiates expanding one of the viewListView's stacked views. If the delegate returns NO, the expanding is not allowed, otherwise it is. This method is not sent when expanding is initiated by the programmer.

Parameter Descriptions
viewListView
The MOViewListView whose item is expanding.
viewListViewItem
The MOViewListViewItem that is expanding.
method result
NO if the delegate wants to disallow the expansion, otherwise YES.

viewListView:validateDrop:proposedItemIndex:proposedDropOperation:

Validates a proposed drop operation.
- ( NSDragOperation ) viewListView:
        (MOViewListView *) viewListView validateDrop:
        (id ) info proposedItemIndex:
        (int ) itemIndex proposedDropOperation:
        (MOViewListViewDropOperation ) op;

Validates a proposed drop operation. This method is used by MOViewListView to determine a valid drop target. Based on the mouse position, the view list view will suggest a proposed drop location. This method must return a value that indicates which dragging operation the delegate will perform. The delegate may "re-target" a drop if desired by calling -setDropItemIndex:dropOperation: on the sender and then returning something other than NSDragOperationNone. One may choose to re-target for various reasons (eg. for better visual feedback when inserting into a sorted position). See the documentation for -setDropItemIndex:dropOperation: for more info on what the itemIndex and op mean.

Parameter Descriptions
viewListView
The sender.
info
The NSDraggingInfo for the in-progress drag operation.
itemIndex
The proposed drop index.
op
The proposed drop operation.
method result
The drag operation that would occur if the drop happened at the current point.

viewListView:willCollapseViewListViewItem:

Tells the delegate that an item will collapse.
- ( void ) viewListView:
        (MOViewListView *) viewListView willCollapseViewListViewItem
        :
        (MOViewListViewItem *) viewListViewItem;

This method is sent to the delegate if it implements it whenever a view is about to be collapsed.

Parameter Descriptions
viewListView
The MOViewListView whose item is collapsing.
viewListViewItem
The MOViewListViewItem that is collapsing.

viewListView:willExpandViewListViewItem:

Tells the delegate that an item will expand.
- ( void ) viewListView:
        (MOViewListView *) viewListView willExpandViewListViewItem:
        (MOViewListViewItem *) viewListViewItem;

This method is sent to the delegate if it implements it whenever a view is about to be expanded. A common reason to implement this is to make sure the item's view is loaded and ready to be displayed.

Parameter Descriptions
viewListView
The MOViewListView whose item is expanding.
viewListViewItem
The MOViewListViewItem that is expanding.

viewListView:writeItem:toPasteboard:

Writes the given view list view item to the pasteboard.
- ( BOOL ) viewListView:
        (MOViewListView *) viewListView writeItem:
        (MOViewListViewItem *) item toPasteboard:
        (NSPasteboard *) pboard;

Writes the given view list view item to the pasteboard. This method is invoked by MOViewListView when the user starts to drag a label. To refuse the drag, return NO. To start a drag, return YES and place the drag data onto the pasteboard (data, owner, etc...). The drag image and other drag related information will be set up and provided by the view list view once this call returns with YES.

Parameter Descriptions
viewListView
The sender.
item
The item for the label being dragged.
pboard
The pasteboard to write to.
method result
Whether the delegate wrote the item to the pasteboard.

(Last Updated 3/20/2005)