libyui-ncurses
Loading...
Searching...
No Matches
NCTreeLine Class Reference

#include <NCTree.h>

Inheritance diagram for NCTreeLine:
Collaboration diagram for NCTreeLine:

Public Member Functions

 NCTreeLine (NCTreeLine *parentLine, YTreeItem *origItem, bool multiSelection)
 
YTreeItem * YItem () const
 
virtual bool ChangeToVisible ()
 
virtual unsigned Hotspot (unsigned &at) const
 
virtual bool handleInput (wint_t key)
 
virtual NCTreeLineparent () const
 
virtual NCTreeLinefirstChild () const
 
virtual NCTreeLinenextSibling () const
 
- Public Member Functions inherited from NCTableLine
 NCTableLine (std::vector< NCTableCol * > &cells, int index=-1, bool nested=false, unsigned state=S_NORMAL)
 
 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)
 
 NCTableLine (NCTableLine *parentLine, YItem *yitem, unsigned colCount, int index=-1, bool nested=false, unsigned state=S_NORMAL)
 
virtual ~NCTableLine ()
 
YTableItem * origItem () const
 
void setOrigItem (YTableItem *yitem)
 
int index () const
 
unsigned Cols () const
 
void SetCols (unsigned idx)
 
void SetCols (std::vector< NCTableCol * > &newCells)
 
void ClearLine ()
 
std::vector< NCTableCol * > GetItems () const
 
void Append (NCTableCol *cell)
 
void AddCol (unsigned idx, NCTableCol *item)
 
void DelCol (unsigned idx)
 
NCTableColGetCol (unsigned idx)
 
const NCTableColGetCol (unsigned idx) const
 
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
 
virtual void setNested (bool val)
 
void openBranch ()
 
void closeBranch ()
 
void toggleOpenClosedState ()
 
virtual bool handleInput (wint_t key)
 
virtual bool ChangeToVisible ()
 
virtual unsigned Hotspot (unsigned &at) const
 
virtual void UpdateFormat (NCTableStyle &tableStyle)
 
virtual void updatePrefix ()
 
virtual void DrawAt (NCursesWindow &w, const wrect at, NCTableStyle &tableStyle, bool active) const
 
void stripHotkeys ()
 
virtual NCTableLineparent () const
 
virtual NCTableLinefirstChild () const
 
virtual NCTableLinenextSibling () const
 
void setParent (NCTableLine *newVal)
 
void setFirstChild (NCTableLine *newVal)
 
void setNextSibling (NCTableLine *newVal)
 
int treeLevel () const
 
void setTreeLevel (int newVal)
 
int prefixLen () const
 
NCTableTagtagCell () const
 
std::string indentationStr () const
 

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)
 
void initPrefixPlaceholder ()
 
void addToTree (NCTableLine *parent)
 
bool isOpen (YItem *yitem) const
 
YItem * yitem () const
 
void setYItem (YItem *yitem)
 
virtual void DrawItems (NCursesWindow &w, const wrect at, NCTableStyle &tableStyle, bool active) const
 
void assertCol (unsigned idx)
 
const std::string & prefixPlaceholder () const
 
void drawPrefix (NCursesWindow &w, const wrect at, NCTableStyle &tableStyle) const
 
- 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
 

Detailed Description

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.

Member Function Documentation

◆ ChangeToVisible()

bool NCTreeLine::ChangeToVisible ( )
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.

◆ firstChild()

virtual NCTreeLine * NCTreeLine::firstChild ( ) const
inlinevirtual

Reimplemented from NCTableLine.

◆ handleInput()

bool NCTreeLine::handleInput ( wint_t  key)
virtual

Handle keyboard input. Return 'true' if the key event is handled, 'false' to propagate it up to the pad.

Reimplemented from NCTableLine.

◆ Hotspot()

unsigned NCTreeLine::Hotspot ( unsigned &  at) const
virtual

Reimplemented from NCTableLine.

◆ nextSibling()

virtual NCTreeLine * NCTreeLine::nextSibling ( ) const
inlinevirtual

Reimplemented from NCTableLine.

◆ parent()

virtual NCTreeLine * NCTreeLine::parent ( ) const
inlinevirtual

Reimplemented from NCTableLine.

◆ YItem()

YTreeItem * NCTreeLine::YItem ( ) const
inline

Return the corresponding YTreeItem.


The documentation for this class was generated from the following files: