]> git.lyx.org Git - lyx.git/blob - src/lyx_main.h
redraw fix 1.
[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 #ifdef __GNUG__
14 #pragma interface
15 #endif
16
17 #include "LString.h"
18
19 #include <boost/scoped_ptr.hpp>
20 #include <boost/utility.hpp>
21
22 #include <csignal>
23
24 class LyXRC;
25 class LastFiles;
26 class Buffer;
27 class kb_keymap;
28
29  
30 ///
31 extern string user_lyxdir;
32 ///
33 extern string system_lyxdir;
34 ///
35 extern string system_tempdir;
36 ///
37 extern boost::scoped_ptr<LastFiles> lastfiles;
38  
39
40 class LyX : boost::noncopyable {
41 public:
42         LyX(int & argc, char * argv[]);
43
44         /// in the case of failure
45         static void emergencyCleanup();
46
47 private:
48         /// does this user start lyx for the first time?
49         bool first_start;
50         ///
51         string batch_command;
52         ///
53         void runtime();
54         ///
55         void init(bool);
56         ///
57         void defaultKeyBindings(kb_keymap * kbmap);
58         ///
59         void deadKeyBindings(kb_keymap * kbmap);
60         ///
61         void queryUserLyXDir(bool explicit_userdir);
62         /** Search for and read the LyXRC file name, return
63             true if successfull.
64         */
65         bool readRcFile(string const & name);
66         /// Read the ui file `name'
67         void readUIFile(string const & name);
68         /// Read the languages file `name'
69         void readLanguagesFile(string const & name);
70         /// Read the encodings file `name'
71         void readEncodingsFile(string const & name);
72         ///
73         bool easyParse(int & argc, char * argv[]);
74 };
75
76 #endif