CPDFButtonWidgetAnnotation Class Reference

Inherits from CPDFWidgetAnnotation : CPDFAnnotation : NSObject
Declared in CPDFButtonWidgetAnnotation.h

Overview

A CPDFButtonWidgetAnnotation object provides user interactivity on a page of a PDF document. There are three types of buttons available: push button, radio button, and checkbox.

CPDFButtonWidgetAnnotation inherits general annotation behavior from the CPDFWidgetAnnotation class.

Note: Migration from previous versions: Use @c -initWithPage:document:controlType: to create button widget annotations, then call @c [CPDFPage updateAndAddAnnotation:] to attach them.

– initWithPage:document:controlType:

Initializes a button widget annotation with page, document and control type.

- (nullable instancetype)initWithPage:(CPDFPage *)page document:(CPDFDocument *)document controlType:(CPDFWidgetControlType)controlType

Parameters

page

The page on which the annotation will reside.

document

The document that owns the page.

controlType

The button type (checkbox, radio button, push button).

Discussion

Initializes a button widget annotation with page, document and control type.

Creates the engine object and binds it to the page. Call @c [CPDFPage updateAndAddAnnotation:] to finish registration.

Declared In

CPDFButtonWidgetAnnotation.h

– controlType

Returns the type of the control.

- (CPDFWidgetControlType)controlType

Discussion

Returns the type of the control.

Declared In

CPDFButtonWidgetAnnotation.h

– state

Returns the state of the control.

- (NSInteger)state

Discussion

Returns the state of the control.

Applies to CPDFWidgetRadioButtonControl or CPDFWidgetCheckBoxControl only.

Declared In

CPDFButtonWidgetAnnotation.h

– setState:

Sets the state of the control.

- (void)setState:(NSInteger)value

Discussion

Sets the state of the control.

Applies to CPDFWidgetRadioButtonControl or CPDFWidgetCheckBoxControl only.

Declared In

CPDFButtonWidgetAnnotation.h

– caption

Returns the text of the label on a push button control.

- (NSString *)caption

Discussion

Returns the text of the label on a push button control.

This method applies only to the label drawn on a control of type CPDFWidgetPushButtonControl.

Declared In

CPDFButtonWidgetAnnotation.h

– setCaption:

Sets the text of the label on a push button control.

- (void)setCaption:(NSString *)name

Discussion

Sets the text of the label on a push button control.

This method applies only to the label drawn on a control of type CPDFWidgetPushButtonControl.

Declared In

CPDFButtonWidgetAnnotation.h

  action

@property (nonatomic, strong) CPDFAction *action

– isTick

- (BOOL)isTick

– setIsTick:

- (void)setIsTick:(NSInteger)isTick

– widgetCheckStyle

Get the button selected style of check boxes or radio buttons.

- (CPDFWidgetButtonStyle)widgetCheckStyle

Discussion

Get the button selected style of check boxes or radio buttons.

Declared In

CPDFButtonWidgetAnnotation.h

– setWidgetCheckStyle:

Set the button selected style of check boxes or radio buttons.

- (void)setWidgetCheckStyle:(CPDFWidgetButtonStyle)widgetCheckStyle

Discussion

Set the button selected style of check boxes or radio buttons.

Declared In

CPDFButtonWidgetAnnotation.h