[][src]Struct fltk::tree::Tree

pub struct Tree { /* fields omitted */ }

Defines a tree widget

Implementations

impl Tree[src]

pub unsafe fn from_raw(ptr: *mut Fl_Tree) -> Option<Tree>[src]

Creates a Tree from a raw Fl_Tree pointer

pub fn begin(&self)[src]

Begins the Tree widget

pub fn end(&self)[src]

Ends the Tree widget

pub fn show_self(&mut self)[src]

Shows the Tree widget

pub fn set_root_label(&mut self, new_label: &str)[src]

Sets the root label

pub fn root(&self) -> Option<TreeItem>[src]

Gets the Tree's root

pub fn set_root(&mut self, new_item: Option<TreeItem>)[src]

Sets the Tree's root

pub fn add(&mut self, path: &str) -> Option<TreeItem>[src]

Adds a TreeItem

pub fn insert_above(&mut self, above: TreeItem, name: &str) -> Option<TreeItem>[src]

Inserts a TreeItem above another tree item

pub fn insert(
    &mut self,
    item: TreeItem,
    name: &str,
    pos: u32
) -> Option<TreeItem>
[src]

Inserts a TreeItem at a position pos

pub fn remove(&mut self, item: TreeItem) -> Result<(), FltkError>[src]

Removes a TreeItem

pub fn clear(&mut self)[src]

Clears a tree

pub fn clear_children(&mut self, item: TreeItem)[src]

Clears all children

pub fn find_item(&self, path: &str) -> Option<TreeItem>[src]

Finds a tree item

pub fn find_clicked(&self, yonly: bool) -> Option<TreeItem>[src]

finds a clicked item

pub fn set_item_clicked(&mut self) -> Option<TreeItem>[src]

Set the item that was last clicked.

pub fn first(&mut self) -> Option<TreeItem>[src]

Gets the first tree item

pub fn first_visible_item(&mut self) -> Option<TreeItem>[src]

Gets the first visible tree item

pub fn next(&mut self, item: TreeItem) -> Option<TreeItem>[src]

Gets the next tree item

pub fn prev(&mut self, item: TreeItem) -> Option<TreeItem>[src]

Gets the previous tree item

pub fn last(&mut self) -> Option<TreeItem>[src]

Gets the last tree item

pub fn last_visible_item(&mut self) -> Option<TreeItem>[src]

Gets the last visible tree item

pub fn next_visible_item(
    &mut self,
    start: TreeItem,
    direction_key: Key
) -> Option<TreeItem>
[src]

Gets the next visible tree item

pub fn first_selected_item(&mut self) -> Option<TreeItem>[src]

Gets the first selected tree item

pub fn last_selected_item(&mut self) -> Option<TreeItem>[src]

Gets the last selected tree item

pub fn next_item(
    &mut self,
    item: TreeItem,
    direction_key: Key,
    visible: bool
) -> Option<TreeItem>
[src]

Gets the next tree item, direction_key is by default Key::Down

pub fn next_selected_item(
    &mut self,
    item: TreeItem,
    direction_key: Key
) -> Option<TreeItem>
[src]

Gets the next selected tree item, direction_key is by default Key::Down

pub fn get_selected_items(&mut self) -> Option<Vec<TreeItem>>[src]

Gets the selected tree items

pub fn get_items(&self) -> Option<Vec<TreeItem>>[src]

Gets the all tree items

pub fn open(&mut self, path: &str, do_callback: bool) -> Result<(), FltkError>[src]

Opens a tree item, causing the children to be shown

pub fn open_toggle(&mut self, item: TreeItem, do_callback: bool)[src]

Toggle the open state

pub fn close(&mut self, path: &str, do_callback: bool) -> Result<(), FltkError>[src]

Close a tree item, causing the children to be hidden

pub fn is_open(&self, path: &str) -> bool[src]

Returns whether an item is open

pub fn is_close(&self, path: &str) -> bool[src]

Returns whether an item is closed

pub fn select(&mut self, path: &str, do_callback: bool) -> Result<(), FltkError>[src]

