3 * \file ControlCommandBuffer.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Asger and Juergen
11 * Full author contact details are available in file CREDITS
14 #ifndef CONTROLCOMMANDBUFFER_H
15 #define CONTROLCOMMANDBUFFER_H
28 * ControlCommandBuffer
30 * This provides methods for the use of a toolkit's
31 * minibuffer/command buffer
33 class ControlCommandBuffer {
35 ControlCommandBuffer(LyXFunc & lf);
37 /// return the previous history entry if any
38 string const historyUp();
40 /// return the next history entry if any
41 string const historyDown();
43 /// return the possible completions
44 std::vector<string> const completions(string const & prefix, string & new_prefix);
46 /// dispatch a command
47 void dispatch(string const & str);
50 /// controlling lyxfunc
53 /// available command names
54 std::vector<string> commands_;
57 std::vector<string> history_;
59 /// current position in command history
60 std::vector<string>::const_iterator history_pos_;
63 #endif // CONTROLCOMMANDBUFFER_H