Struct StripLayout
pub struct StripLayout { /* private fields */ }Expand description
The pills and the add button of one strip, laid out.
Implementations§
§impl StripLayout
impl StripLayout
pub fn height(&self) -> f64
pub fn pills(&self) -> &[StripPill]
pub fn with_minimum_target(self, side: f64) -> StripLayout
pub fn with_minimum_target(self, side: f64) -> StripLayout
The layout whose controls are targets of at least side each way
(the input’s minimum: 48 on touch), their faces unchanged.
pub fn hit(&self, point: Point) -> Option<StripHit>
pub fn hit(&self, point: Point) -> Option<StripHit>
What is at point: the control whose face holds it, else the one
whose grown target does. A pill of someone who may not react is not a
control.
pub fn targets(&self) -> Vec<(Rect, StripHit)>
pub fn targets(&self) -> Vec<(Rect, StripHit)>
Every control with its target, pills first: a canvas host registers them as its hit targets.
pub fn reach(&self) -> Rect
pub fn reach(&self) -> Rect
Everything a press can reach: the strip, and its controls’ targets where they grow past it.
pub fn tooltip_at(
&self,
point: Point,
name: &dyn Fn(&Reactor) -> String,
) -> Option<(Rect, String)>
pub fn tooltip_at( &self, point: Point, name: &dyn Fn(&Reactor) -> String, ) -> Option<(Rect, String)>
The tooltip of what is at point: who reacted with a pill’s emoji
(name names each of them; a reactor shown under a name of their
own, a bridged account, keeps it), or what the add button does.
pub fn accessibility(&self) -> Vec<AccessNode>
pub fn accessibility(&self) -> Vec<AccessNode>
What a pill or the add button says to assistive technology: a toggle per pill (“Remove 👍 reaction”, with its count), then the add button.
Trait Implementations§
§impl Clone for StripLayout
impl Clone for StripLayout
§fn clone(&self) -> StripLayout
fn clone(&self) -> StripLayout
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for StripLayout
impl Debug for StripLayout
§impl Default for StripLayout
impl Default for StripLayout
§fn default() -> StripLayout
fn default() -> StripLayout
§impl PartialEq for StripLayout
impl PartialEq for StripLayout
impl StructuralPartialEq for StripLayout
Auto Trait Implementations§
impl Freeze for StripLayout
impl RefUnwindSafe for StripLayout
impl Send for StripLayout
impl Sync for StripLayout
impl Unpin for StripLayout
impl UnsafeUnpin for StripLayout
impl UnwindSafe for StripLayout
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