libyui-ncurses  2.48.3
NCTablePad Class Reference
Inheritance diagram for NCTablePad:
Collaboration diagram for NCTablePad:

Public Member Functions

 NCTablePad (int lines, int cols, const NCWidget &p)
 
virtual void wRecoded ()
 
virtual wpos CurPos () const
 
virtual bool handleInput (wint_t key)
 
bool setItemByKey (int key)
 
wsze tableSize ()
 
void setOrder (int column, bool do_reverse=false)
 
bool SetHeadline (const std::vector< NCstring > &head)
 
virtual void SendHead ()
 
void SetSepChar (const chtype colSepchar)
 
void SetSepWidth (const unsigned sepwidth)
 
void SetHotCol (const int hcol)
 
unsigned Cols () const
 
unsigned Lines () const
 
unsigned HotCol () const
 
void SetLines (unsigned idx)
 
void SetLines (std::vector< NCTableLine * > &nItems)
 
void ClearTable ()
 
void Append (NCTableLine *item)
 
void Append (std::vector< NCTableCol * > &nItems, int index=-1)
 
void AddLine (unsigned idx, NCTableLine *item)
 
void DelLine (unsigned idx)
 
const NCTableLineGetLine (unsigned idx) const
 
NCTableLineModifyLine (unsigned idx)
 
void stripHotkeys ()
 
void setSortStrategy (NCTableSortStrategyBase *newSortStrategy)
 
- Public Member Functions inherited from NCPad
 NCPad (int lines, int cols, const NCWidget &p)
 
NCursesWindowDestwin ()
 
virtual void Destwin (NCursesWindow *dwin)
 
virtual void resize (wsze nsze)
 
virtual void setDirty ()
 
int update ()
 
virtual int setpos ()
 
int ScrlTo (const wpos &newpos)
 
int ScrlLine (const int line)
 
int ScrlCol (const int col)
 
int ScrlDown (const int lines=1)
 
int ScrlUp (const int lines=1)
 
int ScrlRight (const int cols=1)
 
int ScrlLeft (const int cols=1)
 
- Public Member Functions inherited from NCursesPad
 NCursesPad (int lines, int cols)
 
int echochar (const chtype ch)
 Put the attributed character onto the pad and immediately do a prefresh().
 
int refresh ()
 For Pad's we reimplement refresh() and noutrefresh() to do nothing. More...
 
int noutrefresh ()
 Propagate the changes in this window to the virtual screen. More...
 
int refresh (int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol)
 The coordinates sminrow,smincol,smaxrow,smaxcol describe a rectangle on the screen. More...
 
int noutrefresh (int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol)
 Does the same like refresh() but without calling doupdate().
 
- Public Member Functions inherited from NCursesWindow
 NCursesWindow (WINDOW *window)
 Constructor. More...
 
 NCursesWindow (int lines, int cols, int begin_y, int begin_x)
 Constructor.
 
 NCursesWindow (NCursesWindow &parent, int lines, int cols, int begin_y, int begin_x, char absrel= 'a')
 Constructor. More...
 
virtual ~NCursesWindow ()
 Destructor.
 
NCursesWindow Clone ()
 Make an exact copy of the window.
 
int colors () const
 Number of available colors.
 
int height () const
 Number of lines in this window.
 
int width () const
 Number of columns in this window.
 
int begx () const
 Column of top left corner relative to stdscr.
 
int begy () const
 Line of top left corner relative to stdscr.
 
int maxx () const
 Largest x coord in window.
 
int maxy () const
 Largest y coord in window.
 
wsze size () const
 
wpos begpos () const
 
wpos maxpos () const
 
wrect area () const
 
short getcolor () const
 Actual color pair.
 
short foreground () const
 Actual foreground color.
 
short background () const
 Actual background color.
 
int setpalette (short fore, short back)
 Set color palette entry.
 
int setcolor (short pair)
 Set actually used palette entry.
 
virtual int mvwin (int begin_y, int begin_x)
 Move window to new position with the new position as top left corner. More...
 
