pub struct MacPanel<'a> { /* private fields */ }Expand description
Authentic macOS NSPanel floating surface container.
Features authentic window background fill, border hairline strokes, optional title bar with centered title text, and customizable corner rounding.
§Example
use egui_macview::{MacPanel, MacTheme};
let theme = MacTheme::default();
let panel_rect = egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(200.0, 150.0));
MacPanel::new()
.theme(&theme)
.title("Inspector")
.show(ui, panel_rect, |panel_ui| {
panel_ui.label("Panel Content");
});Implementations§
Source§impl<'a> MacPanel<'a>
impl<'a> MacPanel<'a>
Sourcepub fn id(self, id_source: impl Hash + Debug) -> Self
pub fn id(self, id_source: impl Hash + Debug) -> Self
Sets an explicit widget Id for this panel.
Sourcepub fn theme(self, theme: &'a MacTheme) -> Self
pub fn theme(self, theme: &'a MacTheme) -> Self
Injects dynamic theme to eliminate hardcoded metrics and colors.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for MacPanel<'a>
impl<'a> Freeze for MacPanel<'a>
impl<'a> RefUnwindSafe for MacPanel<'a>
impl<'a> Send for MacPanel<'a>
impl<'a> Sync for MacPanel<'a>
impl<'a> Unpin for MacPanel<'a>
impl<'a> UnsafeUnpin for MacPanel<'a>
impl<'a> UnwindSafe for MacPanel<'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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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