source: trunk/FACT++/src/ReadlineWindow.h@ 15350

Last change on this file since 15350 was 10183, checked in by tbretz, 14 years ago
New import.
File size: 1.1 KB
Line 
1#ifndef FACT_ReadlineWindow
2#define FACT_ReadlineWindow
3
4#include "Readline.h"
5
6typedef struct _win_st WINDOW;
7
8class ReadlineWindow : public Readline
9{
10 WINDOW *fWindow; /// Pointer to the panel for the input stream
11
12 int fPromptX; /// When the readline call is issued the x position at which the output will start is stored here
13 int fPromptY; /// When the readline call is issued the y position at which the output will start is stored here
14
15 int fColor; /// Color index in which the prompt should be displayed
16
17protected:
18 // The implementations of the callback funtions
19 //int Getc(FILE *);
20 void Startup();
21 void Redisplay();
22 void EventHook();
23 void CompletionDisplay(char **matches, int num, int max);
24
25 // Refresh the display before setting the cursor position
26 virtual void Refresh() { }
27
28 // Callback after readline has returned
29 void Shutdown(const char *buf);
30
31public:
32 ReadlineWindow(const char *prgname);
33
34 // Initialization
35 void SetWindow(WINDOW *w);
36 void SetColorPrompt(int col) { fColor = col; }
37
38 // Move cursor to start of last prompt
39 void RewindCursor() const;
40};
41
42#endif
Note: See TracBrowser for help on using the repository browser.