]> git.lyx.org Git - lyx.git/blob - src/lyx_main.h
remove some very old dead code
[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
15 #include <boost/scoped_ptr.hpp>
16 #include <boost/utility.hpp>
17
18 #include <csignal>
19
20 class LyXRC;
21 class LastFiles;
22 class Buffer;
23 class kb_keymap;
24
25
26 /// e.g. $HOME/.lyx/
27 extern string user_lyxdir;
28 /// e.g. /usr/share/lyx/
29 extern string system_lyxdir;
30 /// e.g. /tmp
31 extern string system_tempdir;
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         /// return true if the given prefs file was successfully read
54         bool 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
64         /// has this user started lyx for the first time?
65         bool first_start;
66         /// the parsed command line batch command if any
67         string batch_command;
68 };
69
70 #endif // LYX_MAIN_H