Next Page > Hide TOC

IKImageBrowserView Class Reference

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

Overview

The IKImageBrowserView class is a view for displaying and browsing a large amount of images and movies efficiently.

Tasks

Initializing and Setting Up an Image Browser View

Setting the Appearance

Zooming and Resizing

Scrolling

Setting and Getting Cell Size

Getting Item Information

Reordering and Groups Items

Supporting Drag and Drop

Instance Methods

allowsEmptySelection

Returns whether an empty selection is allowed.

- (BOOL) allowsEmptySelection;

Return Value

YES if the receiver allows an empty selection; NO otherwise.

Availability
See Also
Declared In
IKImageBrowserView.h

allowsMultipleSelection

Returns whether multiple selections are allowed.

- (BOOL) allowsMultipleSelection;

Return Value

YES if the receiver allows the user to select more than one cell at a time; NO otherwise.

Availability
See Also
Declared In
IKImageBrowserView.h

allowsReordering

Returns whether the user can reorder items.

- (BOOL) allowsReordering;

Return Value

YES if the user can reorder items; NO otherwise.

Availability
See Also
Declared In
IKImageBrowserView.h

animates

Returns whether the receiver animates reordering and changes of the data source.

- (BOOL) animates;

Return Value

YES if the receiver animates reordering and changes of the data source; NO otherwise.

Availability
See Also
Declared In
IKImageBrowserView.h

cellSize

Returns the cell size.

- (NSSize) cellSize;

Return Value

The current size for the cells in the image browser view.

Availability
Declared In
IKImageBrowserView.h

cellsStyleMask

Returns the appearance style mask for the cell.

- (NSUInteger) cellsStyleMask;

Return Value

The appearance style mask for the cell.

Availability
See Also
Declared In
IKImageBrowserView.h

collapseGroupAtIndex:

Collapses a group at the specified index.

- (void) collapseGroupAtIndex:(NSUInteger) index;

Parameters
index

The index of the group you want to collapse.

Availability
See Also
Declared In
IKImageBrowserView.h

constrainsToOriginalSize

Returns whether the receiver constrains the cell's image to its original size.

- (BOOL) constrainsToOriginalSize;

Return Value

NO if the image is not constrained; otherwise YES.

Availability
See Also
Declared In
IKImageBrowserView.h

contentResizingMask

Returns the receiver’s content resizing mask, which determines how its content is resized while zooming.

- (NSUInteger) contentResizingMask;

Return Value

The content resizing mask.

Availability
See Also
Declared In
IKImageBrowserView.h

dataSource

Returns the data source of the receiver.

- (id ) dataSource;

Return Value

The data source (IKImageBrowserDataSource). The data source is not retained by the receiver.

Availability
See Also
Declared In
IKImageBrowserView.h

delegate

Returns the delegate of the receiver.

- (id) delegate;

Return Value

The delegate.

Availability
See Also
Declared In
IKImageBrowserView.h

draggingDestinationDelegate

Returns the dragging destination delegate of the receiver.

- (id) draggingDestinationDelegate;

Return Value

The receiver's dragging destination delegate.

Availability
See Also
Declared In
IKImageBrowserView.h

expandGroupAtIndex:

Expands a group at the specified index.

- (void) expandGroupAtIndex:(NSUInteger) index;

Parameters
index

The index of the group you want to expand.

Availability
See Also
Declared In
IKImageBrowserView.h

indexAtLocationOfDroppedItem

Returns the index of the cell where the drop operation occurred.

- (NSUInteger) indexAtLocationOfDroppedItem;

Return Value

The index of the cell where the drop operation occurred.

Discussion

The returned index is valid until the next drop occurs.

Availability
Declared In
IKImageBrowserView.h

indexOfItemAtPoint:

Returns the index of the item at the specified location.

- (NSInteger) indexOfItemAtPoint: (NSPoint)point;

Parameters
point

The location of the item.

Return Value

The index of the item or NSNotFound if no item at this location.

Availability
Declared In
IKImageBrowserView.h

initWithFrame:

Initializes a newly allocated image browser view with the provided frame rectangle.

- (id) initWithFrame:(NSRect) frame;

Parameters
frame

The rectangle for the image browser.

Return Value

The initialized object.

