[−][src]Trait fltk::prelude::MenuTrait
Defines the methods implemented by all menu widgets
Required methods
fn get_item(&self, name: &str) -> Option<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) -> u32
Return the text size
fn set_text_size(&mut self, c: u32)
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 insert<'a>(
&'a mut self,
idx: u32,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)
&'a mut self,
idx: u32,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)
Inserts a menu item at an index 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) -> Option<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 insert<'a>(
&'a mut self,
idx: u32,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)
[src]
&'a mut self,
idx: u32,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)
fn get_item(&self, name: &str) -> Option<MenuItem>
[src]
fn text_font(&self) -> Font
[src]
fn set_text_font(&mut self, c: Font)
[src]
fn text_size(&self) -> u32
[src]
fn set_text_size(&mut self, c: u32)
[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) -> Option<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 insert<'a>(
&'a mut self,
idx: u32,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)
[src]
&'a mut self,
idx: u32,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)
fn get_item(&self, name: &str) -> Option<MenuItem>
[src]
fn text_font(&self) -> Font
[src]
fn set_text_font(&mut self, c: Font)
[src]
fn text_size(&self) -> u32
[src]
fn set_text_size(&mut self, c: u32)
[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) -> Option<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>
)
fn insert<'a>(
&'a mut self,
idx: u32,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)
[src]
&'a mut self,
idx: u32,
name: &str,
shortcut: Shortcut,
flag: MenuFlag,
cb: Box<dyn FnMut() + 'a>
)