PTRadioButtonGroup
@interface PTRadioButtonGroup : NSObject
An object representing a Group of Radio Buttons that can be used to create new Radio Buttons. If a group contains multiple buttons they will be connected.
-
Creates a RadioButtonGroup and initialize it using given Field object.
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
Declaration
Objective-C
- (instancetype)initWithField:(PTField *)field;
Swift
init!(field: PTField!)
Parameters
field
The field with which to initialize the RadioButtonGroup
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithGroup: (PTRadioButtonGroup*)group;
Swift
init!(group: PTRadioButtonGroup!)
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithImpl: (void *)impl;
Swift
init!(impl: UnsafeMutableRawPointer!)
-
Creates a new RadioButtonGroup in the specified document.
Declaration
Objective-C
+ (PTRadioButtonGroup *)Create:(PTPDFDoc *)doc field_name:(NSString *)field_name;
Swift
class func create(_ doc: PTPDFDoc!, field_name: String!) -> PTRadioButtonGroup!
Parameters
doc
The document in which the RadioButtonGroup is created.
field_name
The name of the field to create and use in this RadioButtonGroup.
Return Value
A newly created RadioButtonGroup.
-
Adds a new RadioButtonWidget to the RadioButtonGroup
Declaration
Objective-C
- (PTRadioButtonWidget *)Add:(PTPDFRect *)pos onstate:(NSString *)onstate;
Swift
func add(_ pos: PTPDFRect!, onstate: String!) -> PTRadioButtonWidget!
Parameters
pos
A rectangle specifying the annotation’s bounds, specified in user space coordinates.
onstate
The onstate for this button. This will rarely need to be explicitly set. However, it can be used to allow multiple radiobuttons in a group to be on at once if they have the same onstate.
Return Value
A newly created default RadioButtonWidget.
-
Gets the number of buttons in this RadioButtonGroup
Declaration
Objective-C
- (unsigned int)GetNumButtons;
Swift
func getNumButtons() -> UInt32
Return Value
The number of buttons in this RadioButtonGroup
-
Retrieves the button at a given index.
Declaration
Objective-C
- (PTRadioButtonWidget *)GetButton:(unsigned int)index;
Swift
func getButton(_ index: UInt32) -> PTRadioButtonWidget!
Parameters
index
The index to use.
Return Value
The RadioButtonWidget at the given index