Availability
Declared In
IKImageBrowserView.h

isGroupExpandedAtIndex:

Returns whether the group at the provided index is expanded.

- (BOOL) isGroupExpandedAtIndex:(NSUInteger) index;

Parameters
index

The index you want to check.

Return Value

YES if the group is expanded; NO otherwise.

Availability
See Also
Declared In
IKImageBrowserView.h

itemFrameAtIndex:

Returns the frame rectangle for the item located at the specified index.

- (NSRect) itemFrameAtIndex: (NSInteger)index;

Parameters
index

The index of the item whose frame rectangle you want to obtain.

Return Value

The frame rectangle of the item.

Availability
Declared In
IKImageBrowserView.h

reloadData

Marks the receiver as needing its data reloaded.

- (void) reloadData;

Availability
Declared In
IKImageBrowserView.h

scrollIndexToVisible:

Scrolls the receiver to the item at the specified index.

- (void) scrollIndexToVisible:(NSInteger) index;

Parameters
index

The index of the item to scroll to.

Availability
Declared In
IKImageBrowserView.h

selectionIndexes

Returns the indexes of the selected cells.

- (NSIndexSet *) selectionIndexes;

Return Value

The indexes of the selected cells.

Availability
See Also
Declared In
IKImageBrowserView.h

setAllowsEmptySelection:

Controls whether an empty selection is allowed.

- (void) setAllowsEmptySelection: (BOOL) flag;

Parameters
flag

A BOOL value that specifies whether to allow an empty selection.

Availability
See Also
Declared In
IKImageBrowserView.h

setAllowsMultipleSelection:

Controls whether the user can select more than one cell at a time.

- (void) setAllowsMultipleSelection: (BOOL) flag;

Parameters
flag

A BOOL value that specifies whether to allow multiple selections.

Availability
See Also
Declared In
IKImageBrowserView.h

setAllowsReordering:

Controls whether the user can reorder items.

- (void) setAllowsReordering: (BOOL) flag;

Parameters
flag

A BOOL value that specifies whether the user can reorder items.

Availability
See Also
Declared In
IKImageBrowserView.h

setAnimates:

Controls whether the receiver animates reordering and changes of the data source.

- (void) setAnimates: (BOOL) flag;

Parameters
flag

A BOOL value that specifies whether the receiver animates reordering and changes of the data source.

Availability
See Also
Declared In
IKImageBrowserView.h

setCellSize:

Sets the cell size.

- (void) setCellSize:(NSSize) size;

Parameters
size

The size to set.

Availability
Declared In
IKImageBrowserView.h

setCellsStyleMask:

Defines the appearance style of the cells.

- (void) setCellsStyleMask:(NSUInteger) mask;

Parameters
mask

An integer bit mask. A mask can be specified by combining any of the options described in “Cell Appearance Style Masks” using the C bitwise OR operator.

Availability
See Also
Declared In
IKImageBrowserView.h

setConstrainsToOriginalSize:

Sets whether the receiver constrains the cell’s image to its original size.

- (void) setConstrainsToOriginalSize: (BOOL) flag;

Parameters
flag

A flag that specifies whether to constrain the image. The default value is NO.

Availability
See Also
Declared In
IKImageBrowserView.h

setContentResizingMask:

Determines how the receiver resizes its content when zooming.

- (void) setContentResizingMask:(NSUInteger) mask;

Parameters
mask

A resizing mask. You specify a mask by combining any of the following options using the C bitwise OR operator: NSViewWidthSizable, NSViewHeightSizable. Other values are ignored.

Availability
See Also
Declared In
IKImageBrowserView.h

setDataSource:

Sets the data source of the receiver.

- (void) setDataSource:(id) source;

Parameters
source

A data source (IKImageBrowserDataSource).

Availability
See Also
Declared In
IKImageBrowserView.h

setDelegate:

Sets the delegate of the receiver.

- (void) setDelegate: (id) aDelegate;

Parameters
aDelegate

The delegate must implement the IKImageBrowserDelegate informal protocol.

Availability
See Also
Declared In
IKImageBrowserView.h

setDraggingDestinationDelegate:

Sets the dragging destination delegate of the receiver.

- (void) setDraggingDestinationDelegate:(id) delegate;

Parameters
delegate

