|
libyui-ncurses
2.57.2
|
One line in a tree widdget. More...
#include <NCTree.h>


Public Member Functions | |
| NCTreeLine (NCTreeLine *parentLine, YTreeItem *origItem, bool multiSelection) | |
| YTreeItem * | YItem () const |
| Return the corresponding YTreeItem. | |
| virtual bool | ChangeToVisible () |
| Change a line that may have been invisible until now to be visible. More... | |
| virtual unsigned | Hotspot (unsigned &at) const |
| virtual bool | handleInput (wint_t key) |
| Handle keyboard input. More... | |
| virtual NCTreeLine * | parent () const |
| virtual NCTreeLine * | firstChild () const |
| virtual NCTreeLine * | nextSibling () const |
Public Member Functions inherited from NCTableLine | |
| NCTableLine (std::vector< NCTableCol * > &cells, int index=-1, bool nested=false, unsigned state=S_NORMAL) | |
| Constructor: Create an NCTableLine and fill it with 'cells'. More... | |
| NCTableLine (NCTableLine *parentLine, YItem *yitem, std::vector< NCTableCol * > &cells, int index=-1, bool nested=false, unsigned state=S_NORMAL) | |
| NCTableLine (unsigned colCount, int index=-1, bool nested=false, unsigned state=S_NORMAL) | |
| Constructor with a number of empty cells. | |
| NCTableLine (NCTableLine *parentLine, YItem *yitem, unsigned colCount, int index=-1, bool nested=false, unsigned state=S_NORMAL) | |
| virtual | ~NCTableLine () |
| Destructor. | |
| YTableItem * | origItem () const |
| Return the YItem this line corresponds to. | |
| void | setOrigItem (YTableItem *yitem) |
| Set the YItem this line corresponds to. | |
| int | index () const |
| Return the unique index by which this line can be identified. | |
| unsigned | Cols () const |
| Return the number of columns (cells) in this line. | |
| void | SetCols (unsigned idx) |
| Set a number of (empty) columns (cells). | |
| void | SetCols (std::vector< NCTableCol * > &newCells) |
| Set the columns (cells). | |
| void | ClearLine () |
| Delete all content. | |
| std::vector< NCTableCol * > | GetItems () const |
| Return all columns (cells). More... | |
| void | Append (NCTableCol *cell) |
| Append one cell. More... | |
| void | AddCol (unsigned idx, NCTableCol *item) |
| void | DelCol (unsigned idx) |
| NCTableCol * | GetCol (unsigned idx) |
| Return a non-const pointer for read/write operations to the column (the cell) with the specified index or 0 if there is no such cell. More... | |
| const NCTableCol * | GetCol (unsigned idx) const |
| Return a const pointer for read-only operatoins to the column (the cell) with the specified index or 0 if there is no such cell. More... | |
| void | SetState (const STATE s) |
| void | ClearState (const STATE s) |
| bool | isHidden () const |
| bool | isDisabled () const |
| bool | isSpecial () const |
| bool | isActive () const |
| virtual bool | isVisible () const |
| virtual bool | isEnabled () const |
| virtual bool | isNested () const |
| Return 'true' if this should be displayed as nested items, i.e. More... | |
| virtual void | setNested (bool val) |
| Set the 'nested' status. | |
| void | openBranch () |
| Open this tree branch. | |
| void | closeBranch () |
| Close this tree branch. | |
| void | toggleOpenClosedState () |
| Toggle the open/closed state of this branch. | |
| virtual void | UpdateFormat (NCTableStyle &tableStyle) |
| Update TableStyle so that this line fits in. | |
| virtual void | updatePrefix () |
| Create the real tree hierarchy line graphics prefix and store it in _prefix. | |
| virtual void | DrawAt (NCursesWindow &w, const wrect at, NCTableStyle &tableStyle, bool active) const |
| void | stripHotkeys () |
| void | setParent (NCTableLine *newVal) |
| void | setFirstChild (NCTableLine *newVal) |
| void | setNextSibling (NCTableLine *newVal) |
| int | treeLevel () const |
| Return the nesting level in the tree (toplevel is 0). | |
| void | setTreeLevel (int newVal) |
| Set the tree nesting level. | |
| int | prefixLen () const |
| Return the length of the prefix for tree hierarchy line graphics. | |
| NCTableTag * | tagCell () const |
| Return the tag cell or 0 if there is none. | |
| std::string | indentationStr () const |
| Return a string of a number of blanks suitable for the indentation of this tree level. | |
Additional Inherited Members | |
Public Types inherited from NCTableLine | |
| enum | STATE { S_NORMAL = 0x00, S_ACTIVE = 0x01, S_DISABLED = 0x10, S_HIDDEN = 0x20, S_HEADLINE = 0x40 } |
Protected Member Functions inherited from NCTableLine | |
| void | treeInit (NCTableLine *parentLine, YItem *yitem) |
| Common init for tree-related things in the constructors that have a 'parentLine' and a 'yitem' parameter. | |
| void | initPrefixPlaceholder () |
| Initialize _prefixPlaceholder, the placeholder for tree hierarchy line graphics. | |
| void | addToTree (NCTableLine *parent) |
| Add this line to the parent's tree hierarchy. | |
| bool | isOpen (YItem *yitem) const |
| Return 'true' if yitem inherits YTreeItem or YTableItem and has its 'open' flag set to 'true'. | |
| YItem * | yitem () const |
| Return the YItem this line corresponds to as its base class. | |
| void | setYItem (YItem *yitem) |
| Set the YItem this line corresponds to. | |
| virtual void | DrawItems (NCursesWindow &w, const wrect at, NCTableStyle &tableStyle, bool active) const |
| void | assertCol (unsigned idx) |
| const std::string & | prefixPlaceholder () const |
| Return a placeholder for the prefix string for this line consisting of enough blanks for the tree hierarchy line graphics. More... | |
| void | drawPrefix (NCursesWindow &w, const wrect at, NCTableStyle &tableStyle) const |
| Draw the tree hierarchy line graphics prefix in _prefix in window 'w' into rectangle 'at' with style 'tableStyle'. | |
Protected Attributes inherited from NCTableLine | |
| std::vector< NCTableCol * > | _cells |
| owned | |
| unsigned | _state |
| Or'ed STATE flags. | |
| int | _index |
| unique index to identify this line | |
| YItem * | _yitem |
| not owned | |
| bool | _nested |
| using nested (tree-like) items? | |
| int | _treeLevel |
| NCTableLine * | _parent |
| NCTableLine * | _nextSibling |
| NCTableLine * | _firstChild |
| STATE | _vstate |
| chtype * | _prefix |
| std::string | _prefixPlaceholder |
One line in a tree widdget.
This is just a very thin wrapper around NCTableLine which provides most of the functionality.
Notice that on the libyui level, the inheritance hierarchy is YTableItem < YTreeItem < YItem whereas on the libyui-ncurses level, it is NCTreeLine < NCTableLine i.e. just the other way round.
|
virtual |
Change a line that may have been invisible until now to be visible.
This also makes the parent lines (and its parent line until the toplevel) visible as well as all sibling lines of this line.
Return 'true' if there was a status change, i.e. if it was invisible before, 'false' otherwise.
Reimplemented from NCTableLine.
Reimplemented from NCTableLine.
Definition at line 443 of file NCTree.cc.

|
virtual |
Handle keyboard input.
Return 'true' if the key event is handled, 'false' to propagate it up to the pad.
Reimplemented from NCTableLine.
Definition at line 484 of file NCTree.cc.
