5 #include FORMS_H_LOCATION
19 MiniBuffer(LyXView * o,
20 FL_Coord x, FL_Coord y, FL_Coord h, FL_Coord w);
25 void setTimer(int a) {
26 fl_set_timer(timer, a);
29 void Set(string const & = string(),
30 string const & = string(),
31 string const & = string(),
34 string GetText() const { return text; }
39 /** allows to store and reset the contents one time. Usefull
40 for status messages like "load font" (Matthias)
50 static void ExecutingCB(FL_OBJECT *ob, long);
52 static void TimerCB(FL_OBJECT *ob, long);
54 static int peek_event(FL_OBJECT *, int, FL_Coord, FL_Coord,
64 FL_OBJECT *add(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord);
68 FL_OBJECT *the_buffer;
72 enum{ MAX_HISTORY = 10 };
74 string history[MAX_HISTORY];
76 int history_idx, history_cnt;
78 void addHistory(string const &cmd) {
79 if (history_cnt == 0 || (history_cnt>0 && cmd!= history[(history_cnt-1) % MAX_HISTORY])) {
80 history[history_cnt % MAX_HISTORY] = cmd;
83 history_idx = history_cnt;
86 string getHistory() { return history[history_idx % MAX_HISTORY]; }