(informal protocol)
Adopted by | |
Framework | /System/Library/Frameworks/Quartz.framework/ImageKit.framework |
Declared in | IKImageBrowserView.h |
The IKImageBrowserDataSource
informal protocol declares the methods that an instance of the IKImageBrowserView
class uses to access the contents of its data source object.
– imageBrowser:removeItemsAtIndexes:
– imageBrowser:moveItemsAtIndexes:toIndex:
– imageBrowser:writeItemsAtIndexes:toPasteboard:
Returns the group at the specified index.
- (NSDictionary *) imageBrowser:(IKImageBrowserView *) aBrowser groupAtIndex:(NSUInteger) index;
An image browser view.
The index of the group you want to retrieve.
A dictionary that defines the group. The keys in this dictionary can be any of the following constants: IKImageBrowserGroupStyle
, IKImageBrowserGroupBackgroundColorKey
, IKImageBrowserGroupTitleKey
, and IKImageBrowserGroupRangeKey
. For more information on these constants, see IKImageBrowserView Class Reference.
This method is optional.
IKImageBrowserView.h
Returns an object for the item in an image browser view that corresponds to the specified index.
- (id) imageBrowser:(IKImageBrowserView *) aBrowser itemAtIndex:(NSUInteger)index;
An image browser view.
The index of the item you want to retrieve.
An IKImageBrowserItem
object.
Your data source must implement this method. The returned object must implement the required methods of the IKImageBrowserItem
protocol.
IKImageBrowserView.h
Signals that the specified items should be moved to the specified destination.
- (BOOL) imageBrowser:(IKImageBrowserView *) aBrowser moveItemsAtIndexes: (NSIndexSet *)indexes toIndex:(NSUInteger)destinationIndex;
An image browser view.
The indexes of the items that should be reordered.
The starting index of the destination the items should be moved to.
YES
if successful; NO
otherwise.
This method is optional. It is invoked by the image browser view after Image Kit determines that a reordering operation should be applied. The data source should update itself by reordering its elements.
IKImageBrowserView.h
Signals that a remove operation should be applied to the specified items.
- (void) imageBrowser:(IKImageBrowserView *) aBrowser removeItemsAtIndexes:(NSIndexSet *) indexes;
An image browser view.
The indexes of the items that should be removed.
This method is optional. It is invoked by the image browser after Image Kit determines that a remove operation should be applied. In response, the data source should update itself by removing the specified items.
IKImageBrowserView.h
Signals that a drag should begin.
- (NSUInteger) imageBrowser:(IKImageBrowserView *) aBrowser writeItemsAtIndexes:(NSIndexSet *) itemIndexes toPasteboard:(NSPasteboard *)pasteboard;
An image browser view.
The indexes of the items that should be dragged.
The pasteboard to copy the items to.
The number of items written to the pasteboard.
This method is optional. It is invoked after Image Kit determines that a drag should begin, but before the drag has been started.
IKImageBrowserView.h
Returns the number of groups in an image browser view.
- (NSUInteger) numberOfGroupsInImageBrowser:(IKImageBrowserView *) aBrowser;
An image browser view.
The number of groups.
This method is optional.
IKImageBrowserView.h
Returns the number of records managed by the data source object.
- (NSUInteger) numberOfItemsInImageBrowser:(IKImageBrowserView *) aBrowser;
An image browser view.
The number of records managed by the image browser view.
Your data source must implement this method. An IKImageView
object uses this method to determine how many cells it should create and display.
IKImageBrowserView.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-07-17)