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

pub struct Tree { /* fields omitted */ }
Expand description

Defines a tree widget

Implementations

Creates a Tree from a raw Fl_Tree pointer

Safety

The pointer must be valid

Begins the Tree widget

Ends the Tree widget

Shows the Tree widget

Sets the root label

Gets the Tree’s root

Sets the Tree’s root

Adds a TreeItem

Inserts a TreeItem above another tree item

Inserts a TreeItem at a position pos

Removes a TreeItem

Errors

Errors on failure to remove item

Clears a tree

Clears all children

Finds a tree item

finds a clicked item

Set the item that was last clicked.

Gets the first tree item

Gets the first visible tree item

Gets the next tree item

Gets the previous tree item

Gets the last tree item

Gets the last visible tree item

Gets the next visible tree item

Gets the first selected tree item

Gets the last selected tree item

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

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

Gets the selected tree items

Gets the all tree items

Opens a tree item, causing the children to be shown

Errors

Errors on failure to open an item

Toggle the open state

Close a tree item, causing the children to be hidden

Errors

Errors on failure to close an item

Returns whether an item is open

Returns whether an item is closed

Select a tree item

Errors

Errors on failure to select an item

Toggle the select state of the specified

Deselect an item at path and determine whether to do the callback

Errors

Errors on failure to deselect item

Deselect all items

Errors

Errors on failure to deselect all items

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

Errors

Errors on failure to select an item

Select all items

Errors

Errors on failure to select an item

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

Errors

Errors on failure to extend selection in direction

Extend the selection between and including from and to

Errors

Errors on failure to extend selection

Set the item that currently should have keyboard focus

Get the item that currently has keyboard focus

Returns whether an item is selected

Gets the items’ label font

Sets the items’ label font

Gets the items’ label size

Sets the items’ label size

Gets the items’ foreground color

Sets the items’ foreground color

Gets the items’ background color

Sets the items’ foreground color

Gets the items’ connector color

Sets the items’ foreground color

Gets the left margin

Sets the left margin

Gets the top margin

Sets the top margin

Gets the bottom margin

Sets the bottom margin

Gets the line spacing

Sets the line spacing

Gets the open child bottom margin

Sets the open child bottom margin

Gets the user icon left margin

Sets the user icon left margin

Gets the label’s left margin

Sets the label’s left margin

Gets the widget’s left margin

Sets the widget’s left margin

Gets the connector’s width

Sets the connector’s width

Gets the user icon

Sets the user icon

Gets the opne icon

Sets the opne icon

Gets the close icon

Sets the opne icon

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

Sets whether the collapse icon is enabled

Returs whether the root is shown

Sets whether the root is shown

Gets the connector style

Sets the connector style

Gets the sort order

Sets the sort order

Gets the select frame

Sets the select frame

Gets the Tree select mode

Sets the Tree select mode

Gets the Tree item’s reselect mode

Sets the Tree item’s reselect mode

Gets the Tree item’s draw mode

Sets the Tree item’s draw mode

Recalculate widget dimensions and scrollbar visibility, normally done automatically

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

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

Returns whether an item is displayed

Shows an item

Adjust the vertical scrollbar so that item is visible

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

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

Display the item

Gets the vertical position of the item

Sets the vertical position of the item

Gets the horizontal position of the item

Sets the horizontal position of the item

Returns whether the widget is a scrollbar

Gets the scrollbar size

Sets the scrollbar size

Returns whether vertical scrolling is visible

Returns whether horizontal scrolling is visible

Set the callback item

Get the callback item

Set the callback reason

Get the callback reason

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Creates a new widget, takes an x, y coordinates, as well as a width and height, plus a title Read more

Deletes widgets and their children.

transforms a widget pointer to a Widget, for internal use Read more

Get a widget from base widget Read more

Set a custom handler, where events are managed manually, akin to Fl_Widget::handle(int). Handled or ignored events should return true, unhandled events should return false. takes the widget as a closure argument Read more

Set a custom draw method. takes the widget as a closure argument. macOS requires that WidgetBase::draw actually calls drawing functions Read more

INTERNAL: Retrieve the draw data Read more

INTERNAL: Retrieve the handle data Read more

Initialize to a position x, y

Initialize to size width, height

Initialize with a label

Initialize with alignment

Initialize with type

Initialize at bottom of another widget

Initialize above of another widget

Initialize right of another widget

Initialize left of another widget

Initialize center of another widget

Initialize center of parent

Initialize to the size of another widget

Initialize to the size of the parent

Set to position x, y

Set to dimensions width and height

Sets the widget’s label. labels support special symbols preceded by an @ sign. and for the associated formatting. Read more

Redraws a widget, necessary for resizing and changing positions

Shows the widget

Hides the widget

Returns the x coordinate of the widget

Returns the y coordinate of the widget

Returns the width of the widget

Returns the height of the widget

Returns the width of the widget

Returns the height of the widget

Returns the label of the widget

Measures the label’s width and height

transforms a widget to a base Fl_Widget, for internal use Read more

Activates the widget

Deactivates the widget

Redraws the label of the widget

Resizes and/or moves the widget, takes x, y, width and height

Does a simple resize ignoring class-specific resize functionality

Returns the tooltip text

Sets the tooltip text

Returns the widget color

Sets the widget’s color

Returns the widget label’s color

Sets the widget label’s color

Returns the widget label’s font

Sets the widget label’s font

Returns the widget label’s size

Sets the widget label’s size

Returns the widget label’s type

Sets the widget label’s type

Returns the widget’s frame type

Sets the widget’s frame type

Returns whether the widget was changed

Mark the widget as changed

Clears the changed status of the widget

Returns the alignment of the widget

Sets the alignment of the widget

Sets the default callback trigger for a widget

Return the callback trigger

Returns the parent of the widget

Gets the selection color of the widget

Sets the selection color of the widget

Runs the already registered callback

Returns the direct window holding the widget

Returns the topmost window holding the widget

Checks whether a widget is capable of taking events

INTERNAL: Retakes ownership of the user callback data Read more

Make the widget take focus Read more

Set the widget to have visible focus

Clear visible focus

Set the visible focus using a flag

Return whether the widget has visible focus

Return whether the widget has focus

Check if a widget was deleted

Return whether the widget was damaged

Signal the widget as damaged and it should be redrawn in the next event loop cycle

Return the damage mask

Signal the type of damage a widget received

Clear the damaged flag

Return the widget as a window if it’s a window

Return the widget as a group widget if it’s a group widget

Checks whether the self widget is inside another widget

Returns the widget type when applicable

Sets the widget type

Sets the image of the widget

Sets the image of the widget scaled to the widget’s size

Gets the image associated with the widget

Sets the deactived image of the widget

Sets the deactivated image of the widget scaled to the widget’s size

Gets the deactivated image associated with the widget

Sets the callback when the widget is triggered (clicks for example) takes the widget as a closure argument Read more

Emits a message on callback using a sender

Upcast a WidgetExt to a Widget Read more

Returns whether a widget is visible

Returns whether a widget or any of its parents are visible (recursively)

Return whether two widgets object point to the same widget

Returns whether a widget is active

Returns whether a widget or any of its parents are active (recursively)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.