pub struct ProgressBar {
pub value: f32,
pub size: Size2d,
pub foreground: Box<dyn Frame>,
pub background: Box<dyn Frame>,
}Available on crate feature
el_progress_bar only.Fields§
§value: f32Current progress, should be in the range 0.0..=1.0
size: Size2dSize of the progress bar element
foreground: Box<dyn Frame>Foreground (bar) color
background: Box<dyn Frame>Background color
Implementations§
Source§impl ProgressBar
impl ProgressBar
Source§impl ProgressBar
impl ProgressBar
pub const DEFAULT_HEIGHT: f32 = 20f32
pub fn with_background(self, frame: impl Frame + 'static) -> Self
pub fn with_foreground(self, frame: impl Frame + 'static) -> Self
Trait Implementations§
Source§impl Default for ProgressBar
impl Default for ProgressBar
Source§impl UiElement for ProgressBar
impl UiElement for ProgressBar
Source§fn measure(&self, ctx: MeasureContext<'_>) -> Response
fn measure(&self, ctx: MeasureContext<'_>) -> Response
Measure step, guaranteed to be called before the
May be called multiple times per single frame, so it should not contain any expensive calls
This function may not mutate any state.\ Read more
process stepMay be called multiple times per single frame, so it should not contain any expensive calls
This function may not mutate any state.\ Read more
Source§fn process(&self, ctx: ProcessContext<'_>)
fn process(&self, ctx: ProcessContext<'_>)
Process step, guaranteed to be called after the
You should process the user inputs and render the element here.
measure stepYou should process the user inputs and render the element here.
Auto Trait Implementations§
impl Freeze for ProgressBar
impl !RefUnwindSafe for ProgressBar
impl !Send for ProgressBar
impl !Sync for ProgressBar
impl Unpin for ProgressBar
impl !UnwindSafe for ProgressBar
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> ElementInteractableExt for Twhere
T: UiElement + 'static,
impl<T> ElementInteractableExt for Twhere
T: UiElement + 'static,
Source§fn into_interactable<S, F>(
self,
event: InteractableEvent,
signal: F,
) -> Interactable
fn into_interactable<S, F>( self, event: InteractableEvent, signal: F, ) -> Interactable
Available on crate feature
el_interactable only.Wrap the element in an
Interactable that will call the given signal when the specified event occursSource§fn on_click<S, F>(self, signal: F) -> Interactable
fn on_click<S, F>(self, signal: F) -> Interactable
Available on crate feature
el_interactable only.Wrap the element in an
Interactable that will call the given signal when clickedSource§fn on_hover<S, F>(self, signal: F) -> Interactable
fn on_hover<S, F>(self, signal: F) -> Interactable
Available on crate feature
el_interactable only.Wrap the element in an
Interactable that will call the given signal continuously while hoveredSource§fn on_active<S, F>(self, signal: F) -> Interactable
fn on_active<S, F>(self, signal: F) -> Interactable
Available on crate feature
el_interactable only.Wrap the element in an
Interactable that will call the given signal continuously while activeSource§impl<T> ElementTransformExt for Twhere
T: UiElement + 'static,
impl<T> ElementTransformExt for Twhere
T: UiElement + 'static,
Source§fn transform(self) -> Transformer
fn transform(self) -> Transformer
Available on crate feature
el_transformer only.Wrap the element in a
Transformer Read moreSource§impl<T> UiElementExt for Twhere
T: UiElement + 'static,
impl<T> UiElementExt for Twhere
T: UiElement + 'static,
Source§fn add_child(self, ui: &mut ElementList)
fn add_child(self, ui: &mut ElementList)
Add element as a child/nested element.