1 /* 2 * history.h 3 * 4 * Copyright (C) 1998 Jiann-Ching Liu 5 */ 6 7 8 #ifndef __QE_HISTORY_H_ 9 #define __QE_HISTORY_H_ 10 11 #include "qe_config.h" 12 13 class linebuffer; 14 15 class cmdHistory { 16 protected: 17 linebuffer *head; 18 linebuffer *tail; 19 int max_record; 20 int record_no; 21 WINDOW *win; 22 int height; 23 int width; 24 protected: 25 void init_cmdHistory(void); 26 int display_history(linebuffer *ptr, const linebuffer *sel); 27 public: 28 cmdHistory(void); 29 cmdHistory(const int record); 30 ~cmdHistory(void); 31 32 void push(const char *str); 33 char * pop(void); 34 char * top(void); 35 36 int active(char *cmdline, WINDOW *pwin, const int y, const int x, 37 const int h, const int w); 38 }; 39 40 #endif 41