| Inherits from | |
| Conforms to | |
| Framework | Library/Frameworks/Quartz.framework/Frameworks/PDFKit.framework |
| Availability | Available in Mac OS X v10.4 and later.
|
| Declared in | PDFAnnotationButtonWidget.h |
A PDFAnnotationButtonWidget object provides user interactivity on a page of a PDF document. There are three types of buttons available: push button, radio button, and checkbox.
PDFAnnotationButtonWidget inherits general annotation behavior from the PDFAnnotation class. If you use a PDFAnnotationButtonWidget 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.
Returns a Boolean value indicating whether a radio button behaves in a toggling manner.
- (BOOL)allowsToggleToOff
YES if clicking a radio button control that is already in the on state toggles it to the off state; otherwise NO.
PDFAnnotationButtonWidget.hReturns the background color of the control.
- (NSColor *)backgroundColor
The color drawn in the background of the control.
PDFAnnotationButtonWidget.hReturns the text of the label on a push button control.
- (NSString *)caption
The label drawn on a push button control.
This method applies only to the label drawn on a control of type kPDFWidgetPushButtonControl.
– setCaption:PDFAnnotationButtonWidget.hReturns the type of the control.
- (PDFWidgetControlType)controlType
The type of control the button represents. See “Constants” for the various control types.
– setControlTypePDFAnnotationButtonWidget.hReturns the internal name of a field (used for reset-form actions).
- (NSString *)fieldName
The internal name of a field.
The internal name of a field is an optional value.
– setFieldNamePDFAnnotationButtonWidget.hReturns the font used in the control’s label.
- (NSFont *)font
The font used in the control’s label.
– setFont:PDFAnnotationButtonWidget.hReturns the font color used in the control’s label.
- (NSColor *)fontColor
The font color used in the control’s label.
– setFontColor:PDFAnnotationButtonWidget.hReturns a Boolean value that indicates whether the control is highlighted when it is drawn.
- (BOOL)isHighlighted
YES if the control is highlighted when it is drawn; otherwise NO.
– setHighlighted:PDFAnnotationButtonWidget.hReturns the string associated with the on state of a radio button or checkbox control.
- (NSString *)onStateValue
The string associated with the on state of a radio button or checkbox control.
This is a required string for controls of types kPDFWidgetRadioButtonControl and kPDFWidgetCheckBoxControl. The off state is always labeled “Off”.
– setOnStateValuePDFAnnotationButtonWidget.hGets the ID of the parent object. (Deprecated. If you need to find other buttons in the same group, such as a group of radio buttons, you do not need information about the parent object. Instead, look for button widget objects that return the same value in fieldName.)
- (unsigned)parentID
For more information about the field names of annotations, see the Adobe PDF specification.
PDFAnnotationButtonWidget.hSets the control’s background color.
- (void)setBackgroundColor:(NSColor *)color
The color to be drawn in the control’s background.
PDFAnnotationButtonWidget.hSets the text of the label on a push button control.
- (void)setCaption:(NSString *)name
The text to be used as the label on a push button control.
– captionPDFAnnotationButtonWidget.hSets the type of the control.
- (void)setControlType:(PDFWidgetControlType)type
The type of control for the button. “Constants” lists the various control types you can send for this value.
– controlTypeSets the internal name of a field (used for reset-form actions).
- (void)setFieldName:(NSString *)name
The internal name of a field. This is an optional value.
– fieldNameSets the font of the control’s label.
- (void)setFont:(NSFont *)font
The desired font for the control’s label.
– fontPDFAnnotationButtonWidget.hSets the font color used in the control’s label.
- (void)setFontColor:(NSColor *)color
The desired font color of the control’s label.
– fontColorPDFAnnotationButtonWidget.hSets the control’s highlighting when it is drawn.
- (void)setHighlighted:(BOOL)flag
Set this value to YES to cause the control to be highlighted when it is drawn or NO otherwise.
– isHighlightedPDFAnnotationButtonWidget.hSets the string that is associated with the on state of a radio button or checkbox control.
- (void)setOnStateValue:(NSString *)name
Required for controls of types kPDFWidgetRadioButtonControl and kPDFWidgetCheckBoxControl, the value of name describes the on state of the control (the off state is always labeled “Off”). Although “On” is an acceptable string for the on state of a single checkbox, a group of two or more radio buttons should have a unique string associated with each control.
For example, a form might display a group of 3 radio buttons that allow users to indicate an account type, such as savings, checking, or investment. The strings associated with the on states of these buttons could be “Savings,“ “Checking,“ and “Investment.“ In this example, these 3 radio buttons also would share a field name string, such as “AccountType.“
– onStateValue– fieldNameSets the state of the control.
- (void)setState:(int)value
The state the control should be in.
A control’s state (for example, checked or unchecked) affects how it is drawn. Note that push buttons are always in the on state.
PDFAnnotationButtonWidget.hReturns the state of the control.
- (int)state
NSOnState if the control is on; NSOffState otherwise.
PDFAnnotationButtonWidget.hThe types of annotation buttons are:
Last updated: 2007-12-11