Struct ui2::ContextMenu
source · pub struct ContextMenu { /* private fields */ }
Implementations§
source§impl ContextMenu
impl ContextMenu
pub fn build( cx: &mut WindowContext<'_>, f: impl FnOnce(Self, &mut WindowContext<'_>) -> Self ) -> View<Self>
pub fn header(self, title: impl Into<SharedString>) -> Self
pub fn separator(self) -> Self
pub fn entry( self, view: ListItem, on_click: impl Fn(&ClickEvent, &mut WindowContext<'_>) + 'static ) -> Self
pub fn action(self, view: ListItem, action: Box<dyn Action>) -> Self
pub fn confirm(&mut self, _: &Confirm, cx: &mut ViewContext<'_, Self>)
pub fn cancel(&mut self, _: &Cancel, cx: &mut ViewContext<'_, Self>)
Trait Implementations§
source§impl FocusableView for ContextMenu
impl FocusableView for ContextMenu
fn focus_handle(&self, _cx: &AppContext) -> FocusHandle
source§impl Render for ContextMenu
impl Render for ContextMenu
impl EventEmitter<Manager> for ContextMenu
Auto Trait Implementations§
impl !RefUnwindSafe for ContextMenu
impl !Send for ContextMenu
impl !Sync for ContextMenu
impl Unpin for ContextMenu
impl !UnwindSafe for ContextMenu
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