Classes | |
struct | flat_frame |
Public Member Functions | |
void | set_root (treeitem *_root, bool showroot=false) |
int | width_request () |
int | height_request (int w) |
bool | get_cursorvisible () |
point | get_cursorloc () |
virtual bool | focus_me () |
virtual void | paint (const style &st) |
Display this widget. | |
virtual void | dispatch_mouse (short id, int x, int y, int z, mmask_t bstate) |
void | set_selection (treeiterator to, bool force_to_top=false) |
Directly sets the selection to the given element. | |
treeiterator | get_selection () const |
Retrieve a reference to the currently selected entry in the tree. | |
treeiterator | get_begin () |
Retrieve an iterator referencing the start of the tree. | |
treeiterator | get_end () |
Retrieve an iterator referencing the end of the tree. | |
void | search_for (tree_search_func &matches) |
void | search_for (const std::wstring &s) |
void | search_back_for (tree_search_func &matches) |
void | search_back_for (const std::wstring &s) |
void | set_hierarchical (bool _hierarchical) |
bool | get_hierarchical () |
void | highlight_current () |
Send a 'highlighted' message to the currently selected item. | |
void | unhighlight_current () |
Send an 'unhighlighted' message to the currently selected item. | |
void | line_up () |
void | line_down () |
void | page_up () |
void | page_down () |
void | jump_to_begin () |
void | jump_to_end () |
void | level_line_up () |
void | level_line_down () |
Static Public Member Functions | |
static util::ref_ptr< tree > | create () |
static util::ref_ptr< tree > | create (treeitem *root, bool showroot=false) |
static void | init_bindings () |
Public Attributes | |
sigc::signal1< void, treeitem * > | selection_changed |
Emitted when the selection moves to a new item. | |
Static Public Attributes | |
static config::keybindings * | bindings = NULL |
Protected Member Functions | |
void | sync_bounds () |
virtual bool | handle_key (const config::key &k) |
Handles a keypress in this widget. | |
tree (treeitem *_root, bool showroot) |
treeiterator cwidget::widgets::tree::get_begin | ( | ) | [inline] |
Retrieve an iterator referencing the start of the tree.
treeiterator cwidget::widgets::tree::get_end | ( | ) | [inline] |
Retrieve an iterator referencing the end of the tree.
treeiterator cwidget::widgets::tree::get_selection | ( | ) | const [inline] |
Retrieve a reference to the currently selected entry in the tree.
This iterator might be invalidated by user interactions and should not be saved.
bool cwidget::widgets::tree::handle_key | ( | const config::key & | k | ) | [protected, virtual] |
Handles a keypress in this widget.
k | the key that was pressed (see keybindings.h). |
Reimplemented from cwidget::widgets::widget.
References selection_changed, and set_selection().
int cwidget::widgets::tree::height_request | ( | int | w | ) | [virtual] |
w | the width of the widget. |
Implements cwidget::widgets::widget.
void cwidget::widgets::tree::highlight_current | ( | ) |
Send a 'highlighted' message to the currently selected item.
References selection_changed.
void cwidget::widgets::tree::paint | ( | const style & | st | ) | [virtual] |
Display this widget.
Implements cwidget::widgets::widget.
References cwidget::widgets::widget::apply_style(), cwidget::get_style(), and cwidget::widgets::treeitem::paint().
void cwidget::widgets::tree::set_selection | ( | treeiterator | to, | |
bool | force_to_top = false | |||
) |
Directly sets the selection to the given element.
to | The element to select. | |
force_to_top | If true, the element will be placed at the top of the list if the list scrolls. |
If the element's parents are not currently expanded, they will be immediately expanded.
References selection_changed.
Referenced by handle_key().
void cwidget::widgets::tree::unhighlight_current | ( | ) |
Send an 'unhighlighted' message to the currently selected item.
References selection_changed.
int cwidget::widgets::tree::width_request | ( | ) | [virtual] |
Implements cwidget::widgets::widget.
sigc::signal1<void, treeitem *> cwidget::widgets::tree::selection_changed |
Emitted when the selection moves to a new item.
The item will be NULL if nothing is selected. The signal will also be emitted when the widget is shown/hidden and when the
Referenced by handle_key(), highlight_current(), set_selection(), and unhighlight_current().