5 #include FORMS_H_LOCATION
8 #include "frontends/Timeout.h"
17 class MiniBuffer : public SigC::Object {
20 MiniBuffer(LyXView * o,
21 FL_Coord x, FL_Coord y, FL_Coord h, FL_Coord w);
28 void setTimer(unsigned int a) {
29 timer.setTimeout(a * 1000);
34 void Set(string const & = string(),
35 string const & = string(),
36 string const & = string(),
37 unsigned int delay_secs = 6);
39 string const GetText() const { return text; }
43 void PrepareForCommand();
44 /** allows to store and reset the contents one time. Usefull
45 for status messages like "load font" (Matthias)
55 static void ExecutingCB(FL_OBJECT * ob, long);
57 static int peek_event(FL_OBJECT *, int, FL_Coord, FL_Coord,
67 FL_OBJECT * add(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord);
71 FL_OBJECT * the_buffer;
75 enum{ MAX_HISTORY = 10 };
77 mutable string history[MAX_HISTORY];
79 mutable int history_idx;
81 mutable int history_cnt;
83 void addHistory(string const & cmd) const {
86 && cmd != history[(history_cnt - 1) % MAX_HISTORY])) {
87 history[history_cnt % MAX_HISTORY] = cmd;
90 history_idx = history_cnt;
93 string const getHistory() const {
94 return history[history_idx % MAX_HISTORY];