IKImageBrowserItem Protocol Reference

(informal protocol)

Framework
System/Library/Frameworks/Quartz.framework/ImageKit.framework
Availability
Available in OS X v10.5 and later.
Declared in
IKImageBrowserView.h

Overview

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.

Tasks

Providing Required Information for an Image

Providing Optional Information for an Image

Instance Methods

imageRepresentation

Returns the image to display.

- (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.

Availability
  • Available in OS X v10.5 and later.
Declared In
IKImageBrowserView.h

imageRepresentationType

Returns the representation type of the image to display.

- (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.

Availability
  • Available in OS X v10.5 and later.
Declared In
IKImageBrowserView.h

imageSubtitle

Returns the display subtitle of the image.

- (NSString *) imageSubtitle
Return Value

The display subtitle of the image.

Discussion

This method is optional.

Availability
  • Available in OS X v10.5 and later.
Declared In
IKImageBrowserView.h

imageTitle

Returns the display title of the image.

- (NSString *) imageTitle;
Return Value

The display title of the image.

Discussion

This method is optional.

Availability
  • Available in OS X v10.5 and later.
Declared In
IKImageBrowserView.h

imageUID

Returns a unique string that identifies the data source item.

- (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.

Availability
  • Available in OS X v10.5 and later.
Declared In
IKImageBrowserView.h

imageVersion

Returns the version of the item.

- (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.

Availability
  • Available in OS X v10.5 and later.
Related Sample Code
Declared In
IKImageBrowserView.h

isSelectable

Returns whether this item is selectable.

- (BOOL) isSelectable;
Return Value

YES if the item is selectable; NO otherwise.

Discussion

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

Availability
  • Available in OS X v10.5 and later.
Related Sample Code
Declared In
IKImageBrowserView.h

Constants

Image Representation Types

Representation types for images.

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).

Available in OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserNSURLRepresentationType

An NSURLobject.

Available in OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserNSImageRepresentationType

An NSImage object.

Available in OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserCGImageRepresentationType

A CGImageRef object.

Available in OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserCGImageSourceRepresentationType

A CGImageSourceRef object.

Available in OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserNSDataRepresentationType

An NSData object.

Available in OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserNSBitmapImageRepresentationType

An NSBitmapImageRep object.

Available in OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserQTMovieRepresentationType

A QTMovie object.

Available in OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserQTMoviePathRepresentationType

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

Available in OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserQCCompositionRepresentationType

A QCComposition object.

Available in OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserQCCompositionPathRepresentationType

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

Available in OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserQuickLookPathRepresentationType

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

Available in OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserIconRefPathRepresentationType

A path to an icon.

Available in OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserIconRefRepresentationType

An icon.

Available in OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserPDFPageRepresentationType

A PDFPage instance or a CGPDFPageRef.

Available in OS X v10.6 and later.

Declared in IKImageBrowserView.h.

Declared In
IKImageBrowserView.h