pub struct Marquee { /* private fields */ }Expand description
The animated outline of a selection, the “marching ants”: a dark line with light dashes walking over it, which reads over any picture. Give it a rectangle, a closed path or loose segments, such as the edges of a mask, in the units of the space.
The dashes stop with reduced motion, and then it asks for no frames at all. It takes no input, so what is underneath still gets the pointer.
use ravenrs_core::Rect;
use ravenrs_widgets::Marquee;
let marquee = Marquee::rect(Rect::new(20.0, 20.0, 120.0, 80.0)).size(320.0, 200.0);Implementations§
Source§impl Marquee
impl Marquee
Sourcepub fn path(points: impl IntoIterator<Item = Point>) -> Self
pub fn path(points: impl IntoIterator<Item = Point>) -> Self
Along a closed path of these points.
Sourcepub fn segments(segments: impl IntoIterator<Item = (Point, Point)>) -> Self
pub fn segments(segments: impl IntoIterator<Item = (Point, Point)>) -> Self
Along separate segments, in any order: the outline of a mask, say.
Source§impl Marquee
impl Marquee
Sourcepub fn size(self, width: f32, height: f32) -> Self
pub fn size(self, width: f32, height: f32) -> Self
Fixed size in logical pixels, instead of taking the free space.
Sourcepub fn grow(self, grow: f32) -> Self
pub fn grow(self, grow: f32) -> Self
How much of the free space along the parent stack it takes: 1 by default, or 0 over a stage, which then decides the size.
Sourcepub fn stage(self, stage: impl View + 'static) -> Self
pub fn stage(self, stage: impl View + 'static) -> Self
The view it goes over, such as an Image or a
ZoomPanView, which gives it its size. Without one, put it in
a ZStack with a fixed size.
Sourcepub fn space(self, space: ContentSpace) -> Self
pub fn space(self, space: ContentSpace) -> Self
Where the content is, and so the units of its coordinates: by default, its own box.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Marquee
impl !Send for Marquee
impl !Sync for Marquee
impl !UnwindSafe for Marquee
impl Freeze for Marquee
impl Unpin for Marquee
impl UnsafeUnpin for Marquee
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
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<V> ViewExt for Vwhere
V: View,
impl<V> ViewExt for Vwhere
V: View,
Source§fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
Source§fn background(self, fill: impl Into<Fill>) -> Styled<Self>
fn background(self, fill: impl Into<Fill>) -> Styled<Self>
Source§fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
None keeps the content size.