]> git.lyx.org Git - lyx.git/blob - src/lyx_main.h
cosmetic fix
[lyx.git] / src / lyx_main.h
1 // -*- C++ -*-
2 /**
3  * \file lyx_main.h
4  * Copyright 2002 the LyX Team
5  * Read the file COPYING
6  *
7  * \author unknown
8  */
9
10 #ifndef LYX_MAIN_H
11 #define LYX_MAIN_H
12
13 #include "LString.h"
14 #include "errorlist.h"
15
16 #include <boost/scoped_ptr.hpp>
17 #include <boost/utility.hpp>
18
19 #include <csignal>
20
21
22 class LyXRC;
23 class LastFiles;
24 class Buffer;
25 class kb_keymap;
26
27
28 /// e.g. $HOME/.lyx/
29 extern string user_lyxdir;
30 /// e.g. /usr/share/lyx/
31 extern string system_lyxdir;
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