Struct PropertyListFace
pub struct PropertyListFace<'a> { /* private fields */ }Expand description
Immediate-mode property list. paint takes the list’s outer rect: the
content edge grown by row_bleed.
Implementations§
§impl<'a> PropertyListFace<'a>
impl<'a> PropertyListFace<'a>
pub fn new(rows: &'a [PropertyRow<'a>]) -> PropertyListFace<'a>
pub fn striped(self) -> PropertyListFace<'a>
pub fn striped(self) -> PropertyListFace<'a>
Tint alternate rows: for long, dense inspectors where the eye has to follow a row across.
pub fn compact(self) -> PropertyListFace<'a>
pub fn compact(self) -> PropertyListFace<'a>
Rows a small control tall: an inspector beside a canvas.
pub fn label_column(self, width: f64) -> PropertyListFace<'a>
pub fn label_column(self, width: f64) -> PropertyListFace<'a>
The label column every list that must line up uses, from the widest
property_label_column among them.
pub fn hovered_action(self, row: Option<usize>) -> PropertyListFace<'a>
pub fn hovered_action(self, row: Option<usize>) -> PropertyListFace<'a>
The row whose first action the pointer is over.
pub fn height(&self, text: &mut TextRenderer, theme: &Theme, width: f64) -> f64
pub fn height(&self, text: &mut TextRenderer, theme: &Theme, width: f64) -> f64
The height the list takes at width.
pub fn is_stacked(
&self,
text: &mut TextRenderer,
theme: &Theme,
width: f64,
) -> bool
pub fn is_stacked( &self, text: &mut TextRenderer, theme: &Theme, width: f64, ) -> bool
Whether the list stacks labels above values at width.
pub fn action_rects(
&self,
text: &mut TextRenderer,
theme: &Theme,
origin: Point,
width: f64,
) -> Vec<(usize, Rect)>
pub fn action_rects( &self, text: &mut TextRenderer, theme: &Theme, origin: Point, width: f64, ) -> Vec<(usize, Rect)>
Each row’s first action target in a list laid out from origin at
width, by row index.
pub fn action_targets(
&self,
text: &mut TextRenderer,
theme: &Theme,
origin: Point,
width: f64,
) -> Vec<((usize, usize), Rect)>
pub fn action_targets( &self, text: &mut TextRenderer, theme: &Theme, origin: Point, width: f64, ) -> Vec<((usize, usize), Rect)>
Every action target in a list laid out from origin at width, by
row index and action index.
pub fn paint(&self, ctx: &mut PaintCtx<'_>, rect: Rect)
pub fn paint(&self, ctx: &mut PaintCtx<'_>, rect: Rect)
Paint the list from rect’s top-left at rect’s width.
pub fn accessibility(&self) -> Vec<AccessNode>
pub fn accessibility(&self) -> Vec<AccessNode>
One accessibility node per row: a labelled value.
Trait Implementations§
§impl<'a> Clone for PropertyListFace<'a>
impl<'a> Clone for PropertyListFace<'a>
§fn clone(&self) -> PropertyListFace<'a>
fn clone(&self) -> PropertyListFace<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for PropertyListFace<'a>
impl<'a> RefUnwindSafe for PropertyListFace<'a>
impl<'a> Send for PropertyListFace<'a>
impl<'a> Sync for PropertyListFace<'a>
impl<'a> Unpin for PropertyListFace<'a>
impl<'a> UnsafeUnpin for PropertyListFace<'a>
impl<'a> UnwindSafe for PropertyListFace<'a>
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
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> 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