[][src]Trait fltk::prelude::BrowserExt

pub trait BrowserExt: WidgetExt {
    fn remove(&mut self, line: u32);
fn add(&mut self, item: &str);
fn insert(&mut self, line: u32, item: &str);
fn move_item(&mut self, to: u32, from: u32);
fn swap(&mut self, a: u32, b: u32);
fn clear(&mut self);
fn size(&self) -> u32;
fn set_size(&mut self, w: i32, h: i32);
fn select(&mut self, line: u32);
fn selected(&self, line: u32) -> bool;
fn text(&self, line: u32) -> Option<String>;
fn set_text(&mut self, line: u32, txt: &str);
fn load_file(&mut self, path: &Path);
fn text_size(&self) -> u32;
fn set_text_size(&mut self, sz: u32);
fn set_icon<Img: ImageExt>(&mut self, line: u32, image: &Img);
fn icon(&self, line: u32) -> Option<Image>;
fn remove_icon(&mut self, line: u32); }

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_file(&mut self, path: &Path)

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: &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

Loading content...

Implementors

impl BrowserExt for Browser[src]

impl BrowserExt for FileBrowser[src]

impl BrowserExt for HoldBrowser[src]

impl BrowserExt for MultiBrowser[src]

impl BrowserExt for SelectBrowser[src]

Loading content...