Trait ux::SurfaceExt [−][src]
pub trait SurfaceExt: 'static {
pub fn get_animating(&self) -> bool;
pub fn set_animating(&self, animating: bool);
pub fn connect_draw<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &dyn CanvasContext<Pattern>, i32, i32) -> bool;
pub fn connect_looped<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self);
pub fn connect_property_animating_notify<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self);
}Required methods
pub fn get_animating(&self) -> bool[src]
get_animating: @spinner: A #Surface widget
Determines whether the spinner is animating.
Returns: %true if the spinner is animating, %false otherwise
pub fn set_animating(&self, animating: bool)[src]
set_animating: @spinner: A #Surface widget @animating: %true to enable animation, %false to disable
Sets whether the spinner is animating. A spinner can be stopped if the task it represents has finished, or to save energy.
pub fn connect_draw<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &dyn CanvasContext<Pattern>, i32, i32) -> bool, [src]
F: 'static + Fn(&Self, &dyn CanvasContext<Pattern>, i32, i32) -> bool,
The Canvas::draw signal is emitted each time a canvas is
invalidated.
It is safe to connect multiple handlers to this signal: each
handler invocation will be automatically protected by cairo_save
and cairo_restore pairs.
cr
the Cairo context used to draw
width
the width of the canvas
height
the height of the canvas
Returns
true if the signal emission should stop, and
false otherwise
pub fn connect_looped<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self), [src]
F: 'static + Fn(&Self),
pub fn connect_property_animating_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self), [src]
F: 'static + Fn(&Self),
Implementors
impl<O> SurfaceExt for O where
O: Is<Surface>, [src]
O: Is<Surface>,
pub fn get_animating(&self) -> bool[src]
get_animating: @spinner: A #Surface widget
Determines whether the spinner is animating.
Returns: %true if the spinner is animating, %false otherwise
pub fn set_animating(&self, animating: bool)[src]
set_animating: @spinner: A #Surface widget @animating: %true to enable animation, %false to disable
Sets whether the spinner is animating. A spinner can be stopped if the task it represents has finished, or to save energy.
pub fn connect_draw<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &dyn CanvasContext<Pattern>, i32, i32) -> bool, [src]
F: 'static + Fn(&O, &dyn CanvasContext<Pattern>, i32, i32) -> bool,
The Canvas::draw signal is emitted each time a canvas is
invalidated.
It is safe to connect multiple handlers to this signal: each
handler invocation will be automatically protected by cairo_save
and cairo_restore pairs.
cr
the Cairo context used to draw
width
the width of the canvas
height
the height of the canvas
Returns
true if the signal emission should stop, and
false otherwise
pub fn connect_looped<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O), [src]
F: 'static + Fn(&O),
pub fn connect_property_animating_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O), [src]
F: 'static + Fn(&O),