The delegate (NSDraggingDestination) to set.

Availability
See Also
Declared In
IKImageBrowserView.h

setSelectionIndexes:byExtendingSelection:

Selects cells at the specified indexes.

- (void) setSelectionIndexes:(NSIndexSet *) indexes byExtendingSelection:(BOOL) extendSelection;

Parameters
indexes

The indexes of the cells you want to select.

extendSelection

A BOOL value that specifies whether to extend the current selection. Pass YES to extends the selection; NO replaces the current selection.

Availability
See Also
Declared In
IKImageBrowserView.h

setZoomValue:

Sets the zoom value.

- (void) setZoomValue:(float)aValue;

Parameters
aValue

The zoom value. This value should be greater or equal to zero and less or equal than one. A zoom value of zero corresponds to the minimum size (40x40 pixels). A zoom value of one means images fits the browser bounds. Other values are interpolated.

Availability
See Also
Declared In
IKImageBrowserView.h

zoomValue

Returns the current zoom value.

- (float) zoomValue;

Return Value

The zoom value.

Availability
See Also
Declared In
IKImageBrowserView.h

Constants

Cell Appearance Style Masks

Masks for the appearance style bit field.

enum{
   IKCellsStyleNone              =0,
   IKCellsStyleShadowed          =1,
   IKCellsStyleOutlined          =2,
   IKCellsStyleTitled            =4,
   IKCellsStyleSubtitled         =8
};

Constants
IKCellsStyleNone

No style.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKCellsStyleShadowed

Cells use shadows.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKCellsStyleOutlined

Cells are outlined.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKCellsStyleTitled

Cells display a title.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKCellsStyleSubtitled

Cells display a subtitle.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

Declared In
IKImageBrowserView.h

Group Style Attributes

Attributes for the group style.

enum{
   IKGroupBezelStyle,
   IKGroupDisclosureStyle,
};

Constants
IKGroupBezelStyle

A bezel style.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKGroupDisclosureStyle

A disclosure triangle.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

Discussion

These constants affect the appearance of a group.

Declared In
IKImageBrowserView.h

View Options Keys

Keys for image browser view options.

NSString * const IKImageBrowserBackgroundColorKey;
NSString * const IKImageBrowserSelectionColorKey;
NSString * const IKImageBrowserCellsOutlineColorKey;
NSString * const IKImageBrowserCellsTitleAttributesKey;
NSString * const IKImageBrowserCellsHighlightedTitleAttributesKey;
NSString * const IKImageBrowserCellsSubtitleAttributesKey;

Constants
IKImageBrowserBackgroundColorKey

A key for the background color of the image browser view. The associated value is an NSColor object.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserSelectionColorKey

A key for the color that indicates a selection. The associated value is an NSColor object.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserCellsOutlineColorKey

A key for the outline color for an item in the image browser view. The associated value is an NSColor object.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserCellsTitleAttributesKey

A key for title attribute of an item in the image browser view. The associated value is an NSDictionary object.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserCellsHighlightedTitleAttributesKey

A key for the highlighted title attribute for an item in the image browser view. The associated value is an NSDictionary object.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserCellsSubtitleAttributesKey

A key for a subtitle attribute for an item in the image browser view. The associated value is an NSDictionary object.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

Discussion

You can set and retrieve values for these keys using the methods setValue:forKey and valueForKey:.

Declared In
IKImageBrowserView.h

Group Keys

Keys for group attributes.

NSString * const IKImageBrowserGroupRangeKey;
NSString * const IKImageBrowserGroupBackgroundColorKey;
NSString * const IKImageBrowserGroupTitleKey;
NSString * const IKImageBrowserGroupStyleKey;

Constants
IKImageBrowserGroupRangeKey

A key for the range of a group. The associated value is an NSValue object.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserGroupBackgroundColorKey

A key for the background color of a group. The associated value is an NSColor object.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserGroupTitleKey

A key for the title of a group. The associated value is an NSString object.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

IKImageBrowserGroupStyleKey

A key for the style of a group. The associated value is one of the constants defined in “Group Style Attributes”.

Available in Mac OS X v10.5 and later.

Declared in IKImageBrowserView.h.

Declared In
IKImageBrowserView.h

Next Page > Hide TOC


© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-12-13)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.