]> git.lyx.org Git - lyx.git/blob - src/lyx_main.h
Various fixes, removed "default" language, inserted new lyxrc tag
[lyx.git] / src / lyx_main.h
1 // -*- C++ -*-
2 /* This file is part of
3 * ====================================================== 
4
5 *           LyX, The Document Processor
6 *        
7 *           Copyright 1995 Matthias Ettrich
8 *           Copyright 1995-2000 The LyX Team.
9 *
10 * ====================================================== */
11
12 /* This is the declaration of the LyX class, there should only
13  * exist _one_ instance of this in the application. */
14
15 #ifndef LYX_MAIN_H
16 #define LYX_MAIN_H
17
18 #ifdef __GNUG__
19 #pragma interface
20 #endif
21
22 #include <csignal>
23
24 #include "LString.h"
25 #include "support/utility.hpp"
26
27 class LyXGUI;
28 class LyXRC;
29 class LastFiles;
30 class Buffer;
31 class kb_keymap;
32
33 ///
34 extern string system_lyxdir;
35 ///
36 extern string user_lyxdir;
37 ///
38 extern string system_tempdir;
39 ///
40 extern LastFiles * lastfiles; /* we should hopefully be able to move this
41                               * inside the LyX class */
42
43
44 /**
45   This is the main LyX object it encapsulates most of the other objects.
46 */
47 class LyX : public noncopyable {
48 public:
49         /// the only allowed constructor
50         LyX(int * argc, char * argv[]); // constructor
51         /// Always is useful a destructor
52         ~LyX();
53
54         ///
55         LyXGUI * lyxGUI;  // should be only one of this
56 private:
57         /// does this user start lyx for the first time?
58         bool first_start;
59         ///
60         string batch_command;
61         ///
62         void runtime();
63         ///
64         void init(int * argc, char * argv[], bool);
65         ///
66         void defaultKeyBindings(kb_keymap * kbmap);
67         ///
68         void deadKeyBindings(kb_keymap * kbmap);
69         ///
70         void queryUserLyXDir(bool explicit_userdir);
71         /** Search for and read the LyXRC file name, return
72             true if successfull.
73         */
74         bool ReadRcFile(string const & name);
75         /// Read the ui file `name'
76         void ReadUIFile(string const & name);
77         ///
78         bool easyParse(int * argc, char * argv[]);
79 };
80
81 #endif