pub struct Widget {
pub rect: Rectangle,
pub appearance: WidgetAppearance,
pub parent: Option<String>,
pub appearance_streams: Option<AppearanceDictionary>,
}Expand description
Widget annotation for form field
Fields§
§rect: RectangleRectangle for widget position
appearance: WidgetAppearanceAppearance settings
parent: Option<String>Parent field reference (will be set by FormManager)
appearance_streams: Option<AppearanceDictionary>Appearance streams (Normal, Rollover, Down)
Implementations§
Source§impl Widget
impl Widget
Sourcepub fn with_appearance(self, appearance: WidgetAppearance) -> Self
pub fn with_appearance(self, appearance: WidgetAppearance) -> Self
Set appearance
Sourcepub fn with_appearance_streams(self, streams: AppearanceDictionary) -> Self
pub fn with_appearance_streams(self, streams: AppearanceDictionary) -> Self
Set appearance streams
Sourcepub fn generate_appearance(
&mut self,
field_type: FieldType,
value: Option<&str>,
) -> Result<()>
pub fn generate_appearance( &mut self, field_type: FieldType, value: Option<&str>, ) -> Result<()>
Generate default appearance streams based on field type
Sourcepub fn to_annotation_dict(&self) -> Dictionary
pub fn to_annotation_dict(&self) -> Dictionary
Convert to annotation dictionary
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Widget
impl RefUnwindSafe for Widget
impl Send for Widget
impl Sync for Widget
impl Unpin for Widget
impl UnwindSafe for Widget
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 more