Struct FloatingPanelFace
pub struct FloatingPanelFace { /* private fields */ }Expand description
A floating panel’s shape: how tall its header and footer are and whether its body holds anything.
Implementations§
§impl FloatingPanelFace
impl FloatingPanelFace
pub fn new() -> FloatingPanelFace
pub fn header(self, height: f64) -> FloatingPanelFace
pub fn header(self, height: f64) -> FloatingPanelFace
A header slot whose content is height tall (a field: its control
height).
A footer slot whose content is height tall.
pub fn body_empty(self, empty: bool) -> FloatingPanelFace
pub fn body_empty(self, empty: bool) -> FloatingPanelFace
Whether the body holds nothing: then the header stands alone, with no hairline under it.
pub fn slot_inset(theme: &Theme) -> f64
pub fn slot_inset(theme: &Theme) -> f64
The inset of the header and footer content from the panel’s edge.
pub fn body_inset(theme: &Theme) -> f64
pub fn body_inset(theme: &Theme) -> f64
The inset of body rows from the panel’s edge: the menu inset.
pub fn header_extent(&self, theme: &Theme) -> f64
pub fn header_extent(&self, theme: &Theme) -> f64
The height the header slot takes, padding included.
The height the footer slot takes, padding included.
pub fn height_for(&self, body: f64, theme: &Theme) -> f64
pub fn layout(&self, panel: Rect, theme: &Theme) -> FloatingPanelLayout
pub fn layout(&self, panel: Rect, theme: &Theme) -> FloatingPanelLayout
Lay the parts out in panel.
pub fn paint(
&self,
scene: &mut Scene,
transform: Affine,
panel: Rect,
shadow: f32,
theme: &Theme,
) -> (FloatingPanelLayout, Theme)
pub fn paint( &self, scene: &mut Scene, transform: Affine, panel: Rect, shadow: f32, theme: &Theme, ) -> (FloatingPanelLayout, Theme)
Paint the panel in panel (its shadow, floating ground, inner
hairline and the rule under the header) and return its layout and
the theme its contents paint with. shadow scales the shadow, for a
panel still arriving.
pub fn paint_body(
&self,
scene: &mut Scene,
transform: Affine,
panel: Rect,
theme: &Theme,
) -> (FloatingPanelLayout, Theme)
pub fn paint_body( &self, scene: &mut Scene, transform: Affine, panel: Rect, theme: &Theme, ) -> (FloatingPanelLayout, Theme)
Self::paint without the shadow, for a host that paints and fades
the shadow itself (the shell’s palette arriving).
Trait Implementations§
§impl Clone for FloatingPanelFace
impl Clone for FloatingPanelFace
§fn clone(&self) -> FloatingPanelFace
fn clone(&self) -> FloatingPanelFace
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 FloatingPanelFace
impl Debug for FloatingPanelFace
§impl Default for FloatingPanelFace
impl Default for FloatingPanelFace
§fn default() -> FloatingPanelFace
fn default() -> FloatingPanelFace
§impl PartialEq for FloatingPanelFace
impl PartialEq for FloatingPanelFace
§fn eq(&self, other: &FloatingPanelFace) -> bool
fn eq(&self, other: &FloatingPanelFace) -> bool
self and other values to be equal, and is used by ==.impl Copy for FloatingPanelFace
impl StructuralPartialEq for FloatingPanelFace
Auto Trait Implementations§
impl Freeze for FloatingPanelFace
impl RefUnwindSafe for FloatingPanelFace
impl Send for FloatingPanelFace
impl Sync for FloatingPanelFace
impl Unpin for FloatingPanelFace
impl UnsafeUnpin for FloatingPanelFace
impl UnwindSafe for FloatingPanelFace
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