[−][src]Struct vgtk::MenuBuilder
Makes a gtk::Menu
for you.
Examples
use vgtk::menu; let menu_bar = menu() .section_label("File", menu() .item("Open...", "win.open") .item("Save", "win.save") .item("Quit", "app.quit") ) .section_label("Help", menu() .item("About...", "app.about") ).build();
Methods
impl MenuBuilder
[src]
pub fn item(self, label: &str, action: &str) -> Self
[src]
Add a MenuItem
to this menu.
pub fn section(self, section: MenuBuilder) -> Self
[src]
Add a section to this menu.
pub fn section_label(self, label: &str, section: MenuBuilder) -> Self
[src]
Add a section with a label to this menu.
pub fn sub(self, label: &str, submenu: MenuBuilder) -> Self
[src]
Add a submenu to this menu.
pub fn build(self) -> Menu
[src]
Finalise the MenuBuilder
and get your Menu
.
Auto Trait Implementations
impl RefUnwindSafe for MenuBuilder
impl !Send for MenuBuilder
impl !Sync for MenuBuilder
impl Unpin for MenuBuilder
impl UnwindSafe for MenuBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,