]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiCommandBuffer.h
do what the FIXME suggested
[lyx.git] / src / frontends / qt4 / GuiCommandBuffer.h
index 370c937b9f80e3fd3cdb9be2e7450d3a5518460e..9f8ec74216e9e2a952637905837459f8651f271c 100644 (file)
@@ -4,30 +4,36 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
+ * \author Lars
+ * \author Asger and Jürgen
  * \author John Levon
  *
  * Full author contact details are available in file CREDITS.
  */
 
-#ifndef QCOMMANDBUFFER_H
-#define QCOMMANDBUFFER_H
+#ifndef GUICOMMANDBUFFER_H
+#define GUICOMMANDBUFFER_H
 
-#include "controllers/ControlCommandBuffer.h"
+#include "support/docstring.h"
 
 #include <QWidget>
 
+#include <vector>
+
 class QListWidgetItem;
 
 namespace lyx {
 namespace frontend {
 
-class GuiCommandEdit;
 class GuiView;
+class GuiCommandEdit;
 
-class GuiCommandBuffer : public QWidget {
+class GuiCommandBuffer : public QWidget
+{
        Q_OBJECT
+
 public:
-       GuiCommandBuffer(GuiViewBase * view);
+       GuiCommandBuffer(GuiView * view);
 
 public Q_SLOTS:
        /// cancel command compose
@@ -46,16 +52,39 @@ public Q_SLOTS:
        void hideParent();
 private:
        /// owning view
-       GuiViewBase * view_;
-
-       /// controller
-       ControlCommandBuffer controller_;
-
+       GuiView * view_;
        /// command widget
        GuiCommandEdit * edit_;
+
+       /// return the previous history entry if any
+       std::string const historyUp();
+       /// return the next history entry if any
+       std::string const historyDown();
+
+       /// return the font and depth in the active BufferView as a message.
+       docstring const getCurrentState() const;
+
+       /// hide the command buffer.
+       void hide() const;
+
+       /// return the possible completions
+       std::vector<std::string> const completions(std::string const & prefix,
+                                             std::string & new_prefix);
+
+       /// dispatch a command
+       void dispatch(std::string const & str);
+
+       /// available command names
+       std::vector<std::string> commands_;
+
+       /// command history
+       std::vector<std::string> history_;
+
+       /// current position in command history
+       std::vector<std::string>::const_iterator history_pos_;
 };
 
 } // namespace frontend
 } // namespace lyx
 
-#endif // QCOMMANDBUFFER_H
+#endif // GUICOMMANDBUFFER_H