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

Next Page > Hide TOC

PDFAnnotationChoiceWidget 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
PDFAnnotationChoiceWidget.h

Overview

A PDFAnnotationChoiceWidget object provides user interactivity on a page of a PDF document, in the form of pop-up menus and lists.

PDFAnnotationChoiceWidget inherits general annotation behavior from the PDFAnnotation class. If you use a PDFAnnotationChoiceWidget object, your application must handle hit testing, unless you are simply using PDFView to display content. This is because PDFView automatically handles hit testing for you.

Tasks

Getting and Setting the String Value

Managing Font and Background Color Characteristics

Managing the Associated Field Name

Determining the Type of Choice Widget Annotation

Accessing the Items in the Choice Widget Annotation

Instance Methods

backgroundColor

Returns the color of the widget annotation background.

- (NSColor *)backgroundColor

Return Value

The color of the widget annotation background.

Availability
Declared In
PDFAnnotationChoiceWidget.h

choices

Returns an array of strings that represent the items available in the list or pop-up menu of the choice widget annotation.

- (NSArray *)choices

Return Value

An array of strings that represent the items in the list or pop-up menu choice widget annotation.

Availability
Declared In
PDFAnnotationChoiceWidget.h

fieldName

Returns the internal field name associated with the widget annotation.

- (NSString *)fieldName

Return Value

The internal field name associated with the widget annotation.

Discussion

If the widget annotation is backed by PDF form data, it can associate an optional field name with a value or other data.

Availability
Declared In
PDFAnnotationChoiceWidget.h

font

Returns the font used to display the text in the widget annotation.

- (NSFont *)font

Return Value

The font used to display the text in the widget annotation.

Availability
Declared In
PDFAnnotationChoiceWidget.h

fontColor

Returns the font color used to display the text in the widget annotation.

- (NSColor *)fontColor

Return Value

The color of the font used for the text in the widget annotation.

Availability
Declared In
PDFAnnotationChoiceWidget.h

isListChoice

Returns a Boolean value indicating whether the widget annotation is a list.

- (BOOL)isListChoice

Return Value

YES if the widget annotation is a list, NO otherwise.

Discussion

A choice widget annotation can be either a list or a pop-up menu.

Availability
Declared In
PDFAnnotationChoiceWidget.h

setBackgroundColor:

Sets the background color of the widget annotation.

- (void)setBackgroundColor:(NSColor *)color

Parameters
color

The color to use in the background of the widget annotation.

Availability
Declared In
PDFAnnotationChoiceWidget.h

setChoices:

Sets the items available in the list or pop-up menu of the choice widget annotation.

- (void)setChoices:(NSArray *)options

Parameters
options

Send an array of strings, each of which represents an item in the list or pop-up menu of the choice annotation widget.

Availability
Declared In
PDFAnnotationChoiceWidget.h

setFieldName:

Sets the internal field name associated with the widget annotation’s value.

- (void)setFieldName:(NSString *)name

Parameters
name

The name to be used as the internal field name associated with the widget annotation.

Discussion

If the widget annotation is backed by PDF form data, it can associate an optional field name with a value or other data.

Availability
Declared In
PDFAnnotationChoiceWidget.h

setFont:

Sets the font used to display the text in the widget annotation.

- (void)setFont:(NSFont *)font

Parameters
font

The font to be used for the text in the widget annotation.

Availability
Declared In
PDFAnnotationChoiceWidget.h

setFontColor:

Sets the font color used to display the text in the widget annotation.

- (void)setFontColor:(NSColor *)color

Parameters
color

The color of the font to be used for the text in the widget annotation.

Availability
Declared In
PDFAnnotationChoiceWidget.h

setIsListChoice:

Sets whether the widget annotation is a list.

- (void)setIsListChoice:(BOOL)isList

Parameters
isList

Send YES to set the choice widget annotation is a list, NO otherwise.

Discussion

A choice widget annotation can be either a list or a pop-up menu.

Availability
Declared In
PDFAnnotationChoiceWidget.h

setStringValue:

Sets the selection in the widget annotation.

- (void)setStringValue:(NSString *)value

Parameters
value

The string that represents the selection in the widget annotation.

Discussion

If the widget annotation object is backed by PDF form data, this method updates the value associated with the appropriate field in the form object.

Availability
Declared In
PDFAnnotationChoiceWidget.h

stringValue

Returns the selection in the widget annotation.

- (NSString *)stringValue

Return Value

The string that represents the selection in the widget annotation.

Discussion

If the widget annotation object is backed by PDF form data, this method returns the value associated with the appropriate field in the form object, if possible.

Availability
Declared In
PDFAnnotationChoiceWidget.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