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)controlTypeParameters
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)controlTypeDiscussion
Returns the type of the control.
See Also
Declared In
CPDFButtonWidgetAnnotation.h
– state
Returns the state of the control.
- (NSInteger)stateDiscussion
Returns 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 *)captionDiscussion
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 *)nameDiscussion
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
– widgetCheckStyle
Get the button selected style of check boxes or radio buttons.
- (CPDFWidgetButtonStyle)widgetCheckStyleDiscussion
Get the button selected style of check boxes or radio buttons.
See Also
Declared In
CPDFButtonWidgetAnnotation.h
– setWidgetCheckStyle:
Set the button selected style of check boxes or radio buttons.
- (void)setWidgetCheckStyle:(CPDFWidgetButtonStyle)widgetCheckStyleDiscussion
Set the button selected style of check boxes or radio buttons.
See Also
Declared In
CPDFButtonWidgetAnnotation.h