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);
27 void setTimer(unsigned int a) {
28 timer.setTimeout(a * 1000);
32 void Set(string const & = string(),
33 string const & = string(),
34 string const & = string(),
35 unsigned int delay_secs = 6);
37 string const GetText() const { return text; }
41 void PrepareForCommand();
42 /** allows to store and reset the contents one time. Usefull
43 for status messages like "load font" (Matthias)
53 static void ExecutingCB(FL_OBJECT * ob, long);
55 static int peek_event(FL_OBJECT *, int, FL_Coord, FL_Coord,
65 FL_OBJECT * add(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord);
69 FL_OBJECT * the_buffer;
73 enum{ MAX_HISTORY = 10 };
75 mutable string history[MAX_HISTORY];
77 mutable int history_idx;
79 mutable int history_cnt;
81 void addHistory(string const & cmd) const {
84 && cmd != history[(history_cnt - 1) % MAX_HISTORY])) {
85 history[history_cnt % MAX_HISTORY] = cmd;
88 history_idx = history_cnt;
91 string const getHistory() const {
92 return history[history_idx % MAX_HISTORY];