pub struct MenubarBuilder {
pub mac_options: MacOptions,
pub app_name: String,
pub menubar: Menu,
pub menu_items: Vec<MenuItem>,
pub is_macos: bool,
}Expand description
Provides a builder pattern for building application menus.
For usage example please refer to Examples
Fields§
§mac_options: MacOptionsMac-specific options applied when creating the built-in menubar.
app_name: StringApplication name used for the Mac built-in application menu.
The underlying NW.js menubar being assembled.
Top-level menu items appended to the menubar.
is_macos: boolWhether the host platform is macOS, enabling Mac-specific behavior.
Implementations§
Source§impl MenubarBuilder
impl MenubarBuilder
Sourcepub fn new(app_name: &str, is_macos: bool) -> Self
pub fn new(app_name: &str, is_macos: bool) -> Self
Creates a new menubar builder for the given application name, where
is_macos enables Mac-specific built-in menu handling.
Sourcepub fn mac_hide_edit(self, hide: bool) -> Self
pub fn mac_hide_edit(self, hide: bool) -> Self
(Mac) do not populate the Edit menu
Sourcepub fn mac_hide_window(self, hide: bool) -> Self
pub fn mac_hide_window(self, hide: bool) -> Self
(Mac) do not populate the Window menu
Auto Trait Implementations§
impl Freeze for MenubarBuilder
impl RefUnwindSafe for MenubarBuilder
impl Send for MenubarBuilder
impl Sync for MenubarBuilder
impl Unpin for MenubarBuilder
impl UnsafeUnpin for MenubarBuilder
impl UnwindSafe for MenubarBuilder
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