]> git.lyx.org Git - lyx.git/blob - src/lyx_main.h
several small and larger changes, read the Changelog
[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 #include <csignal>
19
20 #include "LString.h"
21
22 class LyXGUI;
23 class LyXRC;
24 class LastFiles;
25 class Buffer;
26
27
28 extern string system_lyxdir;
29 extern string user_lyxdir;
30 extern string system_tempdir;
31
32 extern LastFiles * lastfiles; /* we should hopefully be able to move this
33                               * inside the LyX class */
34
35 extern LyXRC * lyxrc;
36
37
38 /**
39   This is the main LyX object it encapsulates most of the other objects.
40 */
41 class LyX {
42 public:
43         /**@name Constructors and Deconstructors */
44         //@{
45         /// the only allowed constructor
46         LyX(int * argc, char * argv[]); // constructor
47         // Always is useful a destructor
48         ~LyX();
49         //@}
50
51         /**@name Pointers to... */
52         //@{
53         ///
54         LyXGUI * lyxGUI;  // should be only one of this
55         //@}
56 private:
57         /**@name Constructors and Deconstructors */
58         //@{
59         /// not allowed
60         LyX(const LyX &) {} // not allowed
61         /// not allowed
62         LyX() {} // not allowed
63         //@}
64
65         /**@name Private variables */
66         //@{
67         /// does this user start lyx for the first time?
68         bool first_start;
69         ///
70         string batch_command;
71         ///
72         struct sigaction act_;
73         //@}
74         /**@name Private Members */
75         //@{
76         ///
77         void runtime();
78         ///
79         void init(int * argc, char * argv[]);
80         ///
81         void queryUserLyXDir();
82         ///
83         void ReadRcFile(string const & name);
84         ///
85         bool easyParse(int * argc, char * argv[]);
86         //@}
87 };
88
89 #endif