[−][src]Trait fltk::prelude::BrowserExt
Defines the methods implemented by all browser types
Required methods
fn remove(&mut self, line: u32)
Removes the specified line
fn add(&mut self, item: &str)
Adds an item
fn insert(&mut self, line: u32, item: &str)
Inserts an item at an index
fn move_item(&mut self, to: u32, from: u32)
Moves an item
fn swap(&mut self, a: u32, b: u32)
Swaps 2 items
fn clear(&mut self)
Clears the browser widget
fn size(&self) -> u32
Returns the number of items
fn set_size(&mut self, w: i32, h: i32)
Set the number of items
fn select(&mut self, line: u32)
Select an item at the specified line
fn selected(&self, line: u32) -> bool
Returns whether the item is selected
fn text(&self, line: u32) -> Option<String>
Returns the text of the selected item
fn set_text(&mut self, line: u32, txt: &str)
Sets the text of the selected item
fn load(&mut self, path: &Path) -> Result<(), FltkError>
Load a file
fn text_size(&self) -> u32
Return the text size
fn set_text_size(&mut self, sz: u32)
Sets the text size
fn set_icon<Img: ImageExt>(&mut self, line: u32, image: Option<Img>)
Sets the icon for browser elements
fn icon(&self, line: u32) -> Option<Image>
Returns the icon of a browser element
fn remove_icon(&mut self, line: u32)
Removes the icon of a browser element