pub trait ContextMenu {
// Required methods
fn show_context_menu_for_gtk_window(
&self,
w: &Window,
position: Option<Position>,
);
fn gtk_context_menu(&self) -> Menu;
}
Expand description
A helper trait with methods to help creating a context menu.
Required Methods§
Shows this menu as a context menu inside a gtk::Window
position
is relative to the window top-left corner, ifNone
, the cursor position is used.
Get the underlying gtk menu reserved for context menus.
The returned gtk::Menu
is valid as long as the ContextMenu
is.