pub struct PdfFormRadioButtonField<'a> { /* private fields */ }Expand description
A single PdfFormField of type PdfFormFieldType::RadioButton. The form field object defines an interactive radio button widget that can be toggled by the user.
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> PdfFormRadioButtonField<'a>
impl<'a> PdfFormRadioButtonField<'a>
Sourcepub fn bindings(&self) -> &'a dyn PdfiumLibraryBindings
pub fn bindings(&self) -> &'a dyn PdfiumLibraryBindings
Returns the PdfiumLibraryBindings used by this PdfFormRadioButtonField object.
Sourcepub fn index_in_group(&self) -> u32
pub fn index_in_group(&self) -> u32
Returns the index of this PdfFormRadioButtonField in its control group.
Control groups are used to group related interactive fields together. Checkboxes and radio buttons can be grouped such that only a single button can be selected within the control group. Each field within the group has a unique group index.
Sourcepub fn group_value(&self) -> Option<String>
pub fn group_value(&self) -> Option<String>
Returns the value set for the control group containing this PdfFormRadioButtonField.
Control groups are used to group related interactive fields together. Checkboxes and radio buttons can be grouped such that only a single button can be selected within the control group. In this case, a single value can be shared by the group, indicating the value of the currently selected field within the group.
Sourcepub fn is_checked(&self) -> Result<bool, PdfiumError>
pub fn is_checked(&self) -> Result<bool, PdfiumError>
Returns true if this PdfFormRadioButtonField object has its radio button selected.
Sourcepub fn set_checked(&mut self) -> Result<(), PdfiumError>
pub fn set_checked(&mut self) -> Result<(), PdfiumError>
Selects the radio button of this PdfFormRadioButtonField object.
Sourcepub fn is_group_selection_required(&self) -> bool
pub fn is_group_selection_required(&self) -> bool
Returns true if exactly one radio button in the control group containing this
PdfFormRadioButtonField must be selected at all times. If so, then toggling the
currently selected radio button is not possible. If false, then toggling the
currently selected radio button will deselect it, leaving no radio button in the
group selected.
Sourcepub fn set_is_group_selection_required(
&mut self,
is_group_selection_required: bool,
) -> Result<(), PdfiumError>
pub fn set_is_group_selection_required( &mut self, is_group_selection_required: bool, ) -> Result<(), PdfiumError>
Controls whether or not the control group containing this PdfFormRadioButtonField requires exactly one radio button to be selected at all times.
Sourcepub fn is_group_in_unison(&self) -> bool
pub fn is_group_in_unison(&self) -> bool
Returns true if all radio buttons in the same control group as this
PdfFormRadioButtonField use the same value for the checked state; if so, if one
is checked, then all will be checked, and so all radio buttons will turn on and
off in unison.
This flag was added in PDF version 1.5.
Sourcepub fn set_is_group_in_unison(
&mut self,
is_group_in_unison: bool,
) -> Result<(), PdfiumError>
pub fn set_is_group_in_unison( &mut self, is_group_in_unison: bool, ) -> Result<(), PdfiumError>
Controls whether or not all radio buttons in the same control group as this PdfFormRadioButtonField use the same value for the checked state; if so, if one is checked, then all will be checked, and so all radio buttons will turn on and off in unison.
This flag was added in PDF version 1.5.
Trait Implementations§
Source§impl<'a> From<PdfFormRadioButtonField<'a>> for PdfFormField<'a>
impl<'a> From<PdfFormRadioButtonField<'a>> for PdfFormField<'a>
Source§fn from(field: PdfFormRadioButtonField<'a>) -> Self
fn from(field: PdfFormRadioButtonField<'a>) -> Self
Auto Trait Implementations§
impl<'a> Freeze for PdfFormRadioButtonField<'a>
impl<'a> !RefUnwindSafe for PdfFormRadioButtonField<'a>
impl<'a> !Send for PdfFormRadioButtonField<'a>
impl<'a> !Sync for PdfFormRadioButtonField<'a>
impl<'a> Unpin for PdfFormRadioButtonField<'a>
impl<'a> !UnwindSafe for PdfFormRadioButtonField<'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