]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.h
* LyXFunc::owner renamed to lyx_view_
[lyx.git] / src / lyxfunc.h
index 7a2b322e69068ba4592e29e12ca1d0ee6f176b0a..5790b81b1cc68872a678ba2bb73704ec1576eaa7 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "support/docstring.h"
 
-#include <boost/shared_ptr.hpp>
+#include <boost/scoped_ptr.hpp>
 #include <boost/signals/trackable.hpp>
 
 
@@ -41,11 +41,17 @@ class LyXView;
 class LyXFunc : public boost::signals::trackable {
 public:
        ///
-       explicit LyXFunc(LyXView *);
+       explicit LyXFunc();
 
        /// LyX dispatcher, executes lyx actions.
        void dispatch(FuncRequest const &);
 
+       ///
+       void setLyXView(LyXView * lv);
+
+       ///
+       void initKeySequences(kb_keymap * kb);
+
        /// return the status bar state string
        std::string const viewStatusMessage();
 
@@ -74,19 +80,18 @@ private:
        BufferView * view() const;
 
        ///
-       LyXView * owner;
+       LyXView * lyx_view_;
 
        /// the last character added to the key sequence, in ISO encoded form
        lyx::char_type encoded_last_key;
 
        ///
-       kb_sequence keyseq;
+       boost::scoped_ptr<kb_sequence> keyseq;
        ///
-       kb_sequence cancel_meta_seq;
+       boost::scoped_ptr<kb_sequence> cancel_meta_seq;
        ///
        key_modifier::state meta_fake_bit;
-       ///
-       void setupLocalKeymap();
+
        /// Error status, only Dispatch can change this flag
        mutable bool errorstat;
 
@@ -108,6 +113,20 @@ private:
        void doImport(std::string const &);
        ///
        void closeBuffer();
+       ///
+       bool ensureBufferClean(BufferView * bv);
 };
 
+/// Implementation is in lyx_main.C
+extern LyXFunc & theLyXFunc();
+
+namespace lyx {
+
+/// Implementation is in lyx_main.C
+extern FuncStatus getStatus(FuncRequest const & action);
+
+/// Implementation is in lyx_main.C
+extern void dispatch(FuncRequest const & action);
+}
+
 #endif