int mvsubwin (NCursesWindow *sub, int begin_y, int begin_x)
 
virtual int resize (int lines, int columns)
 
int move (int y, int x)
 Move cursor the this position.
 
void getyx (int &y, int &x) const
 Get current position of the cursor.
 
int mvcur (int oldrow, int oldcol, int newrow, int newcol) const
 Perform lowlevel cursor motion that takes effect immediately.
 
int nodelay (bool bf)
 
int getch ()
 Get a keystroke from the window.
 
int getch (int y, int x)
 Move cursor to position and get a keystroke from the window.
 
int getstr (char *str, int n=-1)
 Read a series of characters into str until a newline or carriage return is received. More...
 
int getstr (int y, int x, char *str, int n=-1)
 Move the cursor to the requested position and then perform the getstr() as described above.
 
int instr (char *s, int n=-1)
 Get a std::string of characters from the window into the buffer s. More...
 
int instr (int y, int x, char *s, int n=-1)
 Move the cursor to the requested position and then perform the instr() as described above.
 
int addch (const char ch)
 Put attributed character to the window.
 
int addch (const chtype ch)
 
int add_attr_char (int y, int x)
 Put attributed character from given position to the window.
 
int add_attr_char ()
 
int add_wch (const cchar_t *cch)
 Put a combined character to the window.
 
int add_wch (int y, int x, const cchar_t *cch)
 
int addch (int y, int x, const char ch)
 Move cursor to the requested position and then put attributed character to the window.
 
int addch (int y, int x, const chtype ch)
 
int echochar (const char ch)
 Put attributed character to the window and refresh it immediately.
 
int echochar (const chtype ch)
 
int addstr (const char *str, int n=-1)
 Write the std::string str to the window, stop writing if the terminating NUL or the limit n is reached. More...
 
int addstr (int y, int x, const char *str, int n=-1)
 Move the cursor to the requested position and then perform the addstr as described above.
 
int addwstr (const wchar_t *str, int n=-1)
 Write the wchar_t str to the window, stop writing if the terminating NUL or the limit n is reached. More...
 
int addwstr (int y, int x, const wchar_t *str, int n=-1)
 Move the cursor to the requested position and then perform the addwstr as described above.
 
int printw (const char *fmt,...)
 Do a formatted print to the window.
 
int printw (int y, int x, const char *fmt,...)
 Move the cursor and then do a formatted print to the window.
 
chtype inch () const
 Retrieve attributed character under the current cursor position.
 
chtype inchar () const
 
chtype inch (int y, int x)
 Move cursor to requested position and then retrieve attributed character at this position.
 
chtype inchar (int y, int x)
 
int in_wchar (cchar_t *cchar)
 Retrieve combined character under the current cursor position.
 
int in_wchar (int y, int x, cchar_t *cchar)
 
int insch (chtype ch)
 Insert attributed character into the window before current cursor position.
 
int insch (int y, int x, chtype ch)
 Move cursor to requested position and then insert the attributed character before that position.
 
int ins_wch (int y, int x, const cchar_t *cchar)
 Move cursor to requested position and then insert the attributed character before that position.
 
int insertln ()
 Insert an empty line above the current line.
 
int insdelln (int n=1)
 If n>0 insert that many lines above the current line. More...
 
int insstr (const char *s, int n=-1)
 Insert the std::string into the window before the current cursor position. More...
 
int insstr (int y, int x, const char *s, int n=-1)
 Move the cursor to the requested position and then perform the insstr() as described above.
 
int attron (chtype at)
 Switch on the window attributes;.
 
int attroff (chtype at)
 Switch off the window attributes;.
 
int attrset (chtype at)
 Set the window attributes;.
 
int chgat (int n, attr_t attr, short color, const void *opts=NULL)
 Change the attributes of the next n characters in the current line. More...
 
int chgat (int y, int x, int n, attr_t attr, short color, const void *opts=NULL)
 Move the cursor to the requested position and then perform chgat() as described above.
 
chtype getbkgd () const
 Get current background setting.
 
int bkgd (const chtype ch)
 Set the background property and apply it to the window.
 
