Struct cacao::progress::ProgressIndicator
source · [−]pub struct ProgressIndicator {
pub objc: ObjcProperty,
pub top: LayoutAnchorY,
pub leading: LayoutAnchorX,
pub left: LayoutAnchorX,
pub trailing: LayoutAnchorX,
pub right: LayoutAnchorX,
pub bottom: LayoutAnchorY,
pub width: LayoutAnchorDimension,
pub height: LayoutAnchorDimension,
pub center_x: LayoutAnchorX,
pub center_y: LayoutAnchorY,
}
Expand description
A control used for reporting progress to a user visually.
Fields
objc: ObjcProperty
A pointer to the Objective-C Object.
top: LayoutAnchorY
A pointer to the Objective-C runtime top layout constraint.
leading: LayoutAnchorX
A pointer to the Objective-C runtime leading layout constraint.
left: LayoutAnchorX
A pointer to the Objective-C runtime left layout constraint.
trailing: LayoutAnchorX
A pointer to the Objective-C runtime trailing layout constraint.
right: LayoutAnchorX
A pointer to the Objective-C runtime right layout constraint.
bottom: LayoutAnchorY
A pointer to the Objective-C runtime bottom layout constraint.
width: LayoutAnchorDimension
A pointer to the Objective-C runtime width layout constraint.
height: LayoutAnchorDimension
A pointer to the Objective-C runtime height layout constraint.
center_x: LayoutAnchorX
A pointer to the Objective-C runtime center X layout constraint.
center_y: LayoutAnchorY
A pointer to the Objective-C runtime center Y layout constraint.
Implementations
sourceimpl ProgressIndicator
impl ProgressIndicator
sourcepub fn start_animation(&self)
pub fn start_animation(&self)
Starts the animation for an indeterminate indicator.
sourcepub fn stop_animation(&self)
pub fn stop_animation(&self)
Stops any animations that are currently happening on this indicator (e.g, if it’s an indeterminate looping animation).
sourcepub fn set_style(&self, style: ProgressIndicatorStyle)
pub fn set_style(&self, style: ProgressIndicatorStyle)
Set the style for the progress indicator.
sourcepub fn set_indeterminate(&self, is_indeterminate: bool)
pub fn set_indeterminate(&self, is_indeterminate: bool)
Set whether this is an indeterminate indicator or not. Indeterminate indicators are “infinite” and their appearance is that of a circular spinner.
Invert this to go back to a bar appearance.
sourcepub fn set_value(&self, value: f64)
pub fn set_value(&self, value: f64)
Sets the value of this progress indicator.
If this progress indicator is indeterminate, this will have no effect.
Set whether this control is hidden or not.
Trait Implementations
sourceimpl Debug for ProgressIndicator
impl Debug for ProgressIndicator
sourceimpl Default for ProgressIndicator
impl Default for ProgressIndicator
sourceimpl Drop for ProgressIndicator
impl Drop for ProgressIndicator
sourcefn drop(&mut self)
fn drop(&mut self)
A bit of extra cleanup for delegate callback pointers.
If the originating ProgressIndicator
is being
dropped, we do some logic to clean it all up (e.g, we go ahead and check to see if
this has a superview (i.e, it’s in the heirarchy) on the Objective-C side. If it does, we go
ahead and remove it - this is intended to match the semantics of how Rust handles things).
There are, thankfully, no delegates we need to break here.
sourceimpl Layout for ProgressIndicator
impl Layout for ProgressIndicator
sourcefn set_needs_display(&self, needs_display: bool)
fn set_needs_display(&self, needs_display: bool)
Sets whether this needs to be redrawn before being displayed. Read more
sourcefn add_subview<V: Layout>(&self, view: &V)
fn add_subview<V: Layout>(&self, view: &V)
Adds another Layout-backed control or view as a subview of this view.
sourcefn remove_from_superview(&self)
fn remove_from_superview(&self)
Removes a control or view from the superview.
sourcefn set_frame<R: Into<CGRect>>(&self, rect: R)
fn set_frame<R: Into<CGRect>>(&self, rect: R)
Sets the frame
for the view this trait is applied to. Read more
sourcefn set_translates_autoresizing_mask_into_constraints(&self, translates: bool)
fn set_translates_autoresizing_mask_into_constraints(&self, translates: bool)
Sets whether the view for this trait should translate autoresizing masks into layout constraints. Read more
Sets whether the view for this is hidden or not. Read more
Returns whether this is hidden or not. Read more
Returns whether this is hidden, or whether an ancestor view is hidden.
sourcefn register_for_dragged_types(&self, types: &[PasteboardType])
fn register_for_dragged_types(&self, types: &[PasteboardType])
Register this view for drag and drop operations. Read more
sourcefn unregister_dragged_types(&self)
fn unregister_dragged_types(&self)
Unregisters this as a target for drag and drop operations. Read more
sourcefn set_posts_frame_change_notifications(&self, posts: bool)
fn set_posts_frame_change_notifications(&self, posts: bool)
Sets whether this posts notifications when the frame rectangle changes. Read more
sourcefn set_posts_bounds_change_notifications(&self, posts: bool)
fn set_posts_bounds_change_notifications(&self, posts: bool)
Sets whether this posts notifications when the bounds rectangle changes. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ProgressIndicator
impl !Send for ProgressIndicator
impl !Sync for ProgressIndicator
impl Unpin for ProgressIndicator
impl !UnwindSafe for ProgressIndicator
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more