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
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 std::string const getCurrentState() const;
46 /// return the possible completions
47 std::vector<std::string> const completions(std::string const & prefix,
48 std::string & new_prefix);
50 /// dispatch a command
51 void dispatch(std::string const & str);
53 /// controlling LyXView
56 /// available command names
57 std::vector<std::string> commands_;
60 std::vector<std::string> history_;
62 /// current position in command history
63 std::vector<std::string>::const_iterator history_pos_;
66 } // namespace frontend
69 #endif // CONTROLCOMMANDBUFFER_H