pub struct MenuRoot {
pub menu_state: Arc<RwLock<MenuState>>,
pub id: Id,
}
Expand description
Menu root associated with an Id from a Response
Fields§
§id: Id
Implementations§
Source§impl MenuRoot
impl MenuRoot
pub fn new(position: Pos2, id: Id) -> Self
pub fn show<R>( &self, button: &Response, add_contents: impl FnOnce(&mut Ui) -> R, ) -> (MenuResponse, Option<InnerResponse<R>>)
Sourcepub fn context_interaction(
response: &Response,
root: &mut Option<Self>,
) -> MenuResponse
pub fn context_interaction( response: &Response, root: &mut Option<Self>, ) -> MenuResponse
Interaction with a context menu (secondary click).
Sourcepub fn context_click_interaction(
response: &Response,
root: &mut MenuRootManager,
)
pub fn context_click_interaction( response: &Response, root: &mut MenuRootManager, )
Respond to secondary (right) clicks.
pub fn stationary_click_interaction( button: &Response, root: &mut MenuRootManager, )
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MenuRoot
impl !RefUnwindSafe for MenuRoot
impl Send for MenuRoot
impl Sync for MenuRoot
impl Unpin for MenuRoot
impl !UnwindSafe for MenuRoot
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