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;
30 /// e.g. /usr/share/lyx/
31 extern string system_lyxdir;
33 extern string system_tempdir;
35 extern boost::scoped_ptr<LastFiles> lastfiles;
39 class LyX : boost::noncopyable {
41 LyX(int & argc, char * argv[]);
43 /// in the case of failure
44 static void emergencyCleanup();
47 /// initial LyX set up
49 /// set up the default key bindings
50 void defaultKeyBindings(kb_keymap * kbmap);
51 /// set up the default dead key bindings if requested
52 void deadKeyBindings(kb_keymap * kbmap);
53 /// check, set up and configure the user dir if necessary
54 void queryUserLyXDir(bool explicit_userdir);
55 /// read lyxrc/preferences
56 void readRcFile(string const & name);
57 /// read the given ui (menu/toolbar) file
58 void readUIFile(string const & name);
59 /// read the given languages file
60 void readLanguagesFile(string const & name);
61 /// read the given encodings file
62 void readEncodingsFile(string const & name);
63 /// parsing of non-gui LyX options. Returns true if gui
64 bool easyParse(int & argc, char * argv[]);
65 /// shows up a parsing error on screen
66 void printError(ErrorItem const &);
68 /// has this user started lyx for the first time?
70 /// the parsed command line batch command if any