]> git.lyx.org Git - lyx.git/blob - src/lyx_main.h
Point fix, earlier forgotten
[lyx.git] / src / lyx_main.h
1 // -*- C++ -*-
2 /**
3  * \file lyx_main.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  * \author Jean-Marc Lasgouttes
9  * \author John Levon
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #ifndef LYX_MAIN_H
15 #define LYX_MAIN_H
16
17 #include "LString.h"
18 #include "errorlist.h"
19
20 #include <boost/scoped_ptr.hpp>
21 #include <boost/utility.hpp>
22
23 #include <csignal>
24
25
26 class LyXRC;
27 class LastFiles;
28 class Buffer;
29 class kb_keymap;
30
31
32 /// last files loaded
33 extern boost::scoped_ptr<LastFiles> lastfiles;
34
35
36 /// initial startup
37 class LyX : boost::noncopyable {
38 public:
39         LyX(int & argc, char * argv[]);
40
41         /// in the case of failure
42         static void emergencyCleanup();
43
44 private:
45         /// initial LyX set up
46         void init(bool);
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 &);
65
66         /// has this user started lyx for the first time?
67         bool first_start;
68         /// the parsed command line batch command if any
69         string batch_command;
70 };
71
72 #endif // LYX_MAIN_H