4 * Copyright 2002 the LyX Team
5 * Read the file COPYING
14 #include "errorlist.h"
16 #include <boost/scoped_ptr.hpp>
17 #include <boost/utility.hpp>
29 extern string user_lyxdir;
31 extern boost::scoped_ptr<LastFiles> lastfiles;
35 class LyX : boost::noncopyable {
37 LyX(int & argc, char * argv[]);
39 /// in the case of failure
40 static void emergencyCleanup();
43 /// initial LyX set up
45 /// set up the default key bindings
46 void defaultKeyBindings(kb_keymap * kbmap);
47 /// set up the default dead key bindings if requested
48 void deadKeyBindings(kb_keymap * kbmap);
49 /// check, set up and configure the user dir if necessary
50 void queryUserLyXDir(bool explicit_userdir);
51 /// read lyxrc/preferences
52 void readRcFile(string const & name);
53 /// read the given ui (menu/toolbar) file
54 void readUIFile(string const & name);
55 /// read the given languages file
56 void readLanguagesFile(string const & name);
57 /// read the given encodings file
58 void readEncodingsFile(string const & name);
59 /// parsing of non-gui LyX options. Returns true if gui
60 bool easyParse(int & argc, char * argv[]);
61 /// shows up a parsing error on screen
62 void printError(ErrorItem const &);
64 /// has this user started lyx for the first time?
66 /// the parsed command line batch command if any