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 Jürgen
11 * Full author contact details are available in file CREDITS.
14 #ifndef CONTROLCOMMANDBUFFER_H
15 #define CONTROLCOMMANDBUFFER_H
17 #include "support/docstring.h"
28 * ControlCommandBuffer
30 * This provides methods for the use of a toolkit's
31 * minibuffer/command buffer
33 class ControlCommandBuffer {
35 ControlCommandBuffer(LyXView & lv);
37 /// return the previous history entry if any
38 std::string const historyUp();
40 /// return the next history entry if any
41 std::string const historyDown();
43 /// return the font and depth in the active BufferView as a message.
44 docstring const getCurrentState() const;
46 /// hide the command buffer.
49 /// return the possible completions
50 std::vector<std::string> const completions(std::string const & prefix,
51 std::string & new_prefix);
53 /// dispatch a command
54 void dispatch(std::string const & str);
56 /// controlling LyXView
59 /// available command names
60 std::vector<std::string> commands_;
63 std::vector<std::string> history_;
65 /// current position in command history
66 std::vector<std::string>::const_iterator history_pos_;
69 } // namespace frontend
72 #endif // CONTROLCOMMANDBUFFER_H