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