void bkgdset (chtype ch)
 Set the background property.
 
int box ()
 Draw a box around the window with the given vertical and horizontal drawing characters. More...
 
int border (chtype left=0, chtype right=0, chtype top=0, chtype bottom=0, chtype top_left=0, chtype top_right=0, chtype bottom_left=0, chtype bottom_right=0)
 Draw a border around the window with the given characters for the various parts of the border. More...
 
int hline (int len, chtype ch=0)
 Draw a horizontal line of len characters with the given character. More...
 
int hline (int y, int x, int len, chtype ch=0)
 Move the cursor to the requested position and then draw a horizontal line.
 
int vline (int len, chtype ch=0)
 Draw a vertical line of len characters with the given character. More...
 
int vline (int y, int x, int len, chtype ch=0)
 Move the cursor to the requested position and then draw a vertical line.
 
int box (const wrect &dim)
 
int erase ()
 Erase the window.
 
int clear ()
 Clear the window.
 
int clearok (bool bf)
 Set/Reset the clear flag. More...
 
int clrtobot ()
 Clear to the end of the window.
 
int clrtoeol ()
 Clear to the end of the line.
 
int delch ()
 Delete character under the cursor.
 
int delch (int y, int x)
 Move cursor to requested position and delete the character under the cursor.
 
int deleteln ()
 Delete the current line.
 
int scroll (int amount=1)
 Scroll amount lines. More...
 
int scrollok (bool bf)
 If bf is TRUE, window scrolls if cursor is moved off the bottom edge of the window or a scrolling region, otherwise the cursor is left at the bottom line.
 
int setscrreg (int from, int to)
 Define a soft scrolling region.
 
int idlok (bool bf)
 If bf is TRUE, use insert/delete line hardware support if possible. More...
 
void idcok (bool bf)
 If bf is TRUE, use insert/delete character hardware support if possible. More...
 
int touchwin ()
 Mark the whole window as modified.
 
int untouchwin ()
 Mark the whole window as unmodified.
 
int touchln (int s, int cnt, bool changed=TRUE)
 Mark cnt lines beginning from line s as changed or unchanged, depending on the value of the changed flag.
 
bool is_linetouched (int line) const
 Return TRUE if line is marked as changed, FALSE otherwise.
 
bool is_wintouched () const
 Return TRUE if window is marked as changed, FALSE otherwise.
 
int leaveok (bool bf)
 If bf is TRUE, curses will leave the cursor after an update whereever it is after the update.
 
int redrawln (int from, int n)
 Redraw n lines starting from the requested line.
 
int redrawwin ()
 Redraw the whole window.
 
int doupdate ()
 Do all outputs to make the physical screen looking like the virtual one.
 
void syncdown ()
 Propagate the changes down to all descendant windows.
 
void syncup ()
 Propagate the changes up in the hierarchy.
 
void cursyncup ()
 Position the cursor in all ancestor windows corresponding to our setting.
 
int syncok (bool bf)
 If called with bf=TRUE, syncup() is called whenever the window is changed.
 
void immedok (bool bf)
 If called with bf=TRUE, any change in the window will cause an automatic immediate refresh()
 
int keypad (bool bf)
 If called with bf=TRUE, the application will interpret function keys.
 
int meta (bool bf)
 If called with bf=TRUE, keys may generate 8-Bit characters. More...
 
int standout ()
 Enable "standout" attributes.
 
int standend ()
 Disable "standout" attributes.
 
int overlay (NCursesWindow &win)
 Overlay this window over win.
 
int overwrite (NCursesWindow &win)
 Overwrite win with this window.
 
int copywin (NCursesWindow &win, int sminrow, int smincol, int dminrow, int dmincol, int dmaxrow, int dmaxcol, bool overlay=TRUE)
 Overlay or overwrite the rectangle in win given by dminrow,dmincol, dmaxrow,dmaxcol with the rectangle in this window beginning at sminrow,smincol.
 
bool has_mouse () const
 Return TRUE if terminal supports a mouse, FALSE otherwise.
 
