Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

PDFThumbnailView Class Reference

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

Overview

A PDFThumbnailView object contains a set of thumbnails, each of which represents a page in a PDF document.

Tasks

Accessing the Associated PDF View

Managing the Size of a Thumbnail View

Working with Thumbnail View Display Characteristics

Managing the Behavior of a Thumbnail View

Instance Methods

allowsDragging

Returns a Boolean value indicating whether users can drag thumbnails (that is, re-order pages in the document) within the thumbnail view.

- (BOOL)allowsDragging

Return Value

YES if users can re-order pages by dragging thumbnails, NO otherwise.

Availability
See Also
Declared In
PDFThumbnailView.h

allowsMultipleSelection

Returns a Boolean value indicating whether users can select multiple thumbnails in the thumbnail view at one time.

- (BOOL)allowsMultipleSelection

Return Value

YES if users can select multiple thumbnails simultaneously, NO otherwise.

Discussion

By default, PDFThumbnailView allows only a single thumbnail to be selected at one time. When this is the case, you can get the PDF page that corresponds to the selected thumbnail using the PDFView method currentPage.

When multiple selections are enabled, however, you must use selectedPages to get the pages that correspond to the set of selected thumbnails.

Availability
See Also
Declared In
PDFThumbnailView.h

backgroundColor

Returns the color used in the background of the thumbnail view.

- (NSColor *)backgroundColor

Return Value

The color of the background in the thumbnail view.

Availability
See Also
Declared In
PDFThumbnailView.h

labelFont

Returns the font used to label the thumbnails.

- (NSFont *)labelFont

Return Value

The font used in the thumbnail labels.

Discussion

Typically, the label of a thumbnail is the page number of the page it represents.

Availability
See Also
Declared In
PDFThumbnailView.h

maximumNumberOfColumns

Returns the maximum number of columns of thumbnails the thumbnail view can display.

- (NSUInteger)maximumNumberOfColumns

Return Value

The maximum number of columns of thumbnails the thumbnail view can display. If 0, the thumbnail displays as many columns of thumbnails as fit in its size.

Availability
See Also
Declared In
PDFThumbnailView.h

PDFView

Returns the PDFView object associated with the thumbnail view.

- (PDFView *)PDFView

Return Value

The PDF view object associated with the thumbnail view.

Availability
See Also
Declared In
PDFThumbnailView.h

selectedPages

Returns an array of PDF pages that correspond to the selected thumbnails in the thumbnail view.

- (NSArray *)selectedPages

Return Value

An array of PDF pages that correspond to the thumbnails selected in the thumbnail view.

Discussion

If the thumbnail view allows multiple selections (if allowsMultipleSelection returns YES), you can use this method to get the PDF pages that correspond to the selected thumbnails.

Availability
See Also
Declared In
PDFThumbnailView.h

setAllowsDragging:

Sets whether users can drag thumbnails within the thumbnail view; that is, re-order pages in the document.

- (void)setAllowsDragging:(BOOL)allow

Parameters
allow

Pass YES to allow users to drag thumbnails in the thumbnail view (this allows them to re-order pages in the document), or NO to disallow.

Availability
See Also
Declared In
PDFThumbnailView.h

setAllowsMultipleSelection:

Sets whether the thumbnail view allows users to select more than one thumbnail at a time.

- (void)setAllowsMultipleSelection:(BOOL)flag

Parameters
flag

Pass YES to allows users to select multiple thumbnails at one time, or NO to disallow.

Discussion

By default, PDFThumbnailView allows only a single thumbnail to be selected at one time. When this is the case, you can get the PDF page that corresponds to the selected thumbnail using the PDFView method currentPage.

If you use setAllowsMultipleSelection to enable multiple selections, however, you must use selectedPages to get the pages that correspond to the set of selected thumbnails.

Availability
See Also
Declared In
PDFThumbnailView.h

setBackgroundColor:

Sets the color used in the background of the thumbnail view.

- (void)setBackgroundColor:(NSColor *)color

Parameters
color

The color to be used in the background of the thumbnail view.

Availability
See Also
Declared In
PDFThumbnailView.h

setLabelFont:

Sets the font used to label the thumbnails.

- (void)setLabelFont:(NSFont *)font

Parameters
font

The font to be used in the thumbnail labels.

Discussion

Typically, the label of a thumbnail is the page number of the page it represents.

Availability
See Also
Declared In
PDFThumbnailView.h

setMaximumNumberOfColumns:

Sets the maximum number of columns of thumbnails the thumbnail view can display.

- (void)setMaximumNumberOfColumns:(NSUInteger)maxColumns

Parameters
maxColumns

The maximum number of columns of thumbnails the thumbnail view can display. Pass 0 to make the thumbnail view display as many columns as fit in its size.

Availability
See Also
Declared In
PDFThumbnailView.h

setPDFView:

Associates the specified PDFView object with the thumbnail view.

- (void)setPDFView:(PDFView *)view

Parameters
view

The PDF view object to associate with the thumbnail view.

Availability
See Also
Declared In
PDFThumbnailView.h

setThumbnailSize:

Sets the maximum width and height of the thumbnails in the thumbnail view.

- (void)setThumbnailSize:(NSSize)size

Parameters
size

The maximum width and height the thumbnails in the thumbnail view should be.

Availability
See Also
Declared In
PDFThumbnailView.h

thumbnailSize

Returns the maximum width and height of the thumbnails in the thumbnail view.

- (NSSize)thumbnailSize

Return Value

The maximum width and height of the thumbnails in the thumbnail view.

Availability
See Also
Declared In
PDFThumbnailView.h

Next Page > Hide TOC


Last updated: 2007-12-11




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.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice