#include <ncursesw.h>
Inheritance diagram for NCursesWindow:
Public Member Functions | |
NCursesWindow (WINDOW *&window) | |
NCursesWindow (int lines, int cols, int begin_y, int begin_x) | |
NCursesWindow (NCursesWindow &par, int lines, int cols, int begin_y, int begin_x, char absrel= 'a') | |
virtual | ~NCursesWindow () |
NCursesWindow | Clone () |
int | colors () const |
int | height () const |
int | width () const |
int | begx () const |
int | begy () const |
int | maxx () const |
int | maxy () const |
wsze | size () const |
wpos | begpos () const |
wpos | maxpos () const |
wrect | area () const |
short | getcolor () const |
short | foreground () const |
short | background () const |
int | setpalette (short fore, short back) |
int | setcolor (short pair) |
virtual int | mvwin (int begin_y, int begin_x) |
int | mvsubwin (NCursesWindow *sub, int begin_y, int begin_x) |
virtual int | resize (int lines, int columns) |
int | move (int y, int x) |
void | getyx (int &y, int &x) const |
int | mvcur (int oldrow, int oldcol, int newrow, int newcol) const |
int | nodelay (bool bf) |
int | getch () |
int | getch (int y, int x) |
int | getstr (char *str, int n=-1) |
int | getstr (int y, int x, char *str, int n=-1) |
int | instr (char *s, int n=-1) |
int | instr (int y, int x, char *s, int n=-1) |
int | addch (const char ch) |
int | addch (const chtype ch) |
int | add_attr_char (int y, int x) |
int | add_attr_char () |
int | add_wch (const cchar_t *cch) |
int | add_wch (int y, int x, const cchar_t *cch) |
int | addch (int y, int x, const char ch) |
int | addch (int y, int x, const chtype ch) |
int | echochar (const char ch) |
int | echochar (const chtype ch) |
int | addstr (const char *str, int n=-1) |
int | addstr (int y, int x, const char *str, int n=-1) |
int | addwstr (const wchar_t *str, int n=-1) |
int | addwstr (int y, int x, const wchar_t *str, int n=-1) |
int | printw (const char *fmt,...) |
int | printw (int y, int x, const char *fmt,...) |
chtype | inch () const |
chtype | inchar () const |
chtype | inch (int y, int x) |
chtype | inchar (int y, int x) |
int | in_wchar (cchar_t *cchar) |
int | in_wchar (int y, int x, cchar_t *cchar) |
int | insch (chtype ch) |
int | insch (int y, int x, chtype ch) |
int | ins_wch (int y, int x, const cchar_t *cchar) |
int | insertln () |
int | insdelln (int n=1) |
int | insstr (const char *s, int n=-1) |
int | insstr (int y, int x, const char *s, int n=-1) |
int | attron (chtype at) |
int | attroff (chtype at) |
int | attrset (chtype at) |
int | chgat (int n, attr_t attr, short color, const void *opts=NULL) |
int | chgat (int y, int x, int n, attr_t attr, short color, const void *opts=NULL) |
chtype | getbkgd () const |
int | bkgd (const chtype ch) |
void | bkgdset (chtype ch) |
int | box () |
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) |
int | hline (int len, chtype ch=0) |
int | hline (int y, int x, int len, chtype ch=0) |
int | vline (int len, chtype ch=0) |
int | vline (int y, int x, int len, chtype ch=0) |
int | box (const wrect &dim) |
int | erase () |
int | clear () |
int | clearok (bool bf) |
int | clrtobot () |
int | clrtoeol () |
int | delch () |
int | delch (int y, int x) |
int | deleteln () |
int | scroll (int amount=1) |
int | scrollok (bool bf) |
int | setscrreg (int from, int to) |
int | idlok (bool bf) |
void | idcok (bool bf) |
int | touchwin () |
int | untouchwin () |
int | touchln (int s, int cnt, bool changed=TRUE) |
bool | is_linetouched (int line) const |
bool | is_wintouched () const |
int | leaveok (bool bf) |
int | redrawln (int from, int n) |
int | redrawwin () |
int | doupdate () |
void | syncdown () |
void | syncup () |
void | cursyncup () |
int | syncok (bool bf) |
void | immedok (bool bf) |
int | keypad (bool bf) |
int | meta (bool bf) |
int | standout () |
int | standend () |
virtual int | refresh () |
virtual int | noutrefresh () |
int | overlay (NCursesWindow &win) |
int | overwrite (NCursesWindow &win) |
int | copywin (NCursesWindow &win, int sminrow, int smincol, int dminrow, int dmincol, int dmaxrow, int dmaxcol, bool overlay=TRUE) |
bool | has_mouse () const |
NCursesWindow * | child () |
const NCursesWindow * | child () const |
NCursesWindow * | sibling () |
const NCursesWindow * | sibling () const |
NCursesWindow * | parent () |
const NCursesWindow * | parent () const |
bool | isDescendant (NCursesWindow &win) |
Static Public Member Functions | |
void | useColors (void) |
int | ripoffline (int ripoff_lines, int(*init)(NCursesWindow &win)) |
int | lines () |
int | cols () |
int | tabsize () |
int | NumberOfColors () |
Protected Member Functions | |
void | err_handler (const char *) const THROWS(NCursesException) |
void | kill_subwindows () |
NCursesWindow () | |
Protected Attributes | |
WINDOW * | w |
bool | alloced |
NCursesWindow * | par |
NCursesWindow * | subwins |
NCursesWindow * | sib |
Static Protected Attributes | |
long | count = 0L |
Private Member Functions | |
void | init () |
short | getcolor (int getback) const |
NCursesWindow (WINDOW *win, int cols) | |
Static Private Member Functions | |
void | initialize () |
int | ripoff_init (WINDOW *, int) |
int | setpalette (short fore, short back, short pair) |
Static Private Attributes | |
bool | b_initialized = FALSE |
int | colorInitialized = COLORS_NOT_INITIALIZED |
Friends | |
class | NCursesMenu |
class | NCursesForm |
std::ostream & | operator<< (std::ostream &Stream, const NCursesWindow &Obj_Cv) |
std::ostream & | operator<< (std::ostream &Stream, const NCursesWindow *Obj_Cv) |
|
This private constructor is only used during the initialization of windows generated by ripoffline() calls. |
|
Only for use by derived classes. They are then in charge to fill the member variables correctly. |
|
Constructor. Useful only for stdscr |
|
Constructor.
|
|
Constructor.
|
|
Destructor. |
|
|
|
Put attributed character from given position to the window. |
|
|
|
Put a combined character to the window. |
|
|
|
Move cursor to the requested position and then put attributed character to the window. |
|
|
|
Put attributed character to the window. |
|
Move the cursor to the requested position and then perform the addstr as described above. |
|
Write the string str to the window, stop writing if the terminating NUL or the limit n is reached. If n is negative, it is ignored. |
|
Move the cursor to the requested position and then perform the addwstr as described above. |
|
Write the wchar_t str to the window, stop writing if the terminating NUL or the limit n is reached. If n is negative, it is ignored. |
|
|
|
Switch off the window attributes; |
|
Switch on the window attributes; |
|
Set the window attributes; |
|
Actual background color |
|
|
|
Column of top left corner relative to stdscr |
|
Line of top left corner relative to stdscr |
|
Set the background property and apply it to the window. |
|
Set the background property. |
|
Draw a border around the window with the given characters for the various parts of the border. If you pass zero for a character, curses will try to find "nice" characters. |
|
|
|
Draw a box around the window with the given vertical and horizontal drawing characters. If you specifiy a zero as character, curses will try to find a "nice" character. |
|
Move the cursor to the requested position and then perform chgat() as described above. |
|
Change the attributes of the next n characters in the current line. If n is negative or greater than the number of remaining characters in the line, the attributes will be changed up to the end of the line. |
|
|
|
Get the first child window. |
|
Clear the window. |
|
Set/Reset the clear flag. If set, the next refresh() will clear the screen. |
|
Make an exact copy of the window. |
|
Clear to the end of the window. |
|
Clear to the end of the line. |
|
Number of available colors |
|
Number of cols on terminal, *not* window |
|
Overlay or overwrite the rectangle in win given by dminrow,dmincol, dmaxrow,dmaxcol with the rectangle in this window beginning at sminrow,smincol. |
|
Position the cursor in all ancestor windows corresponding to our setting |
|
Move cursor to requested position and delete the character under the cursor. |
|
Delete character under the cursor. |
|
Delete the current line. |
|
Do all outputs to make the physical screen looking like the virtual one |
|
Reimplemented in NCursesPad. |
|
Put attributed character to the window and refresh it immediately. |
|
Erase the window. |
|
Signal an error with the given message text. |
|
Actual foreground color |
|
Get current background setting. |
|
Move cursor to position and get a keystroke from the window |
|
Get a keystroke from the window. |
|
Actual color pair |
|
|
|
Move the cursor to the requested position and then perform the getstr() as described above. |
|
Read a series of characters into str until a newline or carriage return is received. Read at most n characters. If n is negative, the limit is ignored. |
|
Get current position of the cursor |
|
Return TRUE if terminal supports a mouse, FALSE otherwise |
|
Number of lines in this window |
|
Move the cursor to the requested position and then draw a horizontal line. |
|
Draw a horizontal line of len characters with the given character. If you pass zero for the character, curses will try to find a "nice" one. |
|
If bf is TRUE, use insert/delete character hardware support if possible. Otherwise do it in software. |
|
If bf is TRUE, use insert/delete line hardware support if possible. Otherwise do it in software. |
|
If called with bf=TRUE, any change in the window will cause an automatic immediate refresh() |
|
|
|
Retrieve combined character under the current cursor position. |
|
Move cursor to requested position and then retrieve attributed character at this position. |
|
Retrieve attributed character under the current cursor position. |
|
|
|
|
|
Reimplemented in NCursesPanel. |
|
|
|
Move cursor to requested position and then insert the attributed character before that position. |
|
Move cursor to requested position and then insert the attributed character before that position. |
|
Insert attributed character into the window before current cursor position. |
|
If n>0 insert that many lines above the current line. If n<0 delete that many lines beginning with the current line. |
|
Insert an empty line above the current line. |
|
Move the cursor to the requested position and then perform the insstr() as described above. |
|
Insert the string into the window before the current cursor position. Insert stops at end of string or when the limit n is reached. If n is negative, it is ignored. |
|
Move the cursor to the requested position and then perform the instr() as described above. |
|
Get a string of characters from the window into the buffer s. Retrieve at most n characters, if n is negative retrieve all characters up to the end of the current line. Attributes are stripped from the characters. |
|
Return TRUE if line is marked as changed, FALSE otherwise |
|
Return TRUE if window is marked as changed, FALSE otherwise |
|
Return TRUE if win is a descendant of this. |
|
If called with bf=TRUE, the application will interpret function keys. |
|
Destroy all subwindows. |
|
If bf is TRUE, curses will leave the cursor after an update whereever it is after the update. |
|
Number of lines on terminal, *not* window |
|
|
|
Largest x coord in window |
|
Largest y coord in window |
|
If called with bf=TRUE, keys may generate 8-Bit characters. Otherwise 7-Bit characters are generated. |
|
Move cursor the this position |
|
Perform lowlevel cursor motion that takes effect immediately. |
|
|
|
Move window to new position with the new position as top left corner. This is virtual because it is redefined in NCursesPanel. Reimplemented in NCursesPanel. |
|
|
|
Propagate the changes in this window to the virtual screen. This is redefined in NCursesPanel. Reimplemented in NCursesPanel, and NCursesPad. |
|
Number of available colors |
|
Overlay this window over win. |
|
Overwrite win with this window. |
|
|
|
Get my parent. |
|
Move the cursor and then do a formatted print to the window. |
|
Do a formatted print to the window. |
|
Redraw n lines starting from the requested line |
|
Redraw the whole window |
|
Propagate the changes in this window to the virtual screen and call doupdate(). This is redefined in NCursesPanel. Reimplemented in NCursesPanel, and NCursesPad. |
|
Reimplemented in NCursesPanel. |
|
|
|
This function is used to generate a window of ripped-of lines. If the argument is positive, lines are removed from the top, if it is negative lines are removed from the bottom. This enhances the lowlevel ripoffline() function because it uses the internal implementation that allows to remove more than just a single line. This function must be called before any other ncurses function. The creation of the window is defered until ncurses gets initialized. The initialization function is then called. |
|
Scroll amount lines. If amount is positive, scroll up, otherwise scroll down. |
|
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. |
|
Set actually used palette entry |
|
Set color palette entry |
|
|
|
Define a soft scrolling region. |
|
|
|
Get the next child of my parent. |
|
|
|
Disable "standout" attributes |
|
Enable "standout" attributes |
|
Propagate the changes down to all descendant windows |
|
If called with bf=TRUE, syncup() is called whenever the window is changed |
|
Propagate the changes up in the hierarchy |
|
Size of a tab on terminal, *not* window |
|
Mark cnt lines beginning from line s as changed or unchanged, depending on the value of the changed flag. |
|
Mark the whole window as modified. |
|
Mark the whole window as unmodified. |
|
Call this routine very early if you want to have colors. |
|
Move the cursor to the requested position and then draw a vertical line. |
|
Draw a vertical line of len characters with the given character. If you pass zero for the character, curses will try to find a "nice" one. |
|
Number of columns in this window |
|
|
|
|
|
|
|
|
|
TRUE if we own the WINDOW |
|
|
|
|
|
count of all active windows |
|
parent, if subwindow |
|
next subwindow of parent |
|
head of subwindows list |
|
the curses WINDOW |