[][src]Struct fltk::tree::TreeItem

pub struct TreeItem { /* fields omitted */ }

Defines a tree item

Implementations

impl TreeItem[src]

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

Create a TreeItem from a raw pointer

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

Gets the x position

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

Gets the y position

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

Gets the width

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

Gets the height

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

Gets the label's x position

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

Gets the label's y position

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

Gets the label's width

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

Sets the label's width

pub fn show_self(&self, indent: &str)[src]

Shows the tree item

pub fn set_label(&mut self, val: &str)[src]

Sets the label of the tree item

pub fn label(&self) -> Option<String>[src]

Gets the label of the tree item

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

Sets the label's font

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

Gets the label's font

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

Sets the label's size

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

Gets the label's size

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

Sets the label's foreground color

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

Gets the label's foreground color

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

Sets the label's color

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

Gets the label's color

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

Sets the label's background color

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

Gets the label's foreground color

pub fn set_widget<W: WidgetExt>(&mut self, val: &W)[src]

Sets the item's associated widget

pub fn widget(&self) -> Widget[src]

Gets the item's associated widget

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

Gets the children count

pub fn child(&self, idx: u32) -> Option<TreeItem>[src]

Gets the child item at idx position

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

Returns whether the item has children

pub fn find_child(&mut self, name: &str) -> Result<u32, FltkError>[src]

Find a child using its name, returns index result

pub fn remove_child(&mut self, new_label: &str) -> Result<(), FltkError>[src]

Remove child using its name

pub fn clear_children(&mut self)[src]

Remove all children

pub fn swap_children(
    &mut self,
    a: TreeItem,
    b: TreeItem
) -> Result<(), FltkError>
[src]

Swap children a and b

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

Find child by name, returns option of the item

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

Replace a tree item

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

Replace a child

pub fn deparent(&mut self, index: u32) -> Option<TreeItem>[src]

Deparent a child by index

pub fn reparent(
    &mut self,
    new_child: TreeItem,
    index: u32
) -> Result<(), FltkError>
[src]

Reparent a child by index

pub fn move_item(&mut self, to: u32, from: u32) -> Result<(), FltkError>[src]

Move item

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

Move item above another item

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

Move item below another item

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

Move item into another item

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

Gets the depth of the item

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

Gets the previous item

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

Gets the next item

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

Gets the next sibling

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

Gets the previous sibling

pub fn update_prev_next(&mut self, index: u32)[src]

Update surrounding siblings

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

Return the parent of the item

pub fn set_parent(&mut self, val: TreeItem)[src]

Set the parent of the item

pub fn tree(&self) -> Option<Tree>[src]

Return the tree of the item

pub fn open(&mut self)[src]

Open the item exposing all children

pub fn close(&mut self)[src]

Close the item hiding all children

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

Returns whether an item is open

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

Returns whether an item is closed

pub fn open_toggle(&mut self)[src]

Toggle the open state of the item

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

Select an item at index

pub fn select_toggle(&mut self)[src]

Toggle the select state of an item

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

Select all subitems, returns number of selected items

pub fn deselect(&mut self)[src]

Deselect an item

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

Deselect all subitems

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

Returns whether an item is root

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

Returns whether an item is visible

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

Returns whether an item is active

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

Returns whether an item is activated

pub fn deactivate(&mut self)[src]

Deactivate an item

pub fn activate(&mut self, val: bool)[src]

Activate an item

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

Returns whether an item is selected

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

Check if the tree item was deleted

Trait Implementations

impl Clone for TreeItem[src]

impl Debug for TreeItem[src]

impl Send for TreeItem[src]

impl Sync for TreeItem[src]

Auto Trait Implementations

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.