]> git.lyx.org Git - lyx.git/blob - src/lyx_main.h
remove Buffer * parameter from a bunch of get*Font functions
[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 /// last files loaded
31 extern boost::scoped_ptr<LastFiles> lastfiles;
32
33
34 /// initial startup
35 class LyX : boost::noncopyable {
36 public:
37         LyX(int & argc, char * argv[]);
38
39         /// in the case of failure
40         static void emergencyCleanup();
41
42 private:
43         /// initial LyX set up
44         void init(bool);
45         /// set up the default key bindings
46         void defaultKeyBindings(kb_keymap * kbmap);
47         /// set up the default dead key bindings if requested
48         void deadKeyBindings(kb_keymap * kbmap);
49         /// check, set up and configure the user dir if necessary
50         void queryUserLyXDir(bool explicit_userdir);
51         /// read lyxrc/preferences
52         void readRcFile(string const & name);
53         /// read the given ui (menu/toolbar) file
54         void readUIFile(string const & name);
55         /// read the given languages file
56         void readLanguagesFile(string const & name);
57         /// read the given encodings file
58         void readEncodingsFile(string const & name);
59         /// parsing of non-gui LyX options. Returns true if gui
60         bool easyParse(int & argc, char * argv[]);
61         /// shows up a parsing error on screen
62         void printError(ErrorItem const &);
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