]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiSymbols.h
do what the FIXME suggested
[lyx.git] / src / frontends / qt4 / GuiSymbols.h
index 33eff14fa0d60a2b516d87ae9d91ef33224bc1a5..ba35527420114292bb58f45cd9979b0a7debefff 100644 (file)
 
 #include "DialogView.h"
 #include "ui_SymbolsUi.h"
-#include "Encoding.h"
+
+#include <map>
+#include <set>
 
 class QListWidgetItem;
-class Encoding;
 
 namespace lyx {
 namespace frontend {
@@ -33,9 +34,9 @@ public:
        //@{
        void updateView();
        void dispatchParams();
-       bool initialiseParams(std::string const & data);
-       void clearParams() {}
+       void enableView(bool enable);
        bool isBufferDependent() const { return true; }
+       virtual kb_action getLfun() const { return LFUN_SELF_INSERT; }
        //@}
 
 public Q_SLOTS:
@@ -45,12 +46,16 @@ public Q_SLOTS:
        void on_symbolsLW_itemActivated(QListWidgetItem *);
        void on_symbolsLW_itemClicked(QListWidgetItem * item);
        void on_categoryCO_activated(QString const & text);
+       void on_categoryFilterCB_toggled(bool);
        void on_chosenLE_returnPressed();
        void on_chosenLE_textChanged(QString const &);
 
 private:
-       /// update the widgets (symbol browser, category combo)
-       void updateSymbolList();
+       /** update the widgets (symbol browser, category combo)
+        *  \p combo indicates if the combo box has to be refreshed
+        *  as well (which is rather expensive)
+       **/
+       void updateSymbolList(bool update_combo = true);
        /// get the unicode block associated with \p c
        QString const getBlock(char_type c) const;
        /// the encoding at cursor position
@@ -59,6 +64,10 @@ private:
        typedef std::map<QString, QListWidgetItem *> UsedBlocks;
        ///
        UsedBlocks used_blocks;
+       /// list of all symbols
+       typedef std::set<char_type> SymbolsList;
+       ///
+       SymbolsList symbols_;
 };
 
 } // namespace frontend