5 #include FORMS_H_LOCATION
19 MiniBuffer(LyXView
*o
, FL_Coord x
, FL_Coord y
, FL_Coord h
, FL_Coord w
)
22 text
= _("Welcome to LyX!");
23 shows_no_match
= true;
24 history_idx
= history_cnt
= 0;
25 add(FL_NORMAL_INPUT
, x
, y
, h
, w
);
30 void setTimer(int a
) {
31 fl_set_timer(timer
, a
);
34 void Set(string
const& = string(),
35 string
const& = string(),
36 string
const& = string(),
39 string
GetText() const { return text
; }
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 void TimerCB(FL_OBJECT
*ob
, long);
59 static int peek_event(FL_OBJECT
*, int, FL_Coord
, FL_Coord
,
69 FL_OBJECT
*add(int, FL_Coord
, FL_Coord
, FL_Coord
, FL_Coord
);
73 FL_OBJECT
*the_buffer
;
77 enum{ MAX_HISTORY
= 10 };
79 string history
[MAX_HISTORY
];
81 int history_idx
, history_cnt
;
83 void addHistory(string
const &cmd
) {
84 if (history_cnt
==0 || (history_cnt
>0 && cmd
!=history
[(history_cnt
-1) % MAX_HISTORY
])) {
85 history
[history_cnt
% MAX_HISTORY
] = cmd
;
88 history_idx
= history_cnt
;
91 string
getHistory() { return history
[history_idx
% MAX_HISTORY
]; }