Select a tree item

pub fn select_toggle(&mut self, item: TreeItem, do_callback: bool)[src]

Toggle the select state of the specified

pub fn deselect(
    &mut self,
    path: &str,
    do_callback: bool
) -> Result<(), FltkError>
[src]

pub fn deselect_all(
    &mut self,
    item: TreeItem,
    do_callback: bool
) -> Result<(), FltkError>
[src]

Deselect all items

pub fn select_only(
    &mut self,
    selected_item: TreeItem,
    do_callback: bool
) -> Result<(), FltkError>
[src]

Select only the specified item, deselecting all others that might be selected.

pub fn select_all(
    &mut self,
    item: TreeItem,
    do_callback: bool
) -> Result<(), FltkError>
[src]

Select all items

pub fn extend_selection_dir(
    &mut self,
    from: TreeItem,
    to: TreeItem,
    direction_key: Key,
    val: TreeItemSelect,
    visible: bool
) -> Result<(), FltkError>
[src]

Extend the selection between and including from and to in a certain direction

pub fn extend_selection(
    &mut self,
    from: TreeItem,
    to: TreeItem,
    val: TreeItemSelect,
    visible: bool
) -> Result<(), FltkError>
[src]

Extend the selection between and including from and to

pub fn set_item_focus(&mut self, item: TreeItem)[src]

Set the item that currently should have keyboard focus

pub fn get_item_focus(&self) -> Option<TreeItem>[src]

Get the item that currently has keyboard focus

pub fn is_selected(&self, path: &str) -> bool[src]

Returns whether an item is selected

pub fn item_label_font(&self) -> Font[src]

Gets the items' label font

pub fn set_item_label_font(&mut self, val: Font)[src]

Sets the items' label font

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

Gets the items' label size

pub fn set_item_label_size(&mut self, val: u32)[src]

Sets the items' label size

pub fn item_label_fg_color(&self) -> Color[src]

Gets the items' foreground color

pub fn set_item_label_fg_color(&mut self, val: Color)[src]

Sets the items' foreground color

pub fn item_label_bg_color(&self) -> Color[src]

Gets the items' background color

pub fn set_item_label_bg_color(&mut self, val: Color)[src]

Sets the items' foreground color

pub fn connector_color(&self) -> Color[src]

Gets the items' connector color

pub fn set_connector_color(&mut self, val: Color)[src]

Sets the items' foreground color

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

Gets the left margin

pub fn set_margin_left(&mut self, val: u32)[src]

Sets the left margin

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

Gets the top margin

pub fn set_margin_top(&mut self, val: u32)[src]

Sets the top margin

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

Gets the bottom margin

pub fn set_margin_bottom(&mut self, val: u32)[src]

Sets the bottom margin

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

Gets the line spacing

pub fn set_line_spacing(&mut self, val: u32)[src]

Sets the line spacing

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

Gets the open child bottom margin

pub fn set_open_child_margin_bottom(&mut self, val: u32)[src]

Sets the open child bottom margin

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

Gets the user icon left margin

pub fn set_user_icon_margin_left(&mut self, val: u32)[src]

Sets the user icon left margin

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

Gets the label's left margin

pub fn set_label_margin_left(&mut self, val: u32)[src]

Sets the label's left margin

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

Gets the widget's left margin

pub fn set_widget_margin_left(&mut self, val: u32)[src]

Sets the widget's left margin

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

Gets the connector's width

pub fn set_connector_width(&mut self, val: u32)[src]

Sets the connector's width

pub fn user_icon(&self) -> Option<Image>[src]

Gets the user icon

pub fn set_user_icon<Img: ImageExt>(&mut self, val: &Img)[src]

Sets the user icon

pub fn open_icon(&self) -> Option<Image>[src]

Gets the opne icon

pub fn set_open_icon<Img: ImageExt>(&mut self, val: &Img)[src]

Sets the opne icon

pub fn close_icon(&self) -> Option<Image>[src]

Gets the close icon

pub fn set_close_icon<Img: ImageExt>(&mut self, val: &Img)[src]

