]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiCommandBuffer.h
rename buffer parameter math_number_before to math_numbering_side
[lyx.git] / src / frontends / qt4 / GuiCommandBuffer.h
index b3a1004d4e9ebde08a0ec92bf92f040e61c7467f..8225ec71a720c8b1c42cfbda55da12d3030c4c59 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "support/docstring.h"
 
+#include <QPushButton>
 #include <QWidget>
 
 #include <vector>
 class QListWidgetItem;
 
 namespace lyx {
+
+class DispatchResult;
+
 namespace frontend {
 
-class LyXView;
 class GuiView;
 class GuiCommandEdit;
 
@@ -37,14 +40,14 @@ public:
        GuiCommandBuffer(GuiView * view);
 
 public Q_SLOTS:
-       /// cancel command compose
-       void cancel();
        /// dispatch a command
        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
@@ -54,8 +57,6 @@ public Q_SLOTS:
 private:
        /// owning view
        GuiView * view_;
-       ///
-       LyXView & lv_;
        /// command widget
        GuiCommandEdit * edit_;
 
@@ -67,15 +68,17 @@ private:
        /// return the font and depth in the active BufferView as a message.
        docstring const getCurrentState() const;
 
-       /// 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);
 
        /// dispatch a command
-       void dispatch(std::string const & str);
+       DispatchResult const & dispatch(std::string const & str);
 
        /// available command names
        std::vector<std::string> commands_;
@@ -85,6 +88,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