Struct FaceStack
pub struct FaceStack {
pub side: f64,
pub overlap: f64,
pub max: usize,
}Expand description
How a row of faces is sized: the face’s side, how much each overlaps the one before, and how many faces show before the count badge.
Fields§
§side: f64§overlap: f64§max: usizeImplementations§
§impl FaceStack
impl FaceStack
pub fn in_face(height: f64) -> FaceStack
pub fn in_face(height: f64) -> FaceStack
The faces standing on a control’s own face height high (a bar’s group of who is
here): the ring and the ground around it fit within the control, so no face is cut by
the control’s edge.
pub fn group(&self, count: usize) -> (usize, usize)
pub fn group(&self, count: usize) -> (usize, usize)
The faces shown of count people, and the badge standing past them counting the
rest: up to three faces, then a “+N” face of its own (four people read as three faces
and “+1”, never as a face counting four).
pub fn group_width(&self, count: usize) -> f64
pub fn group_width(&self, count: usize) -> f64
How wide the group of count people is (Self::group), rings included.
pub fn split(&self, count: usize) -> (usize, usize)
pub fn split(&self, count: usize) -> (usize, usize)
The faces shown of count people, and how many the badge counts.
pub fn width_of(&self, shown: usize, more: usize) -> f64
pub fn width_of(&self, shown: usize, more: usize) -> f64
How wide shown faces and a badge counting more are.
pub fn paint(
&self,
ctx: &mut PaintCtx<'_>,
_: (f64, f64),
_: (&[Face<'_>], usize),
ground: AlphaColor<Srgb>,
) -> (Vec<Rect>, Option<Rect>)
pub fn paint( &self, ctx: &mut PaintCtx<'_>, _: (f64, f64), _: (&[Face<'_>], usize), ground: AlphaColor<Srgb>, ) -> (Vec<Rect>, Option<Rect>)
Paint faces (the ones shown, Self::split) and a badge counting
more people past them, ending at right, centred on center_y,
over ground. Returns each face’s rect (for hit-testing, by index
into faces) and the badge’s, if any.
Trait Implementations§
impl Copy for FaceStack
impl StructuralPartialEq for FaceStack
Auto Trait Implementations§
impl Freeze for FaceStack
impl RefUnwindSafe for FaceStack
impl Send for FaceStack
impl Sync for FaceStack
impl Unpin for FaceStack
impl UnsafeUnpin for FaceStack
impl UnwindSafe for FaceStack
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more