NCursesWindowchild ()
 Get the first child window.
 
const NCursesWindowchild () const
 
NCursesWindowsibling ()
 Get the next child of my parent.
 
const NCursesWindowsibling () const
 
NCursesWindowparent ()
 Get my parent.
 
const NCursesWindowparent () const
 
bool isDescendant (NCursesWindow &win)
 Return TRUE if win is a descendant of this.
 
- Public Member Functions inherited from NCScrollHint
void SendSchrollCB (NCSchrollCB *to)
 

Protected Member Functions

void DirtyFormat ()
 
virtual wsze UpdateFormat ()
 
virtual int dirtyPad ()
 
virtual int setpos (const wpos &newpos)
 
virtual int DoRedraw ()
 
virtual void updateScrollHint ()
 
virtual void directDraw (NCursesWindow &w, const wrect at, unsigned lineno)
 Directly draw a table item at a specific location. More...
 
- Protected Member Functions inherited from NCPad
int vheight () const
 The (virtual) height of the Pad (even if truncated). More...
 
bool pageing () const
 Whether the Pad is truncated (we're pageing). More...
 
int adjpos (const wpos &offset)
 
- Protected Member Functions inherited from NCursesWindow
void err_handler (const char *) const THROWS(NCursesException)
 Signal an error with the given message text.
 
void kill_subwindows ()
 Destroy all subwindows.
 
 NCursesWindow ()
 Only for use by derived classes. More...
 
- Protected Member Functions inherited from NCScrollHint
virtual void SetHead (NCursesWindow &w, unsigned ccol)
 
void VSet (unsigned total, unsigned visible, unsigned start)
 
void HSet (unsigned total, unsigned visible, unsigned start)
 
virtual void SetPadSize (wsze &minsze)
 
- Protected Member Functions inherited from NCSchrollCB
virtual void HScroll (unsigned total, unsigned visible, unsigned start)
 
virtual void VScroll (unsigned total, unsigned visible, unsigned start)
 
virtual void ScrollHead (NCursesWindow &w, unsigned ccol)
 
virtual void AdjustPadSize (wsze &minsze)
 

Friends

std::ostream & operator<< (std::ostream &STREAM, const NCTablePad &OBJ)
 

Additional Inherited Members

- Static Public Member Functions inherited from NCursesWindow
static void useColors (void)
 Call this routine very early if you want to have colors.
 
static int ripoffline (int ripoff_lines, int(*init)(NCursesWindow &win))
 This function is used to generate a window of ripped-of lines. More...
 
static int lines ()
 Number of lines on terminal, not window.
 
static int cols ()
 Number of cols on terminal, not window.
 
static int tabsize ()
 Size of a tab on terminal, not window.
 
static int NumberOfColors ()
 Number of available colors.
 
static int maxcoord ()
 Ncurses up to ncurses5 internally uses short. More...
 
- Protected Attributes inherited from NCPad
const NCWidgetparw
 
NCursesWindowdestwin
 
wrect drect
 
wrect srect
 
wpos maxdpos
 
wpos maxspos
 
bool dclear
 
bool dirty
 
- Protected Attributes inherited from NCursesWindow
WINDOW * w
 the curses WINDOW
 
bool alloced
 TRUE if we own the WINDOW.
 
NCursesWindowpar
 parent, if subwindow
 
NCursesWindowsubwins
 head of subwindows std::list
 
NCursesWindowsib
 next subwindow of parent
 
- Static Protected Attributes inherited from NCursesWindow
static long count = 0L
 count of all active windows
 

Detailed Description

Definition at line 155 of file NCTablePad.h.

Member Function Documentation

void NCTablePad::directDraw ( NCursesWindow w,
const wrect  at,
unsigned  lineno 
)
protectedvirtual

Directly draw a table item at a specific location.

update usually copies the visible table content from the NCursesPad to destwin. In case the NCursesPad is truncated, the visible lines are prepared immediately before they are written to destwin

See also
_vheight.

Reimplemented from NCPad.

Definition at line 243 of file NCTablePad.cc.


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