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

pub unsafe trait BrowserExt: WidgetExt {
    pub fn remove(&mut self, line: u32);
pub fn add(&mut self, item: &str);
pub fn insert(&mut self, line: u32, item: &str);
pub fn move_item(&mut self, to: u32, from: u32);
pub fn swap(&mut self, a: u32, b: u32);
pub fn clear(&mut self);
pub fn size(&self) -> u32;
pub fn set_size(&mut self, w: i32, h: i32);
pub fn select(&mut self, line: u32);
pub fn selected(&self, line: u32) -> bool;
pub fn text(&self, line: u32) -> Option<String>;
pub fn set_text(&mut self, line: u32, txt: &str);
pub fn load<P: AsRef<Path>>(&mut self, path: P) -> Result<(), FltkError>;
pub fn text_size(&self) -> u32;
pub fn set_text_size(&mut self, sz: u32);
pub fn set_icon<Img: ImageExt>(&mut self, line: u32, image: Option<Img>);
pub fn icon(&self, line: u32) -> Option<Box<dyn ImageExt>>;
pub fn remove_icon(&mut self, line: u32);
pub fn topline(&mut self, line: u32);
pub fn bottomline(&mut self, line: u32);
pub fn middleline(&mut self, line: u32);
pub fn format_char(&self) -> char;
pub fn set_format_char(&mut self, c: char);
pub fn column_char(&self) -> char;
pub fn set_column_char(&mut self, c: char);
pub fn column_widths(&self) -> Vec<i32>;
pub fn set_column_widths(&mut self, arr: &'static [i32]);
pub fn displayed(&self, line: u32) -> bool;
pub fn make_visible(&mut self, line: u32);
pub fn position(&self) -> u32;
pub fn set_position(&mut self, pos: u32);
pub fn hposition(&self) -> u32;
pub fn set_hposition(&mut self, pos: u32);
pub fn has_scrollbar(&self) -> BrowserScrollbar;
pub fn set_has_scrollbar(&mut self, mode: BrowserScrollbar);
pub fn scrollbar_size(&self) -> u32;
pub fn set_scrollbar_size(&mut self, new_size: u32);
pub fn sort(&mut self);
pub fn scrollbar(&self) -> Box<dyn ValuatorExt>;
pub fn hscrollbar(&self) -> Box<dyn ValuatorExt>; }

Defines the methods implemented by all browser types

Required methods

pub fn remove(&mut self, line: u32)[src]

Removes the specified line Lines start at 1

pub fn add(&mut self, item: &str)[src]

Adds an item

pub fn insert(&mut self, line: u32, item: &str)[src]

Inserts an item at an index Lines start at 1

pub fn move_item(&mut self, to: u32, from: u32)[src]

Moves an item Lines start at 1

pub fn swap(&mut self, a: u32, b: u32)[src]

Swaps 2 items Lines start at 1

pub fn clear(&mut self)[src]

Clears the browser widget

pub fn size(&self) -> u32[src]

Returns the number of items

pub fn set_size(&mut self, w: i32, h: i32)[src]

Set the number of items

pub fn select(&mut self, line: u32)[src]

Select an item at the specified line Lines start at 1

pub fn selected(&self, line: u32) -> bool[src]

Returns whether the item is selected Lines start at 1

pub fn text(&self, line: u32) -> Option<String>[src]

Returns the text of the selected item Lines start at 1

pub fn set_text(&mut self, line: u32, txt: &str)[src]

Sets the text of the selected item Lines start at 1

pub fn load<P: AsRef<Path>>(&mut self, path: P) -> Result<(), FltkError>[src]

Load a file

pub fn text_size(&self) -> u32[src]

Return the text size

pub fn set_text_size(&mut self, sz: u32)[src]

Sets the text size Lines start at 1

pub fn set_icon<Img: ImageExt>(&mut self, line: u32, image: Option<Img>)[src]

Sets the icon for browser elements Lines start at 1

pub fn icon(&self, line: u32) -> Option<Box<dyn ImageExt>>[src]

Returns the icon of a browser element Lines start at 1

pub fn remove_icon(&mut self, line: u32)[src]

Removes the icon of a browser element Lines start at 1

pub fn topline(&mut self, line: u32)[src]

Scrolls the browser so the top item in the browser is showing the specified line Lines start at 1

pub fn bottomline(&mut self, line: u32)[src]

Scrolls the browser so the bottom item in the browser is showing the specified line Lines start at 1

pub fn middleline(&mut self, line: u32)[src]

Scrolls the browser so the middle item in the browser is showing the specified line Lines start at 1

pub fn format_char(&self) -> char[src]

Gets the current format code prefix character, which by default is '@' More info here: https://www.fltk.org/doc-1.3/classFl__Browser.html#a129dca59d64baf166503ba59341add69

pub fn set_format_char(&mut self, c: char)[src]

Sets the current format code prefix character to \p c. The default prefix is '@ c should be ascii

pub fn column_char(&self) -> char[src]

Gets the current column separator character. The default is '\t'

pub fn set_column_char(&mut self, c: char)[src]

Sets the column separator to c. This will only have an effect if you also use set_column_widths() c should be ascii

pub fn column_widths(&self) -> Vec<i32>[src]

Gets the current column width array

pub fn set_column_widths(&mut self, arr: &'static [i32])[src]

Sets the current column width array

pub fn displayed(&self, line: u32) -> bool[src]

Returns whether a certain line is displayed

pub fn make_visible(&mut self, line: u32)[src]

Makes a specified line visible

pub fn position(&self) -> u32[src]

Gets the vertical scroll position of the list as a pixel position

pub fn set_position(&mut self, pos: u32)[src]

Sets the vertical scroll position of the list as a pixel position

pub fn hposition(&self) -> u32[src]

Gets the horizontal scroll position of the list as a pixel position

pub fn set_hposition(&mut self, pos: u32)[src]

Sets the horizontal scroll position of the list as a pixel position

pub fn has_scrollbar(&self) -> BrowserScrollbar[src]

Returns the type of scrollbar associated with the browser

pub fn set_has_scrollbar(&mut self, mode: BrowserScrollbar)[src]

Sets the type of scrollbar associated with the browser

pub fn scrollbar_size(&self) -> u32[src]

Gets the scrollbar size

pub fn set_scrollbar_size(&mut self, new_size: u32)[src]

Sets the scrollbar size

pub fn sort(&mut self)[src]

Sorts the items of the browser

pub fn scrollbar(&self) -> Box<dyn ValuatorExt>[src]

Returns the vertical scrollbar

pub fn hscrollbar(&self) -> Box<dyn ValuatorExt>[src]

Returns the horizontal scrollbar

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