import { ObjectManager } from "../../ObjectManager"; import { Field, type FieldBaseProperties } from "./Field"; import { WidgetAnnotation, type WidgetProperties } from "../Annotations/WidgetAnnotation"; import { type Rect } from "../../Types"; import { type PdfPage } from "../PdfPage"; /** * Defines properties of a {@link PushButtonField}. */ export type PushButtonFieldProperties = FieldBaseProperties & { type: "button"; /** * Defines the position and dimensions of the field on the page using a bounding rectangle. * * Note: If a widget is specified via the 'widget' property, * its 'rect' value takes precedence and will override this rectangle definition. */ rect?: Rect; /** * The widget annotation defining view properties of the checkbox field. */ widget?: WidgetAnnotation | WidgetProperties; /** * The button caption. * * Note: If a widget is specified via the 'widget' property, * its 'buttonAppearance.caption' value takes precedence and will override this property. */ caption?: string; }; /** * Represents push button AcroForm field. */ export declare class PushButtonField extends Field { /** * Creates a new {@link PushButtonField}. * * @param om - {@link ObjectManager} that controls the lifetime of the {@link PushButtonField}. */ constructor(om: ObjectManager); /** * Creates a new {@link PushButtonField}. */ constructor(); /** * Gets the {@link WidgetAnnotation} defining view properties of the button. */ get widget(): WidgetAnnotation; /** * Gets or sets the {@link PdfPage} containing this field. * This property wraps the {@link WidgetAnnotation#page} property * and functions identically to: * this.widget.page = value; * * Note that a field may have multiple associated annotations across different pages. * These can be added and configured using the {@link Field@widgets} property. * * @see {@link WidgetAnnotation#page} */ get page(): PdfPage | null; /** * Gets or sets the {@link PdfPage} containing this field. * This property wraps the {@link WidgetAnnotation#page} property * and functions identically to: * this.widget.page = value; * * Note that a field may have multiple associated annotations across different pages. * These can be added and configured using the {@link Field@widgets} property. * * @see {@link WidgetAnnotation#page} */ set page(value: PdfPage | null); /** * Gets or sets the rectangle that defines the location and size of the field on a page. * This property wraps the {@link WidgetAnnotation#rect} property * and functions identically to: * this.widget.rect = value; * * Note that a field may have multiple associated annotations across different pages. * These can be added and configured using the {@link Field@widgets} property. * * @see {@link WidgetAnnotation#rect} */ get rect(): Rect; /** * Gets or sets the rectangle that defines the location and size of the field on a page. * This property wraps the {@link WidgetAnnotation#rect} property * and functions identically to: * this.widget.rect = value; * * Note that a field may have multiple associated annotations across different pages. * These can be added and configured using the {@link Field@widgets} property. * * @see {@link WidgetAnnotation#rect} */ set rect(value: Rect); /** * Gets or sets the button's caption. * This property wraps the {@link ButtonAppearance#caption} property * and functions identically to: * this.widget.buttonAppearance.caption = value; * * Note that a field may have multiple associated annotations across different pages. * These can be added and configured using the {@link Field@widgets} property. * * @see {@link ButtonAppearance#caption} */ get caption(): string | null; /** * Gets or sets the button's caption. * This property wraps the {@link ButtonAppearance#caption} property * and functions identically to: * this.widget.buttonAppearance.caption = value; * * Note that a field may have multiple associated annotations across different pages. * These can be added and configured using the {@link Field@widgets} property. * * @see {@link ButtonAppearance#caption} */ set caption(value: string | null); }