5 #include FORMS_H_LOCATION
19 MiniBuffer(LyXView *o, FL_Coord x, FL_Coord y, FL_Coord h, FL_Coord w);
24 void setTimer(int a) {
25 fl_set_timer(timer, a);
28 void Set(string const & = string(),
29 string const & = string(),
30 string const & = string(),
33 string GetText() const { return text; }
38 /** allows to store and reset the contents one time. Usefull
39 for status messages like "load font" (Matthias)
49 static void ExecutingCB(FL_OBJECT *ob, long);
51 static void TimerCB(FL_OBJECT *ob, long);
53 static int peek_event(FL_OBJECT *, int, FL_Coord, FL_Coord,
63 FL_OBJECT *add(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord);
67 FL_OBJECT *the_buffer;
71 enum{ MAX_HISTORY = 10 };
73 string history[MAX_HISTORY];
75 int history_idx, history_cnt;
77 void addHistory(string const &cmd) {
78 if (history_cnt == 0 || (history_cnt>0 && cmd!= history[(history_cnt-1) % MAX_HISTORY])) {
79 history[history_cnt % MAX_HISTORY] = cmd;
82 history_idx = history_cnt;
85 string getHistory() { return history[history_idx % MAX_HISTORY]; }