Styling for a NCTable: column widths, alignment and colors.
More...
#include <NCTableItem.h>
|
| NCTableStyle (const NCWidget &parentWidget) |
|
bool | SetStyleFrom (const std::vector< NCstring > &head) |
|
void | SetSepChar (const chtype sepChar) |
|
void | SetSepWidth (const unsigned sepWidth) |
| total width of space between adjacent columns, including the separator character
|
|
void | SetHotCol (int hcol) |
|
void | ResetToMinCols () |
| Forget sizing based on table content, resize according to headline only.
|
|
void | AssertMinCols (unsigned num) |
| Ensure we know width and alignment for at least num columns.
|
|
void | MinColWidth (unsigned num, unsigned val) |
|
NC::ADJUST | ColAdjust (unsigned num) const |
|
unsigned | Cols () const |
|
unsigned | ColWidth (unsigned num) const |
|
unsigned | ColSepWidth () const |
|
chtype | ColSepChar () const |
|
unsigned | HotCol () const |
|
const NCstyle::StList & | listStyle () const |
|
chtype | getBG () const |
|
chtype | getBG (const NCTableLine::STATE lstate, const NCTableCol::STYLE cstyle=NCTableCol::PLAIN) const |
|
chtype | highlightBG (const NCTableLine::STATE lstate, const NCTableCol::STYLE cstyle, const NCTableCol::STYLE dstyle=NCTableCol::PLAIN) const |
|
chtype | hotBG (const NCTableLine::STATE lstate, unsigned colidx) const |
|
const NCTableLine & | Headline () const |
|
unsigned | TableWidth () const |
| Add up the widths of columns with the separators.
|
|
|
static const chtype | currentBG = (chtype) - 1 |
|
|
std::ostream & | operator<< (std::ostream &str, const NCTableStyle &obj) |
|
Styling for a NCTable: column widths, alignment and colors.
◆ MinColWidth()
void NCTableStyle::MinColWidth |
( |
unsigned |
num, |
|
|
unsigned |
val |
|
) |
| |
|
inline |
Update colWidth[num] to be at least val.
- Parameters
-
num | column number (may be bigger than previously) |
val | width of that column for some line |
◆ SetStyleFrom()
bool NCTableStyle::SetStyleFrom |
( |
const std::vector< NCstring > & |
head | ) |
|
Reset columns, setting their alignment and optionally titles. Column widths are zeroed.
- Parameters
-
head | List of strings where their first character is the alignment (L, R, C) and the optional rest is the column heading |
- Returns
- do we have a column heading
The documentation for this class was generated from the following files:
- /builddir/build/BUILD/libyui-4.6.0/libyui-ncurses/src/NCTableItem.h
- /builddir/build/BUILD/libyui-4.6.0/libyui-ncurses/src/NCTableItem.cc