pub struct Canvas { /* private fields */ }Available on macOS only.
Implementations§
Source§impl Canvas
impl Canvas
pub fn new(parent: impl AsContainer) -> Result<Self>
pub fn is_visible(&self) -> Result<bool>
pub fn set_visible(&mut self, v: bool) -> Result<()>
pub fn is_enabled(&self) -> Result<bool>
pub fn set_enabled(&mut self, v: bool) -> Result<()>
pub fn loc(&self) -> Result<Point>
pub fn set_loc(&mut self, p: Point) -> Result<()>
pub fn size(&self) -> Result<Size>
pub fn set_size(&mut self, v: Size) -> Result<()>
pub fn tooltip(&self) -> Result<String>
pub fn set_tooltip(&mut self, s: impl AsRef<str>) -> Result<()>
pub fn context(&mut self) -> Result<DrawingContext<'_>>
pub async fn wait_mouse_down(&self) -> MouseButton
pub async fn wait_mouse_up(&self) -> MouseButton
pub async fn wait_mouse_move(&self) -> Point
pub async fn wait_mouse_wheel(&self) -> Vector
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Canvas
impl !Send for Canvas
impl !Sync for Canvas
impl !UnwindSafe for Canvas
impl Freeze for Canvas
impl Unpin for Canvas
impl UnsafeUnpin for Canvas
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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