]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiCommandBuffer.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiCommandBuffer.h
index 5dc58dd7e87505e6dddb3b51229410862d667f9c..07370875f31cea00c653f266247bae721cb49a2e 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "support/docstring.h"
 
+#include <QPushButton>
 #include <QWidget>
 
 #include <vector>
@@ -25,8 +26,7 @@ class QListWidgetItem;
 namespace lyx {
 namespace frontend {
 
-class LyXView;
-class GuiViewBase;
+class GuiView;
 class GuiCommandEdit;
 
 class GuiCommandBuffer : public QWidget
@@ -34,7 +34,7 @@ class GuiCommandBuffer : public QWidget
        Q_OBJECT
 
 public:
-       GuiCommandBuffer(GuiViewBase * view);
+       GuiCommandBuffer(GuiView * view);
 
 public Q_SLOTS:
        /// cancel command compose
@@ -43,8 +43,10 @@ public Q_SLOTS:
        void dispatch();
        /// tab-complete
        void complete();
-       /// select-complete
-       void complete_selected(QListWidgetItem *);
+       /// show history
+       void listHistoryUp();
+       /// called when an item in a list is selected
+       void itemSelected(QListWidgetItem *);
        /// up
        void up();
        /// down
@@ -53,9 +55,7 @@ public Q_SLOTS:
        void hideParent();
 private:
        /// owning view
-       GuiViewBase * view_;
-       ///
-       LyXView & lv_;
+       GuiView * view_;
        /// command widget
        GuiCommandEdit * edit_;
 
@@ -70,6 +70,11 @@ private:
        /// hide the command buffer.
        void hide() const;
 
+       /// open a listbox and show the contents of the list. When reversed
+       /// is true, the contents of the list is filled bottom-up.
+       void showList(std::vector<std::string> const & list, 
+               QPoint const & pos, bool reversed = false) const;
+
        /// return the possible completions
        std::vector<std::string> const completions(std::string const & prefix,
                                              std::string & new_prefix);
@@ -85,6 +90,12 @@ private:
 
        /// current position in command history
        std::vector<std::string>::const_iterator history_pos_;
+
+       /// the button up
+       QPushButton * upPB;
+
+       /// the button down
+       QPushButton * downPB;
 };
 
 } // namespace frontend