#include "kbsequence.h"
#include "lfuns.h"
-#include "support/types.h"
+#include "support/docstring.h"
-#include <boost/shared_ptr.hpp>
+#include <boost/scoped_ptr.hpp>
#include <boost/signals/trackable.hpp>
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();
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;
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