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