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

pub unsafe 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(&mut self, path: &Path) -> Result<(), FltkError>;
fn text_size(&self) -> u32;
fn set_text_size(&mut self, sz: u32);
fn set_icon<Img: ImageExt>(&mut self, line: u32, image: Option<Img>);
fn icon(&self, line: u32) -> Option<Image>;
fn remove_icon(&mut self, line: u32);
fn topline(&mut self, line: u32);
fn bottomline(&mut self, line: u32);
fn middleline(&mut self, line: u32);
fn format_char(&self) -> char;
fn set_format_char(&mut self, c: char);
fn column_char(&self) -> char;
fn set_column_char(&mut self, c: char);
fn column_widths(&self) -> Vec<i32>;
fn set_column_widths(&mut self, arr: &[i32]);
fn displayed(&self, line: u32) -> bool;
fn make_visible(&mut self, line: u32);
fn position(&self) -> u32;
fn set_position(&mut self, pos: u32);
fn hposition(&self) -> u32;
fn set_hposition(&mut self, pos: u32);
fn has_scrollbar(&self) -> BrowserScrollBar;
fn set_has_scrollbar(&mut self, mode: BrowserScrollBar);
fn scrollbar_size(&self) -> u32;
fn set_scrollbar_size(&mut self, new_size: u32);
fn scrollbar_width(&self) -> i32;
fn set_scrollbar_width(&mut self, width: i32);
fn sort(&mut self); }

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

fn topline(&mut self, line: u32)

fn bottomline(&mut self, line: u32)

fn middleline(&mut self, line: u32)

fn format_char(&self) -> char

fn set_format_char(&mut self, c: char)

fn column_char(&self) -> char

fn set_column_char(&mut self, c: char)

fn column_widths(&self) -> Vec<i32>

fn set_column_widths(&mut self, arr: &[i32])

fn displayed(&self, line: u32) -> bool

fn make_visible(&mut self, line: u32)

fn position(&self) -> u32

fn set_position(&mut self, pos: u32)

fn hposition(&self) -> u32

fn set_hposition(&mut self, pos: u32)

fn has_scrollbar(&self) -> BrowserScrollBar

fn set_has_scrollbar(&mut self, mode: BrowserScrollBar)

fn scrollbar_size(&self) -> u32

fn set_scrollbar_size(&mut self, new_size: u32)

fn scrollbar_width(&self) -> i32

fn set_scrollbar_width(&mut self, width: i32)

fn sort(&mut self)

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...