This initializes the Ncurses environment. Since the ncurses environment is global only one instance of this class is allowed.
The first 8 color pairs (COLOR_PAIR) are set to the first 8 color with default background.
The shells windows and panels are created. And their pointers are propagated to the two associated WindowLog streams.
Also some key bindings are initialized.
Definition at line 95 of file Shell.cc.
References Readline::BindKeySequence(), CreateWindows(), FALSE, fPanelFrame, fPanelIn, fPanelOut, HandleResizeImp(), i, rl_proc_F1(), rl_scroll_bot(), rl_scroll_top(), rl_top_dec(), rl_top_inc(), rl_top_resize(), ReadlineWindow::SetColorPrompt(), ReadlineWindow::SetWindow(), WindowLog::SetWindow(), ShowHide(), This, win, and wout.
101 cout <<
"ERROR - Only one instance of class Shell is allowed." << endl;
115 intrflush(stdscr,
FALSE);
116 keypad(stdscr,
FALSE);
119 use_default_colors();
123 for (
int i=1;
i<8;
i++)
int fIsVisible
Space between the bottom of the screen and the output panel.
static int rl_scroll_top(int cnt, int key)
PANEL * fPanelOut
Pointer to the panel for the frame around the output.
WindowLog win
pointer to our glocal object to get the static member functions into scope
void SetWindow(WINDOW *w)
static int rl_top_inc(int cnt, int key)
static int rl_scroll_bot(int cnt, int key)
static void HandleResizeImp(int dummy)
Signal handler for SIGWINCH, calls HandleResize.
void BindKeySequence(const char *seq, int(*func)(int, int))
void CreateWindows(WINDOW *w[3], int all=true)
Helper for the constructor and window resizing to create the windows and panels.
ReadlineWindow(const char *prgname)
void SetColorPrompt(int col)
int fLine
Flag whether the output panel is visible or not (for toggle operations)
PANEL * fPanelFrame
Pointer to the panel for the input stream.
static int rl_top_resize(int cnt, int key)
static int rl_proc_F1(int cnt, int key)
Key binding for F1. Toggles upper panel by calling ShowHide(-1)
void SetWindow(WINDOW *w)
Redirect the output to an ncurses WINDOW instead of cout.
int fPanelHeight
Pointer to the panel for the output stream.
static int rl_top_dec(int cnt, int key)