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
27 * ControlCommandBuffer
29 * This provides methods for the use of a toolkit's
30 * minibuffer/command buffer
32 class ControlCommandBuffer {
34 ControlCommandBuffer(LyXView & lv);
36 /// return the previous history entry if any
37 std::string const historyUp();
39 /// return the next history entry if any
40 std::string const historyDown();
42 /// return the font and depth in the active BufferView as a message.
43 std::string const getCurrentState() const;
45 /// return the possible completions
46 std::vector<std::string> const completions(std::string const & prefix,
47 std::string & new_prefix);
49 /// dispatch a command
50 void dispatch(std::string const & str);
52 /// controlling LyXView
55 /// available command names
56 std::vector<std::string> commands_;
59 std::vector<std::string> history_;
61 /// current position in command history
62 std::vector<std::string>::const_iterator history_pos_;
65 } // namespace frontend
68 #endif // CONTROLCOMMANDBUFFER_H