pub struct Canvas<F> { /* private fields */ }
Expand description
Struct for canvas
Trait Implementations
sourceimpl<F> View for Canvas<F> where
F: Fn(&mut Context, LocalRect, &mut Vger) + 'static,
impl<F> View for Canvas<F> where
F: Fn(&mut Context, LocalRect, &mut Vger) + 'static,
sourcefn print(&self, _id: ViewId, _cx: &mut Context)
fn print(&self, _id: ViewId, _cx: &mut Context)
Prints a description of the view for debugging.
sourcefn layout(
&self,
id: ViewId,
sz: LocalSize,
cx: &mut Context,
_vger: &mut Vger
) -> LocalSize
fn layout(
&self,
id: ViewId,
sz: LocalSize,
cx: &mut Context,
_vger: &mut Vger
) -> LocalSize
Lays out subviews and return the size of the view.
sourcefn hittest(
&self,
id: ViewId,
pt: LocalPoint,
cx: &mut Context,
_vger: &mut Vger
) -> Option<ViewId>
fn hittest(
&self,
id: ViewId,
pt: LocalPoint,
cx: &mut Context,
_vger: &mut Vger
) -> Option<ViewId>
Returns the topmost view which the point intersects.
sourcefn access(
&self,
_id: ViewId,
_cx: &mut Context,
_nodes: &mut Vec<Node>
) -> Option<NodeId>
fn access(
&self,
_id: ViewId,
_cx: &mut Context,
_nodes: &mut Vec<Node>
) -> Option<NodeId>
Builds an AccessKit tree. The node ID for the subtree is returned. All generated nodes are accumulated.
sourcefn commands(&self, _id: ViewId, _cx: &mut Context, _cmds: &mut Vec<CommandInfo>)
fn commands(&self, _id: ViewId, _cx: &mut Context, _cmds: &mut Vec<CommandInfo>)
Accumulates information about menu bar commands.
sourcefn dirty(&self, _id: ViewId, _xform: LocalToWorld, _cx: &mut Context)
fn dirty(&self, _id: ViewId, _xform: LocalToWorld, _cx: &mut Context)
Determines dirty regions which need repainting.
sourcefn gc(&self, _id: ViewId, _cx: &mut Context, _map: &mut Vec<ViewId>)
fn gc(&self, _id: ViewId, _cx: &mut Context, _map: &mut Vec<ViewId>)
Gets IDs for state currently in use.
sourcefn is_flexible(&self) -> bool
fn is_flexible(&self) -> bool
For detecting flexible sized things in stacks.
Auto Trait Implementations
impl<F> RefUnwindSafe for Canvas<F> where
F: RefUnwindSafe,
impl<F> Send for Canvas<F> where
F: Send,
impl<F> Sync for Canvas<F> where
F: Sync,
impl<F> Unpin for Canvas<F> where
F: Unpin,
impl<F> UnwindSafe for Canvas<F> where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more