2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 The LyX Team.
10 * ====================================================== */
12 /* This is the declaration of the LyX class, there should only
13 * exist _one_ instance of this in the application. */
26 #include <boost/smart_ptr.hpp>
27 #include <boost/utility.hpp>
36 extern string system_lyxdir;
38 extern string user_lyxdir;
40 extern string system_tempdir;
42 extern boost::scoped_ptr<LastFiles> lastfiles;
43 /* we should hopefully be able to move this
44 * inside the LyX class */
48 This is the main LyX object it encapsulates most of the other objects.
50 class LyX : boost::noncopyable {
52 /// the only allowed constructor
53 LyX(int * argc, char * argv[]); // constructor
54 /// Always is useful a destructor
57 /// in the case of failure
58 static void emergencyCleanup();
61 /// Should be a maximum of 1 LyXGUI.
62 boost::scoped_ptr<LyXGUI> lyxGUI;
63 /// does this user start lyx for the first time?
72 void defaultKeyBindings(kb_keymap * kbmap);
74 void deadKeyBindings(kb_keymap * kbmap);
76 void queryUserLyXDir(bool explicit_userdir);
77 /** Search for and read the LyXRC file name, return
80 bool readRcFile(string const & name);
81 /// Read the ui file `name'
82 void readUIFile(string const & name);
83 /// Read the languages file `name'
84 void readLanguagesFile(string const & name);
85 /// Read the encodings file `name'
86 void readEncodingsFile(string const & name);
88 bool easyParse(int * argc, char * argv[]);