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>( &mut self, button: &Response, add_contents: impl FnOnce(&mut Ui) -> R, ) -> (MenuResponse, Option<InnerResponse<R>>)
sourcefn stationary_interaction(
button: &Response,
root: &mut MenuRootManager,
) -> MenuResponse
fn stationary_interaction( button: &Response, root: &mut MenuRootManager, ) -> MenuResponse
Interaction with a stationary menu, i.e. fixed in another Ui.
Responds to primary clicks.
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