3 * \file ControlCommandBuffer.h
4 * Copyright 1995-2002 the LyX Team
5 * Read the file COPYING
8 * \author Asger and Juergen
9 * \author John Levon <levon@movementarian.org>
12 #ifndef CONTROLCOMMANDBUFFER_H
13 #define CONTROLCOMMANDBUFFER_H
26 * ControlCommandBuffer
28 * This provides methods for the use of a toolkit's
29 * minibuffer/command buffer
31 class ControlCommandBuffer {
33 ControlCommandBuffer(LyXFunc & lf);
35 /// return the previous history entry if any
36 string const historyUp();
38 /// return the next history entry if any
39 string const historyDown();
41 /// return the possible completions
42 std::vector<string> const completions(string const & prefix, string & new_prefix);
44 /// dispatch a command
45 void dispatch(string const & str);
48 /// controlling lyxfunc
51 /// available command names
52 std::vector<string> commands_;
55 std::vector<string> history_;
57 /// current position in command history
58 std::vector<string>::const_iterator history_pos_;
61 #endif // CONTROLCOMMANDBUFFER_H