pub struct PdfFormComboBoxField<'a> { /* private fields */ }Expand description
A single PdfFormField of type PdfFormFieldType::ComboBox. The form field object defines an interactive drop-down list widget that allows the user to either select a value from a list of options or type a value into a text field.
Form fields in Pdfium are wrapped inside page annotations of type PdfPageAnnotationType::Widget or PdfPageAnnotationType::XfaWidget. User-specified values can be retrieved directly from each form field object by unwrapping the form field from the annotation, or in bulk from the PdfForm::field_values() function.
Implementations§
Source§impl<'a> PdfFormComboBoxField<'a>
impl<'a> PdfFormComboBoxField<'a>
Sourcepub fn bindings(&self) -> &'a dyn PdfiumLibraryBindings
pub fn bindings(&self) -> &'a dyn PdfiumLibraryBindings
Returns the PdfiumLibraryBindings used by this PdfFormComboBoxField object.
Sourcepub fn options(&self) -> &PdfFormFieldOptions<'_>
pub fn options(&self) -> &PdfFormFieldOptions<'_>
Returns the collection of selectable options in this PdfFormComboBoxField.
Sourcepub fn value(&self) -> Option<String>
pub fn value(&self) -> Option<String>
Returns the displayed label for the currently selected option in this PdfFormComboBoxField object, if any.
Sourcepub fn has_editable_text_box(&self) -> bool
pub fn has_editable_text_box(&self) -> bool
Returns true if this PdfFormComboBoxField also includes an editable text box.
If false, this combo box field only includes a drop-down list.
Sourcepub fn set_has_editable_text_box(
&mut self,
has_editable_text_box: bool,
) -> Result<(), PdfiumError>
pub fn set_has_editable_text_box( &mut self, has_editable_text_box: bool, ) -> Result<(), PdfiumError>
Controls whether or not this PdfFormComboBoxField includes an editable text box in addition to a drop-down list.
Sourcepub fn is_sorted(&self) -> bool
pub fn is_sorted(&self) -> bool
Returns true if the option items of this PdfFormComboBoxField should be sorted
alphabetically.
This flag is intended for use by form authoring tools, not by PDF viewer applications.
Sourcepub fn set_is_sorted(&mut self, is_sorted: bool) -> Result<(), PdfiumError>
pub fn set_is_sorted(&mut self, is_sorted: bool) -> Result<(), PdfiumError>
Controls whether or not the option items of this PdfFormComboBoxField should be sorted alphabetically.
This flag is intended for use by form authoring tools, not by PDF viewer applications.
Sourcepub fn is_multiselect(&self) -> bool
pub fn is_multiselect(&self) -> bool
Returns true if more than one of the option items in this PdfFormComboBoxField
may be selected simultaneously. If false, only one item at a time may be selected.
This flag was added in PDF version 1.4.
Sourcepub fn set_is_multiselect(
&mut self,
is_multiselect: bool,
) -> Result<(), PdfiumError>
pub fn set_is_multiselect( &mut self, is_multiselect: bool, ) -> Result<(), PdfiumError>
Controls whether more than one of the option items in this PdfFormComboBoxField may be selected simultaneously.
This flag was added in PDF version 1.4.
Sourcepub fn is_spell_checked(&self) -> bool
pub fn is_spell_checked(&self) -> bool
Returns true if text entered into the editable text box included in this
PdfFormComboBoxField should be spell checked.
This flag is meaningful only if the PdfFormComboBoxField::has_editable_text_box()
flag is also true.
This flag was added in PDF version 1.4.
Sourcepub fn set_is_spell_checked(
&mut self,
is_spell_checked: bool,
) -> Result<(), PdfiumError>
pub fn set_is_spell_checked( &mut self, is_spell_checked: bool, ) -> Result<(), PdfiumError>
Controls whether or not text entered into the editable text box included in this PdfFormComboBoxField should be spell checked.
This flag was added in PDF version 1.4.
Sourcepub fn is_commit_on_selection_change(&self) -> bool
pub fn is_commit_on_selection_change(&self) -> bool
Returns true if any new value is committed to this PdfFormComboBoxField
as soon as a selection is made with the pointing device. This option enables
applications to perform an action once a selection is made, without requiring
the user to exit the field. If false, any new value is not committed until the
user exits the field.
This flag was added in PDF version 1.5.
Sourcepub fn set_is_commit_on_selection_change(
&mut self,
is_commit_on_selection_change: bool,
) -> Result<(), PdfiumError>
pub fn set_is_commit_on_selection_change( &mut self, is_commit_on_selection_change: bool, ) -> Result<(), PdfiumError>
Controls whether or not any new value is committed to this PdfFormComboBoxField as soon as a selection is made with the pointing device.
This flag was added in PDF version 1.5.
Trait Implementations§
Source§impl<'a> From<PdfFormComboBoxField<'a>> for PdfFormField<'a>
impl<'a> From<PdfFormComboBoxField<'a>> for PdfFormField<'a>
Source§fn from(field: PdfFormComboBoxField<'a>) -> Self
fn from(field: PdfFormComboBoxField<'a>) -> Self
Auto Trait Implementations§
impl<'a> Freeze for PdfFormComboBoxField<'a>
impl<'a> !RefUnwindSafe for PdfFormComboBoxField<'a>
impl<'a> !Send for PdfFormComboBoxField<'a>
impl<'a> !Sync for PdfFormComboBoxField<'a>
impl<'a> Unpin for PdfFormComboBoxField<'a>
impl<'a> !UnwindSafe for PdfFormComboBoxField<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<'a, T> PdfFormFieldCommon for Twhere
T: PdfFormFieldPrivate<'a>,
impl<'a, T> PdfFormFieldCommon for Twhere
T: PdfFormFieldPrivate<'a>,
Source§fn appearance_stream(&self) -> Option<String>
fn appearance_stream(&self) -> Option<String>
Source§fn appearance_mode_value(
&self,
appearance_mode: PdfAppearanceMode,
) -> Option<String>
fn appearance_mode_value( &self, appearance_mode: PdfAppearanceMode, ) -> Option<String>
Source§fn is_read_only(&self) -> bool
fn is_read_only(&self) -> bool
Source§fn set_is_read_only(&mut self, is_read_only: bool) -> Result<(), PdfiumError>
fn set_is_read_only(&mut self, is_read_only: bool) -> Result<(), PdfiumError>
Source§fn is_required(&self) -> bool
fn is_required(&self) -> bool
true if this PdfFormField must have a value at the time it is exported
by any “submit form” action. Read moreSource§fn set_is_required(&mut self, is_required: bool) -> Result<(), PdfiumError>
fn set_is_required(&mut self, is_required: bool) -> Result<(), PdfiumError>
Source§fn is_exported_on_submit(&self) -> bool
fn is_exported_on_submit(&self) -> bool
true if the value of this PdfFormField will be exported by any
“submit form” action. Read more