PTCheckBoxWidget

@interface PTCheckBoxWidget : PTWidget

An object representing a check box used in a PDF Form.

  • Creates a Check Box Widget annotation and initialize it using given Cos/SDF object.

    Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.

    Declaration

    Objective-C

    - (instancetype)initWithD:(PTObj *)d;

    Swift

    init!(d: PTObj!)

    Parameters

    d

    the object to use to initialize the Check Box Widget

  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithAnnot: (PTAnnot*)annot;

    Swift

    init!(annot: PTAnnot!)
  • Creates a new Check Box Widget annotation, in the specified document.

    Declaration

    Objective-C

    + (PTCheckBoxWidget *)Create:(PTPDFDoc *)doc
                             pos:(PTPDFRect *)pos
                      field_name:(NSString *)field_name;

    Swift

    class func create(_ doc: PTPDFDoc!, pos: PTPDFRect!, field_name: String!) -> PTCheckBoxWidget!

    Parameters

    doc

    The document to which the annotation is to be added.

    pos

    A rectangle specifying the annotation’s bounds, specified in user space coordinates.

    field_name

    The name of the field for which to create a CheckBox widget.

    Return Value

    A newly created blank Check Box Widget annotation.

  • Creates a new Check Box Widget annotation, in the specified document.

    Declaration

    Objective-C

    + (PTCheckBoxWidget *)CreateWithField:(PTPDFDoc *)doc
                                      pos:(PTPDFRect *)pos
                                    field:(PTField *)field;

    Swift

    class func create(withField doc: PTPDFDoc!, pos: PTPDFRect!, field: PTField!) -> PTCheckBoxWidget!

    Parameters

    doc

    The document to which the annotation is to be added.

    pos

    A rectangle specifying the annotation’s bounds, specified in user space coordinates.

    field

    the field for which to create a CheckBox widget

    Return Value

    A newly created blank Check Box Widget annotation.

  • Returns whether the checkbox is checked.

    Declaration

    Objective-C

    - (BOOL)IsChecked;

    Swift

    func isChecked() -> Bool

    Return Value

    A boolean value indicating whether the checkbox is checked.

  • Check or uncheck the Check Box Widget

    Declaration

    Objective-C

    - (void)SetChecked:(BOOL)checked;

    Swift

    func setChecked(_ checked: Bool)

    Parameters

    value

    If true, the annotation should be checked. Otherwise it should be unchecked.