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"
29 * ControlCommandBuffer
31 * This provides methods for the use of a toolkit's
32 * minibuffer/command buffer
34 class ControlCommandBuffer {
36 ControlCommandBuffer(LyXView & lv);
38 /// return the previous history entry if any
39 std::string const historyUp();
41 /// return the next history entry if any
42 std::string const historyDown();
44 /// return the font and depth in the active BufferView as a message.
45 docstring const getCurrentState() const;
47 /// return the possible completions
48 std::vector<std::string> const completions(std::string const & prefix,
49 std::string & new_prefix);
51 /// dispatch a command
52 void dispatch(std::string const & str);
54 /// controlling LyXView
57 /// available command names
58 std::vector<std::string> commands_;
61 std::vector<std::string> history_;
63 /// current position in command history
64 std::vector<std::string>::const_iterator history_pos_;
67 } // namespace frontend
70 #endif // CONTROLCOMMANDBUFFER_H