4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
8 * \author Jean-Marc Lasgouttes
11 * Full author contact details are available in file CREDITS.
17 #include <boost/scoped_ptr.hpp>
18 #include <boost/shared_ptr.hpp>
19 #include <boost/utility.hpp>
33 class LyX : boost::noncopyable {
35 static void exec(int & argc, char * argv[]);
37 static LyX const & cref();
39 /// in the case of failure
40 void emergencyCleanup() const;
42 LastFiles & lastfiles();
43 LastFiles const & lastfiles() const;
45 void addLyXView(boost::shared_ptr<LyXView> const & lyxview);
47 /** redraw \c inset in all the BufferViews in which it is currently
48 * visible. If successful return a pointer to the owning Buffer.
50 Buffer const * const updateInset(InsetBase const *) const;
53 static boost::scoped_ptr<LyX> singleton_;
56 void priv_exec(int & argc, char * argv[]);
58 /// initial LyX set up
60 /// set up the default key bindings
61 void defaultKeyBindings(kb_keymap * kbmap);
62 /// set up the default dead key bindings if requested
63 void deadKeyBindings(kb_keymap * kbmap);
64 /// check, set up and configure the user dir if necessary
65 void queryUserLyXDir(bool explicit_userdir);
66 /// read lyxrc/preferences
67 void readRcFile(std::string const & name);
68 /// read the given ui (menu/toolbar) file
69 void readUIFile(std::string const & name);
70 /// read the given languages file
71 void readLanguagesFile(std::string const & name);
72 /// read the given encodings file
73 void readEncodingsFile(std::string const & name);
74 /// parsing of non-gui LyX options. Returns true if gui
75 bool easyParse(int & argc, char * argv[]);
76 /// shows up a parsing error on screen
77 void printError(ErrorItem const &);
79 /// has this user started lyx for the first time?
81 /// the parsed command line batch command if any
82 std::string batch_command;
85 boost::scoped_ptr<LastFiles> lastfiles_;
87 typedef std::list<boost::shared_ptr<LyXView> > ViewList;