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
25 * ControlCommandBuffer
27 * This provides methods for the use of a toolkit's
28 * minibuffer/command buffer
30 class ControlCommandBuffer {
32 ControlCommandBuffer(LyXView & lv);
34 /// return the previous history entry if any
35 string const historyUp();
37 /// return the next history entry if any
38 string const historyDown();
40 /// return the font and depth in the active BufferView as a message.
41 string const getCurrentState() const;
43 /// return the possible completions
44 std::vector<string> const completions(string const & prefix,
47 /// dispatch a command
48 void dispatch(string const & str);
50 /// controlling LyXView
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