pub trait WidgetBuilderExt {
Show 15 methods
// Required methods
fn with_color(self, color: Color) -> Self;
fn with_frame(self, frame: FrameType) -> Self;
fn with_label_size(self, size: i32) -> Self;
fn with_label_color(self, color: Color) -> Self;
fn with_label_type(self, typ: LabelType) -> Self;
fn with_selection_color(self, color: Color) -> Self;
fn with_label_font(self, font: Font) -> Self;
fn with_callback<F>(self, cb: F) -> Self
where F: FnMut(&mut Self) + 'static;
fn with_trigger(self, trigger: CallbackTrigger) -> Self;
fn with_emit<T: 'static + Clone + Send + Sync>(
self,
sender: Sender<T>,
msg: T,
) -> Self;
fn with_image<I: ImageExt>(self, image: Option<I>) -> Self;
fn with_image_scaled<I: ImageExt>(self, image: Option<I>) -> Self
where Self: Sized;
fn with_deimage<I: ImageExt>(self, image: Option<I>) -> Self
where Self: Sized;
fn with_deimage_scaled<I: ImageExt>(self, image: Option<I>) -> Self
where Self: Sized;
fn with_tooltip(self, txt: &str) -> Self;
}Expand description
Adds builder pattern friendly versions of several setter functions
Required Methods§
Sourcefn with_color(self, color: Color) -> Self
fn with_color(self, color: Color) -> Self
Sets the widget’s color
Sourcefn with_frame(self, frame: FrameType) -> Self
fn with_frame(self, frame: FrameType) -> Self
Sets the widget’s frame type
Sourcefn with_label_size(self, size: i32) -> Self
fn with_label_size(self, size: i32) -> Self
Sets the widget label’s size
Sourcefn with_label_color(self, color: Color) -> Self
fn with_label_color(self, color: Color) -> Self
Sets the widget label’s color
Sourcefn with_label_type(self, typ: LabelType) -> Self
fn with_label_type(self, typ: LabelType) -> Self
Sets the widget label’s type
Sourcefn with_selection_color(self, color: Color) -> Self
fn with_selection_color(self, color: Color) -> Self
Sets the selection color of the widget
Sourcefn with_label_font(self, font: Font) -> Self
fn with_label_font(self, font: Font) -> Self
Sets the widget label’s font
Sourcefn with_callback<F>(self, cb: F) -> Selfwhere
F: FnMut(&mut Self) + 'static,
fn with_callback<F>(self, cb: F) -> Selfwhere
F: FnMut(&mut Self) + 'static,
Sets the callback when the widget is triggered (clicks for example) takes the widget as a closure argument
Sourcefn with_trigger(self, trigger: CallbackTrigger) -> Self
fn with_trigger(self, trigger: CallbackTrigger) -> Self
Sets the default callback trigger for a widget, equivalent to when()
Sourcefn with_emit<T: 'static + Clone + Send + Sync>(
self,
sender: Sender<T>,
msg: T,
) -> Self
fn with_emit<T: 'static + Clone + Send + Sync>( self, sender: Sender<T>, msg: T, ) -> Self
Emits a message on callback using a sender
Sourcefn with_image<I: ImageExt>(self, image: Option<I>) -> Self
fn with_image<I: ImageExt>(self, image: Option<I>) -> Self
Sets the image of the widget
Sourcefn with_image_scaled<I: ImageExt>(self, image: Option<I>) -> Selfwhere
Self: Sized,
fn with_image_scaled<I: ImageExt>(self, image: Option<I>) -> Selfwhere
Self: Sized,
Sets the image of the widget scaled to the widget’s size
Sourcefn with_deimage<I: ImageExt>(self, image: Option<I>) -> Selfwhere
Self: Sized,
fn with_deimage<I: ImageExt>(self, image: Option<I>) -> Selfwhere
Self: Sized,
Sets the deactivated image of the widget
Sourcefn with_deimage_scaled<I: ImageExt>(self, image: Option<I>) -> Selfwhere
Self: Sized,
fn with_deimage_scaled<I: ImageExt>(self, image: Option<I>) -> Selfwhere
Self: Sized,
Sets the deactivated image of the widget scaled to the widget’s size
Sourcefn with_tooltip(self, txt: &str) -> Self
fn with_tooltip(self, txt: &str) -> Self
Sets the tooltip text
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.