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