pub struct Border { /* private fields */ }Expand description
Draw a border around an element.
The border will size it self around the child if it has one.
If a width and / or a height is provided then the border will produce tight constraints for the child.
If a border has no size (width and height) and no child then nothing will be rendered.
To render a border with no child provide a width and a height.
Trait Implementations§
Source§impl Widget for Border
impl Widget for Border
fn layout<'bp>( &mut self, children: LayoutForEach<'_, 'bp>, constraints: Constraints, id: WidgetId, ctx: &mut LayoutCtx<'_, 'bp>, ) -> Result<Size>
fn position<'bp>( &mut self, children: PositionChildren<'_, 'bp>, _: WidgetId, attribute_storage: &AttributeStorage<'bp>, ctx: PositionCtx, )
fn paint<'bp>( &mut self, children: PaintChildren<'_, 'bp>, _id: WidgetId, attribute_storage: &AttributeStorage<'bp>, ctx: PaintCtx<'_, SizePos>, )
fn inner_bounds(&self, pos: Pos, size: Size) -> Region
fn floats(&self) -> bool
fn needs_reflow(&mut self) -> bool
Auto Trait Implementations§
impl Freeze for Border
impl RefUnwindSafe for Border
impl Send for Border
impl Sync for Border
impl Unpin for Border
impl UnwindSafe for Border
Blanket Implementations§
Source§impl<T> AnyWidget for Twhere
T: 'static + Widget,
impl<T> AnyWidget for Twhere
T: 'static + Widget,
fn to_any_ref(&self) -> &(dyn Any + 'static)
fn to_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn any_layout<'bp>( &mut self, children: LayoutForEach<'_, 'bp>, constraints: Constraints, id: Key, ctx: &mut LayoutCtx<'_, 'bp>, ) -> Result<Size, Error>
fn any_position<'bp>( &mut self, children: ForEach<'_, 'bp, PositionFilter>, id: Key, attribute_storage: &AttributeStorage<'bp>, ctx: PositionCtx, )
fn any_paint<'bp>( &mut self, children: ForEach<'_, 'bp, PaintFilter>, id: Key, attribute_storage: &AttributeStorage<'bp>, ctx: PaintCtx<'_, SizePos>, )
fn any_inner_bounds(&self, pos: Pos, size: Size) -> Region
fn any_floats(&self) -> bool
fn any_needs_reflow(&mut self) -> bool
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
Mutably borrows from an owned value. Read more