[−][src]Trait fltk::prelude::MenuTrait
Defines the methods implemented by all menu widgets
Required methods
fn get_item(&self, name: &str) -> MenuItem
Get a menu item by name
fn text_font(&self) -> Font
Return the text font
fn set_text_font(&mut self, c: Font)
Sets the text font
fn text_size(&self) -> usize
Return the text size
fn set_text_size(&mut self, c: usize)
Sets the text size
fn text_color(&self) -> Color
Return the text color
fn set_text_color(&mut self, c: Color)
Sets the text color
fn add<'a>(
&'a mut self,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)
&'a mut self,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)
Add a menu item along with its callback
fn add_choice(&mut self, text: &str)
Adds a simple text option to the Choice and MenuButton widgets
fn get_choice(&self) -> String
Gets the user choice from the Choice and MenuButton widgets
Implementors
impl MenuTrait for Choice
[src]
fn add<'a>(
&'a mut self,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)
[src]
&'a mut self,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)
fn get_item(&self, name: &str) -> MenuItem
[src]
fn text_font(&self) -> Font
[src]
fn set_text_font(&mut self, c: Font)
[src]
fn text_size(&self) -> usize
[src]
fn set_text_size(&mut self, c: usize)
[src]
fn text_color(&self) -> Color
[src]
fn set_text_color(&mut self, c: Color)
[src]
fn add_choice(&mut self, text: &str)
[src]
fn get_choice(&self) -> String
[src]
impl MenuTrait for MenuBar
[src]
fn add<'a>(
&'a mut self,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)
[src]
&'a mut self,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)
fn get_item(&self, name: &str) -> MenuItem
[src]
fn text_font(&self) -> Font
[src]
fn set_text_font(&mut self, c: Font)
[src]
fn text_size(&self) -> usize
[src]
fn set_text_size(&mut self, c: usize)
[src]
fn text_color(&self) -> Color
[src]
fn set_text_color(&mut self, c: Color)
[src]
fn add_choice(&mut self, text: &str)
[src]
fn get_choice(&self) -> String
[src]
impl MenuTrait for MenuButton
[src]
fn add<'a>(
&'a mut self,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)
[src]
&'a mut self,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)