Sets the opne icon

pub fn show_collapse(&self) -> bool[src]

Returns true if the collapse icon is enabled, false if not.

pub fn set_show_collapse(&mut self, flag: bool)[src]

Sets whether the collapse icon is enabled

pub fn show_root(&self) -> bool[src]

Returs whether the root is shown

pub fn set_show_root(&mut self, flag: bool)[src]

Sets whether the root is shown

pub fn connector_style(&self) -> TreeConnectorStyle[src]

Gets the connector style

pub fn set_connector_style(&mut self, val: TreeConnectorStyle)[src]

Sets the connector style

pub fn sort_order(&self) -> TreeSort[src]

Gets the sort order

pub fn set_sort_order(&mut self, val: TreeSort)[src]

Sets the sort order

pub fn select_frame(&self) -> FrameType[src]

Gets the select frame(Fl_Box)

pub fn set_select_frame(&mut self, val: FrameType)[src]

Sets the select frame(Fl_Box)

pub fn select_mode(&self) -> TreeSelect[src]

Gets the Tree select mode

pub fn set_select_mode(&mut self, val: TreeSelect)[src]

Sets the Tree select mode

pub fn item_reselect_mode(&self) -> TreeItemReselectMode[src]

Gets the Tree item's reselect mode

pub fn set_item_reselect_mode(&mut self, mode: TreeItemReselectMode)[src]

Sets the Tree item's reselect mode

pub fn item_draw_mode(&self) -> TreeItemDrawMode[src]

Gets the Tree item's draw mode

pub fn set_item_draw_mode(&mut self, mode: TreeItemDrawMode)[src]

Sets the Tree item's draw mode

pub fn calc_dimensions(&mut self)[src]

Recalculate widget dimensions and scrollbar visibility, normally done automatically

pub fn calc_tree(&mut self)[src]

Recalculates the tree's sizes and scrollbar visibility, normally done automatically

pub fn recalc_tree(&mut self)[src]

Recalculates the tree's sizes and scrollbar visibility, normally done automatically

pub fn displayed(&mut self, item: TreeItem) -> bool[src]

Returns whether an item is displayed

pub fn show_item(&mut self, item: TreeItem, y_offset: i32)[src]

Shows an item

pub fn show_item_top(&mut self, item: TreeItem)[src]

Adjust the vertical scrollbar so that item is visible

pub fn show_item_middle(&mut self, item: TreeItem)[src]

Adjust the vertical scrollbar so that item is in the middle of the display

pub fn show_item_bottom(&mut self, item: TreeItem)[src]

Adjust the vertical scrollbar so that the is at the bottom of the display.

pub fn display(&mut self, item: TreeItem)[src]

Display the item

pub fn vposition(&self) -> i32[src]

Gets the vertical position of the item

pub fn set_vposition(&mut self, pos: i32)[src]

Sets the vertical position of the item

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

Gets the horizontal position of the item

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

Sets the horizontal position of the item

pub fn is_scrollbar<W: WidgetExt>(&mut self, w: &W) -> bool[src]

Returns whether the widget is a scrollbar

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

Gets the scrollbar size

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

Sets the scrollbar size

pub fn is_vscroll_visible(&self) -> bool[src]

Returns whether vertical scrolling is visible

pub fn is_hscroll_visible(&self) -> bool[src]

Returns whether horizontal scrolling is visible

pub fn set_callback_item(&mut self, item: TreeItem)[src]

Set the callback item

pub fn callback_item(&mut self) -> Option<TreeItem>[src]

Get the callback item

pub fn set_callback_reason(&mut self, reason: TreeReason)[src]

Set the callback reason

pub fn callback_reason(&self) -> TreeReason[src]

Get the callback reason

Trait Implementations

impl Clone for Tree[src]

impl Debug for Tree[src]

impl Send for Tree[src]

impl Sync for Tree[src]

impl WidgetExt for Tree[src]

Auto Trait Implementations

impl RefUnwindSafe for Tree

impl Unpin for Tree

impl UnwindSafe for Tree

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.