pub struct Popover { /* private fields */ }Expand description
Popover component for floating panels anchored to elements
§Example
use armas_basic::components::Popover;
let mut popover = Popover::new("settings").open(true);
popover.show(ctx, theme, anchor, |ui| {
ui.label("Popover content");
});Implementations§
Source§impl Popover
impl Popover
Sourcepub const fn open(self, is_open: bool) -> Self
pub const fn open(self, is_open: bool) -> Self
Set the popover to be open (for external control)
Sourcepub const fn position(self, position: PopoverPosition) -> Self
pub const fn position(self, position: PopoverPosition) -> Self
Set the popover position relative to anchor
Sourcepub const fn style(self, style: PopoverStyle) -> Self
pub const fn style(self, style: PopoverStyle) -> Self
Set the popover visual style
Sourcepub const fn color(self, color: PopoverColor) -> Self
pub const fn color(self, color: PopoverColor) -> Self
Set the popover color theme
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Popover
impl RefUnwindSafe for Popover
impl Send for Popover
impl Sync for Popover
impl Unpin for Popover
impl UnsafeUnpin for Popover
impl UnwindSafe for Popover
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
Mutably borrows from an owned value. Read more