]> git.lyx.org Git - lyx.git/blob - src/lyx_main.h
add missing writeNormal() methods to some insets
[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-2001 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 <boost/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 : boost::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         /// in the case of failure
55         static void emergencyCleanup();
56  
57         ///
58         LyXGUI * lyxGUI;  // should be only one of this
59 private:
60         /// does this user start lyx for the first time?
61         bool first_start;
62         ///
63         string batch_command;
64         ///
65         void runtime();
66         ///
67         void init(bool);
68         ///
69         void defaultKeyBindings(kb_keymap * kbmap);
70         ///
71         void deadKeyBindings(kb_keymap * kbmap);
72         ///
73         void queryUserLyXDir(bool explicit_userdir);
74         /** Search for and read the LyXRC file name, return
75             true if successfull.
76         */
77         bool readRcFile(string const & name);
78         /// Read the ui file `name'
79         void readUIFile(string const & name);
80         /// Read the languages file `name'
81         void readLanguagesFile(string const & name);
82         /// Read the encodings file `name'
83         void readEncodingsFile(string const & name);
84         ///
85         bool easyParse(int * argc, char * argv[]);
86 };
87
88 #endif