pub struct ContextMenuViewer { /* private fields */ }Expand description
Provides the ContextMenu state and renders the floating menu overlay.
Mount this as high up in your tree as possible (typically in your app
component) so the rendered menu inherits styling like font_size from
the app’s root element.
§Example
fn app() -> impl IntoElement {
rect()
.font_size(18.)
.child(ContextMenuViewer::new())
.child("Your app content here")
}Implementations§
Trait Implementations§
Source§impl Clone for ContextMenuViewer
impl Clone for ContextMenuViewer
Source§fn clone(&self) -> ContextMenuViewer
fn clone(&self) -> ContextMenuViewer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ComponentOwned for ContextMenuViewer
impl ComponentOwned for ContextMenuViewer
Source§impl Default for ContextMenuViewer
impl Default for ContextMenuViewer
Source§fn default() -> ContextMenuViewer
fn default() -> ContextMenuViewer
Returns the “default value” for a type. Read more
Source§impl KeyExt for ContextMenuViewer
impl KeyExt for ContextMenuViewer
Source§impl PartialEq for ContextMenuViewer
impl PartialEq for ContextMenuViewer
impl StructuralPartialEq for ContextMenuViewer
Auto Trait Implementations§
impl Freeze for ContextMenuViewer
impl RefUnwindSafe for ContextMenuViewer
impl Send for ContextMenuViewer
impl Sync for ContextMenuViewer
impl Unpin for ContextMenuViewer
impl UnsafeUnpin for ContextMenuViewer
impl UnwindSafe for ContextMenuViewer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Component for T
impl<T> Component for T
fn render(&self) -> impl IntoElement
fn render_key(&self) -> DiffKey
§impl<T> ComponentKey for Twhere
T: Component,
impl<T> ComponentKey for Twhere
T: Component,
fn default_key(&self) -> DiffKey
§impl<T> ComponentProps for T
impl<T> ComponentProps for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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