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