60 fWindow(0), fPromptX(0), fPromptY(0)
83 getmaxyx(w, height, width);
209 getmaxyx(
fWindow, lines, cols);
216 wprintw(
fWindow,
"%s", prompt.c_str());
218 wprintw(
fWindow,
"%s", buffer.c_str());
227 xy += prompt.length();
231 const int end = xy + buffer.size();
234 int scrolls = end/cols - lines + 1;
242 const int px = cur%cols;
243 const int py = scrolls>=1 ? cur/cols - scrolls : cur/cols;
284 getmaxyx(
fWindow, lines, cols);
290 const int ncols = cols / max;
294 fmt <<
"%-" << max <<
's';
298 for (
int i=0;
i<num;
i++)
303 if ((max+0)*ncols < cols)
309 wprintw(
fWindow, fmt.str().c_str(), matches[
i+1]);
346 getmaxyx(
fWindow, lines, cols);
352 wmove(
fWindow, xy/cols, xy%cols);
361 if (xy/cols==lines-1)
void Startup()
Color index in which the prompt should be displayed.
void SetWindow(WINDOW *w)
void CompletionDisplay(char **matches, int num, int max)
ReadlineWindow(const char *prgname)
static std::string GetBuffer()
static std::string GetPrompt()
int fPromptY
When the readline call is issued the x position at which the output will start is stored here...
void Shutdown(const char *buf)
void RewindCursor() const
int fPromptX
Pointer to the panel for the input stream.
static int GetCursor()
return rl_point (the current cursor position within the line buffer)
int fColor
When the readline call is issued the y position at which the output will start is stored here...
void EventHook(bool=false)
virtual void EventHook(bool newline=false)
C++ wrapper for GNU's readline library.