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 /// hide the command buffer.
50 /// return the possible completions
51 std::vector<std::string> const completions(std::string const & prefix,
52 std::string & new_prefix);
54 /// dispatch a command
55 void dispatch(std::string const & str);
57 /// controlling LyXView
60 /// available command names
61 std::vector<std::string> commands_;
64 std::vector<std::string> history_;
66 /// current position in command history
67 std::vector<std::string>::const_iterator history_pos_;
70 } // namespace frontend
73 #endif // CONTROLCOMMANDBUFFER_H