|
| treeitem (bool _selectable=true) |
|
virtual void | paint (tree *win, int y, bool hierarchical, const style &st)=0 |
| Display this item and this item only (does not descend to the children of the item, if any). More...
|
|
void | paint (tree *win, int y, bool hierarchical, const std::wstring &str, int depth_shift=2) |
| Display the given text as the label of this item at the given shifted depth. More...
|
|
virtual const wchar_t * | tag ()=0 |
|
virtual const wchar_t * | label ()=0 |
|
int | get_depth () |
|
bool | get_selectable () |
|
virtual style | get_normal_style () |
|
virtual style | get_highlight_style () |
|
virtual void | sort (sortpolicy &sort_method) |
|
virtual void | sort () |
|
virtual bool | dispatch_key (const config::key &k, tree *owner) |
|
virtual void | dispatch_mouse (short id, int x, mmask_t bstate, tree *owner) |
|
virtual tree_levelref * | begin () |
|
virtual tree_levelref * | end () |
|
virtual bool | has_visible_children () |
|
virtual bool | has_children () |
|
virtual bool | matches (const std::wstring &s) const |
|
virtual void | expand () |
|
virtual void | expand_all () |
|
virtual void | collapse_all () |
|
|
virtual void | set_depth (int _depth) |
|
virtual void | set_selectable (bool _selectable) |
|
|
template<class childtype , class sorter > |
class | subtree |
|
◆ paint() [1/2]
virtual void cwidget::widgets::treeitem::paint |
( |
tree * |
win, |
|
|
int |
y, |
|
|
bool |
hierarchical, |
|
|
const style & |
st |
|
) |
| |
|
pure virtual |
Display this item and this item only (does not descend to the children of the item, if any).
The current style of the corresponding tree widget will be initialized using get_normal_style() and/or get_highlight_style() prior to the invocation of this method.
- Parameters
-
win | the tree in which to paint this item |
y | the y location at which to paint this item |
hierarchical | if true, paint this item as an entry in a 'hierarchical' tree. |
st | the style with which this item is being displayed. |
Implemented in cwidget::widgets::layout_item, cwidget::widgets::layout_item::layout_line, and cwidget::widgets::staticitem.
Referenced by cwidget::widgets::tree::paint().
◆ paint() [2/2]
void cwidget::widgets::treeitem::paint |
( |
tree * |
win, |
|
|
int |
y, |
|
|
bool |
hierarchical, |
|
|
const std::wstring & |
str, |
|
|
int |
depth_shift = 2 |
|
) |
| |
Display the given text as the label of this item at the given shifted depth.
- Parameters
-
win | the tree in which to paint this item |
y | the y location at which to paint this item |
hierarchical | if true, paint this item as an entry in a 'hierarchical' tree |
st | the style with which this item is to be displayed. |
◆ highlighted_changed
sigc::signal1<void, bool> cwidget::widgets::treeitem::highlighted_changed |
A signal emitted when the tree-item is highlighted or unhighlighted.
This used to be a pair of virtual methods, but I found that I was constantly overriding them to just invoke a signal. This approach has more runtime overhead, but should make it a lot easier to code up new tree items.Causes this tree-item to become highlighted.
Referenced by cwidget::widgets::tree::set_selection(), and cwidget::widgets::tree::unhighlight_current().
The documentation for this class was generated from the following file: