pub struct FormFieldModel {
pub name: String,
pub kind: FormFieldKind,
pub value: Option<String>,
pub selected_values: Option<Vec<String>>,
pub default_value: Option<String>,
pub tooltip: Option<String>,
pub read_only: bool,
pub required: bool,
pub max_len: Option<u32>,
pub quadding: Quadding,
pub da: DaInfo,
pub widgets: Vec<WidgetModel>,
}Expand description
A logical form field with everything an editor UI needs.
Fields§
§name: StringFully-qualified field name — the handle for all get/set operations.
kind: FormFieldKindTyped kind with kind-specific data.
value: Option<String>Current value: text fields the text, buttons the on-state name or
Off, choice fields the selected export value (joined with ", " for
multi-select list boxes — use selected_values for the array form).
selected_values: Option<Vec<String>>Selected export values for multi-select list boxes (/Ff bit 22 set).
None for all other field types. Empty vec means nothing selected.
default_value: Option<String>Default value (/DV).
tooltip: Option<String>User-facing label (/TU, the accessibility/tooltip name).
read_only: boolReadOnly flag (/Ff bit 1, inherited).
required: boolRequired flag (/Ff bit 2, inherited).
max_len: Option<u32>/MaxLen for text fields (inherited).
quadding: QuaddingText alignment.
da: DaInfoResolved /DA font/size/color info.
widgets: Vec<WidgetModel>All widget annotations of this field (one per visual occurrence).
Trait Implementations§
Source§impl Clone for FormFieldModel
impl Clone for FormFieldModel
Source§fn clone(&self) -> FormFieldModel
fn clone(&self) -> FormFieldModel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FormFieldModel
impl Debug for FormFieldModel
Source§impl PartialEq for FormFieldModel
impl PartialEq for FormFieldModel
Source§fn eq(&self, other: &FormFieldModel) -> bool
fn eq(&self, other: &FormFieldModel) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FormFieldModel
Auto Trait Implementations§
impl Freeze for FormFieldModel
impl RefUnwindSafe for FormFieldModel
impl Send for FormFieldModel
impl Sync for FormFieldModel
impl Unpin for FormFieldModel
impl UnsafeUnpin for FormFieldModel
impl UnwindSafe for FormFieldModel
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more