pub struct HmenuBuilder { /* private fields */ }
Expand description
Low level HMENU builder. Instanced by ControlBase::build_hmenu
.
Implementations§
Sourcepub fn text<'a>(self, text: &'a str) -> HmenuBuilder
pub fn text<'a>(self, text: &'a str) -> HmenuBuilder
Set the text of the Menu
Sourcepub fn item(self, i: bool) -> HmenuBuilder
pub fn item(self, i: bool) -> HmenuBuilder
Set if the menu should be an item or a menu
Sourcepub fn separator(self, i: bool) -> HmenuBuilder
pub fn separator(self, i: bool) -> HmenuBuilder
Set if the menu item should be a separator
Sourcepub fn popup(self, i: bool) -> HmenuBuilder
pub fn popup(self, i: bool) -> HmenuBuilder
Set if the menu item should be a separator
Sourcepub fn parent(self, parent: ControlHandle) -> HmenuBuilder
pub fn parent(self, parent: ControlHandle) -> HmenuBuilder
Set the parent of the menu. Can be a window or another menu.
pub fn build(self) -> Result<ControlHandle, NwgError>
Trait Implementations§
Source§fn default() -> HmenuBuilder
fn default() -> HmenuBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
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