[−][src]Struct pushrod::widget::progress_widget::ProgressWidget
Draws a progress bar, with progress being a value from 0 to 100. Configurable options are:
CONFIG_BORDER_WIDTH- configures the border width of the progress bar.CONFIG_BORDER_COLOR- configures the border color of the progress bar.CONFIG_SECONDARY_COLOR- configures the fill color of the progress bar.CONFIG_PROGRESS- configures the progress by percentage from 0-100.
Methods
impl ProgressWidget[src]
Trait Implementations
impl Widget for ProgressWidget[src]
fn config(&mut self) -> &mut Configurable[src]
fn set_config(&mut self, config: u8, config_value: Config)[src]
fn draw(&mut self, c: Context, g: &mut GlGraphics, clip: &DrawState)[src]
fn invalidate(&mut self)[src]
Indicates that a Widget object needs to be repainted.
fn clear_invalidate(&mut self)[src]
Clears the invalidation flag. Set this when the draw function completes. Otherwise, this Widget object may be continuously repainted. Read more
fn is_invalidated(&mut self) -> bool[src]
Indicates whether or not a Widget needs to be repainted.
fn get_config(&mut self, config: u8) -> Option<&Config>[src]
Master config getter - use convenience methods.
fn set_point(&mut self, config: u8, x: i32, y: i32)[src]
Sets a point value for a configuration key.
fn set_size(&mut self, config: u8, w: i32, h: i32)[src]
Sets a size value for a configuration key.
fn set_color(&mut self, config: u8, color: Color)[src]
Sets a color for a configuration key.
fn set_numeric(&mut self, config: u8, value: u64)[src]
Sets a numeric value for a configuration key.
fn set_text(&mut self, config: u8, text: String)[src]
Sets a text value for a configuration key.
fn set_toggle(&mut self, config: u8, flag: bool)[src]
Sets a toggle value for a configuration key.
fn handle_event(
&mut self,
_injected: bool,
_event: CallbackEvent
) -> Option<CallbackEvent>[src]
&mut self,
_injected: bool,
_event: CallbackEvent
) -> Option<CallbackEvent>
Custom handler to receive an event. Any Widget that implements this does so to handle top-level GUI events, such as a mouse entering or exiting the bounds of this Widget. If the injected flag is set, it indicates that the event supplied was generate by a Widget, and not by the run loop. Read more
fn inject_event(&mut self, _widget_id: i32) -> Option<CallbackEvent>[src]
Injects an event into the run loop. This can be a timer event, a refresh event, or whatever the Widget wants to inject. These should be custom events, not system events. This method only gets called if injects_events returns true. Read more
fn injects_events(&mut self) -> bool[src]
If this Widget provides custom injected events that are generated outside of the handle_event loop, indicate true. Only override if necessary. (See TimerWidget for reference.) Read more
fn draw_disabled(&mut self, c: Context, g: &mut GlGraphics, clip: &DrawState)[src]
Internal method that is used to draw a box around the Widget when in disabled state. You can override this method, should you choose to, so that the disabled state appears differently in your application. It is safe to leave this alone. Read more
fn draw_with_offset(
&mut self,
c: Context,
g: &mut GlGraphics,
clip: &DrawState,
point_offset: Point
)[src]
&mut self,
c: Context,
g: &mut GlGraphics,
clip: &DrawState,
point_offset: Point
)
Draws an object at an offset on the screen. This is a convenience method that is used by other Widgets that contain multiple widgets. (See CheckboxWidget and ImageButtonWidget for good examples of this use.) Read more
Auto Trait Implementations
impl Send for ProgressWidget
impl Unpin for ProgressWidget
impl Sync for ProgressWidget
impl UnwindSafe for ProgressWidget
impl RefUnwindSafe for ProgressWidget
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value as a parameter of self.