Mac Developer Library

Developer

IKImageBrowserItem Protocol Reference

Options
Deployment Target:

On This Page
Language:

IKImageBrowserItem

The IKImageBrowserItem informal protocol declares the methods that an instance of the IKImageBrowserView class uses to access the contents of its data source for a given item. Some of the methods in this protocol are needed frequently, so you should implement them efficiently.

  • Returns a unique string that identifies the data source item.

    Declaration

    - (NSString *) imageUID;

    Return Value

    The string that identifies the data source item

    Discussion

    Your data source must implement this method. The image browser view uses this identifier to associate the data source item and its cache.

  • Returns the representation type of the image to display.

    Declaration

    - (NSString *) imageRepresentationType;

    Return Value

    A string that specifies the image representation type. The string can be any of the constants defined in “Image Representation Types”.

    Discussion

    Your data source must implement this method.

  • Returns the image to display.

    Declaration

    - (id) imageRepresentation;

    Return Value

    The image to display; can return nil if the item has no image to display.

    Discussion

    Your data source must implement this method. This method is called frequently, so the receiver should cache the returned instance.

  • Returns the version of the item.

    Declaration

    - (NSUInteger) imageVersion;

    Return Value

    The version of the item.

    Discussion

    This method is optional. The receiver can return a new version to let the image browser know that it should not use its cache for the item.

  • Returns the display title of the image.

    Declaration

    - (NSString *) imageTitle;

    Return Value

    The display title of the image.

    Discussion

    This method is optional.

  • Returns the display subtitle of the image.

    Declaration

    - (NSString *) imageSubtitle

    Return Value

    The display subtitle of the image.

    Discussion

    This method is optional.

  • Returns whether this item is selectable.

    Declaration

    - (BOOL) isSelectable;

    Return Value

    YEStrue if the item is selectable; NOfalse otherwise.

    Discussion

    This method is optional. You can prevent selection of this item by returning NOfalse.

  • Representation types for images.

    Declaration

    NSString * const IKImageBrowserPathRepresentationType; NSString * const IKImageBrowserNSURLRepresentationType; NSString * const IKImageBrowserNSImageRepresentationType; NSString * const IKImageBrowserCGImageRepresentationType; NSString * const IKImageBrowserCGImageSourceRepresentationType; NSString * const IKImageBrowserNSDataRepresentationType; NSString * const IKImageBrowserNSBitmapImageRepresentationType; NSString * const IKImageBrowserQTMovieRepresentationType; NSString * const IKImageBrowserQTMoviePathRepresentationType; NSString * const IKImageBrowserQCCompositionRepresentationType; NSString * const IKImageBrowserQCCompositionPathRepresentationType; NSString * const IKImageBrowserQuickLookPathRepresentationType; NSString * const IKImageBrowserIconRefPathRepresentationType; NSString * const IKImageBrowserIconRefRepresentationType; NSString * const IKImageBrowserPDFPageRepresentationType;

    Constants

    • IKImageBrowserPathRepresentationType

      A path representation (NSString).

    • IKImageBrowserNSURLRepresentationType

      An NSURLobject.

    • IKImageBrowserNSImageRepresentationType

      An NSImage object.

    • IKImageBrowserCGImageRepresentationType

      A CGImageRef object.

    • IKImageBrowserCGImageSourceRepresentationType

      A CGImageSourceRef object.

    • IKImageBrowserNSDataRepresentationType

      An NSData object.

    • IKImageBrowserNSBitmapImageRepresentationType

      An NSBitmapImageRep object.

    • IKImageBrowserQTMovieRepresentationType

      A QTMovie object.

    • IKImageBrowserQTMoviePathRepresentationType

      A path (NSString) or URL (NSURL) to a QuickTime movie.

    • IKImageBrowserQCCompositionRepresentationType

      A QCComposition object.

    • IKImageBrowserQCCompositionPathRepresentationType

      A path (NSString) or URL (NSURL) to a Quartz Composer composition.

    • IKImageBrowserQuickLookPathRepresentationType

      A path (NSString) or URL (NSURL) to load data using QuickLook.

    • IKImageBrowserIconRefPathRepresentationType

      A path to an icon.

    • IKImageBrowserIconRefRepresentationType

      An icon.

    • IKImageBrowserPDFPageRepresentationType

      A PDFPage instance or a CGPDFPageRef.