]> git.lyx.org Git - lyx.git/blob - src/lyx_main.h
21e7b7d6f692d1076b5a8e5fc47619c97fceeded
[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 /// last files loaded
29 extern boost::scoped_ptr<LastFiles> lastfiles;
30
31
32 /// initial startup
33 class LyX : boost::noncopyable {
34 public:
35         LyX(int & argc, char * argv[]);
36
37         /// in the case of failure
38         static void emergencyCleanup();
39
40 private:
41         /// initial LyX set up
42         void init(bool);
43         /// set up the default key bindings
44         void defaultKeyBindings(kb_keymap * kbmap);
45         /// set up the default dead key bindings if requested
46         void deadKeyBindings(kb_keymap * kbmap);
47         /// check, set up and configure the user dir if necessary
48         void queryUserLyXDir(bool explicit_userdir);
49         /// read lyxrc/preferences
50         void readRcFile(string const & name);
51         /// read the given ui (menu/toolbar) file
52         void readUIFile(string const & name);
53         /// read the given languages file
54         void readLanguagesFile(string const & name);
55         /// read the given encodings file
56         void readEncodingsFile(string const & name);
57         /// parsing of non-gui LyX options. Returns true if gui
58         bool easyParse(int & argc, char * argv[]);
59         /// shows up a parsing error on screen
60         void printError(ErrorItem const &);
61
62         /// has this user started lyx for the first time?
63         bool first_start;
64         /// the parsed command line batch command if any
65         string batch_command;
66 };
67
68 #endif // LYX_MAIN_H