pub struct MacOriginMatrix<'a> { /* private fields */ }Expand description
Authentic macOS Pro-Inspector 3x3 Transform Origin / Anchor Pin Grid (MacOriginMatrix).
§Example
use egui_macview::{MacAppearance, MacOriginAnchor, MacOriginMatrix, MacTheme};
let theme = MacTheme::new(MacAppearance::Aqua);
let mut anchor = MacOriginAnchor::Center;
MacOriginMatrix::new(&mut anchor).theme(&theme).show(ui);Implementations§
Source§impl<'a> MacOriginMatrix<'a>
impl<'a> MacOriginMatrix<'a>
Sourcepub fn new(selected: &'a mut MacOriginAnchor) -> Self
pub fn new(selected: &'a mut MacOriginAnchor) -> Self
Creates a new 3x3 origin matrix bound to a MacOriginAnchor.
Sourcepub fn from_index(selected_index: &'a mut usize) -> Self
pub fn from_index(selected_index: &'a mut usize) -> Self
Creates a new 3x3 origin matrix bound to a row-major usize index (0..9).
Sourcepub fn control_size(self, size: MacControlSize) -> Self
pub fn control_size(self, size: MacControlSize) -> Self
Sets the AppKit control size (Regular 34pt, Small 28pt, Mini 22pt).
Sourcepub fn fixed_rect(self, rect: Rect) -> Self
pub fn fixed_rect(self, rect: Rect) -> Self
Pins the origin matrix to an exact NIB rectangle.
Sourcepub fn node_center(rect: Rect, anchor: MacOriginAnchor, cell_step: f32) -> Pos2
pub fn node_center(rect: Rect, anchor: MacOriginAnchor, cell_step: f32) -> Pos2
Computes the exact center position of anchor inside rect given cell_step.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for MacOriginMatrix<'a>
impl<'a> Forget for MacOriginMatrix<'a>
impl<'a> Freeze for MacOriginMatrix<'a>
impl<'a> Move for MacOriginMatrix<'a>
impl<'a> RefUnwindSafe for MacOriginMatrix<'a>
impl<'a> Send for MacOriginMatrix<'a>
impl<'a> Sync for MacOriginMatrix<'a>
impl<'a> Unpin for MacOriginMatrix<'a>
impl<'a> UnsafeUnpin for MacOriginMatrix<'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