FACT++  1.0
void Shell::CreateWindows ( WINDOW w[3],
int  all = true 
)
private

Helper for the constructor and window resizing to create the windows and panels.

Creates the windows to be used as panels and draws a frame around one

Parameters
wpointers to the three windows which have been created are returned
allIf all is false do not (re-)create the bottom or input-window

Definition at line 240 of file Shell.cc.

References fPanelHeight.

Referenced by HandleResize(), Resize(), and Shell().

241 {
242  int maxx, maxy;
243  getmaxyx(stdscr, maxy, maxx);
244 
245  int separator = maxy-fPanelHeight;
246 
247  WINDOW *new_in = all ? newwin(maxy, maxx, 0, 0) : 0;
248  WINDOW *new_frame = newwin(separator-1, maxx, 0, 0);
249  WINDOW *new_out = newwin(separator-1-2, maxx-2, 1, 1);
250 
251  box(new_frame, 0,0);
252  wmove(new_frame, 0, 1);
253  waddch(new_frame, ACS_RTEE);
254  wprintw(new_frame, " F1 ");
255  waddch(new_frame, ACS_LTEE);
256 
257  scrollok(new_out, true);
258  leaveok (new_out, true);
259 
260  if (new_in)
261  {
262  scrollok(new_in, true); // Allow scrolling
263  leaveok (new_in, false); // Move the cursor with the output
264 
265  wmove(new_in, maxy-1, 0);
266  }
267 
268  w[0] = new_in;
269  w[1] = new_frame;
270  w[2] = new_out;
271 }
struct _win_st WINDOW
Definition: ReadlineWindow.h:6
int fPanelHeight
Pointer to the panel for the output stream.
Definition: Shell.h:25

+ Here is the caller graph for this function: