pub struct MacInlineActionButton<'a> { /* private fields */ }Expand description
Circular 16x16pt AppKit Inline Action Badge Button (used for inline +, -, x, or symbol actions).
§Example
use egui_macview::{MacAppearance, MacInlineActionButton, MacSymbol, MacTheme};
let theme = MacTheme::new(MacAppearance::Aqua);
if MacInlineActionButton::from_symbol(MacSymbol::Plus).theme(&theme).show(ui).clicked() {}Implementations§
Source§impl<'a> MacInlineActionButton<'a>
impl<'a> MacInlineActionButton<'a>
Sourcepub fn new(glyph: &'a str) -> Self
pub fn new(glyph: &'a str) -> Self
Creates an inline action badge button displaying glyph (such as "+", "-", or "×").
Sourcepub fn from_symbol(symbol: MacSymbol) -> Self
pub fn from_symbol(symbol: MacSymbol) -> Self
Creates an inline action badge button displaying a MacSymbol.
Sourcepub fn fixed_rect(self, rect: Rect) -> Self
pub fn fixed_rect(self, rect: Rect) -> Self
Pins the inline action button to an exact NIB rectangle.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for MacInlineActionButton<'a>
impl<'a> Freeze for MacInlineActionButton<'a>
impl<'a> Move for MacInlineActionButton<'a>
impl<'a> RefUnwindSafe for MacInlineActionButton<'a>
impl<'a> Send for MacInlineActionButton<'a>
impl<'a> Sync for MacInlineActionButton<'a>
impl<'a> Unpin for MacInlineActionButton<'a>
impl<'a> UnsafeUnpin for MacInlineActionButton<'a>
impl<'a> UnwindSafe for MacInlineActionButton<'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