pub struct FieldActionSystem { /* private fields */ }Expand description
Field action system for handling interactive events
Implementations§
Source§impl FieldActionSystem
impl FieldActionSystem
Sourcepub fn with_settings(settings: ActionSettings) -> Self
pub fn with_settings(settings: ActionSettings) -> Self
Create with custom settings
Sourcepub fn register_field_actions(
&mut self,
field_name: impl Into<String>,
actions: FieldActions,
)
pub fn register_field_actions( &mut self, field_name: impl Into<String>, actions: FieldActions, )
Register field actions
Sourcepub fn handle_focus(
&mut self,
field_name: impl Into<String>,
) -> Result<(), PdfError>
pub fn handle_focus( &mut self, field_name: impl Into<String>, ) -> Result<(), PdfError>
Handle focus event
Sourcepub fn handle_blur(
&mut self,
field_name: impl Into<String>,
) -> Result<(), PdfError>
pub fn handle_blur( &mut self, field_name: impl Into<String>, ) -> Result<(), PdfError>
Handle blur event
Sourcepub fn handle_format(
&mut self,
field_name: impl Into<String>,
value: &mut FieldValue,
) -> Result<(), PdfError>
pub fn handle_format( &mut self, field_name: impl Into<String>, value: &mut FieldValue, ) -> Result<(), PdfError>
Handle format event
Sourcepub fn handle_keystroke(
&mut self,
field_name: impl Into<String>,
_key: char,
_current_value: &str,
) -> Result<bool, PdfError>
pub fn handle_keystroke( &mut self, field_name: impl Into<String>, _key: char, _current_value: &str, ) -> Result<bool, PdfError>
Handle keystroke event
Sourcepub fn handle_validate(
&mut self,
field_name: impl Into<String>,
_value: &FieldValue,
) -> Result<bool, PdfError>
pub fn handle_validate( &mut self, field_name: impl Into<String>, _value: &FieldValue, ) -> Result<bool, PdfError>
Handle validate event
Sourcepub fn handle_calculate(
&mut self,
field_name: impl Into<String>,
value: &mut FieldValue,
) -> Result<(), PdfError>
pub fn handle_calculate( &mut self, field_name: impl Into<String>, value: &mut FieldValue, ) -> Result<(), PdfError>
Handle calculate event
Sourcepub fn get_focused_field(&self) -> Option<&String>
pub fn get_focused_field(&self) -> Option<&String>
Get current focused field
Sourcepub fn get_event_history(&self) -> &[ActionEvent]
pub fn get_event_history(&self) -> &[ActionEvent]
Get event history
Sourcepub fn clear_event_history(&mut self)
pub fn clear_event_history(&mut self)
Clear event history
Sourcepub fn set_js_executor(&mut self, executor: fn(&str) -> Result<String, String>)
pub fn set_js_executor(&mut self, executor: fn(&str) -> Result<String, String>)
Set JavaScript executor
Sourcepub fn to_pdf_dict(&self, field_name: &str) -> Dictionary
pub fn to_pdf_dict(&self, field_name: &str) -> Dictionary
Export actions to PDF dictionary
Trait Implementations§
Source§impl Clone for FieldActionSystem
impl Clone for FieldActionSystem
Source§fn clone(&self) -> FieldActionSystem
fn clone(&self) -> FieldActionSystem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FieldActionSystem
impl Debug for FieldActionSystem
Source§impl Default for FieldActionSystem
impl Default for FieldActionSystem
Source§fn default() -> FieldActionSystem
fn default() -> FieldActionSystem
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FieldActionSystem
impl RefUnwindSafe for FieldActionSystem
impl Send for FieldActionSystem
impl Sync for FieldActionSystem
impl Unpin for FieldActionSystem
impl UnwindSafe for FieldActionSystem
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().