1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
use crate::bindgen::{FPDF_ANNOTATION, FPDF_FORMHANDLE};
use crate::bindings::PdfiumLibraryBindings;
use crate::form_field_private::internal::PdfFormFieldPrivate;
pub struct PdfFormPushButtonField<'a> {
form_handle: FPDF_FORMHANDLE,
annotation_handle: FPDF_ANNOTATION,
bindings: &'a dyn PdfiumLibraryBindings,
}
impl<'a> PdfFormPushButtonField<'a> {
#[inline]
pub(crate) fn from_pdfium(
form_handle: FPDF_FORMHANDLE,
annotation_handle: FPDF_ANNOTATION,
bindings: &'a dyn PdfiumLibraryBindings,
) -> Self {
PdfFormPushButtonField {
form_handle,
annotation_handle,
bindings,
}
}
#[inline]
pub fn bindings(&self) -> &'a dyn PdfiumLibraryBindings {
self.bindings
}
}
impl<'a> PdfFormFieldPrivate<'a> for PdfFormPushButtonField<'a> {
#[inline]
fn form_handle(&self) -> &FPDF_FORMHANDLE {
&self.form_handle
}
#[inline]
fn annotation_handle(&self) -> &FPDF_ANNOTATION {
&self.annotation_handle
}
#[inline]
fn bindings(&self) -> &dyn PdfiumLibraryBindings {
self.bindings
}
}