]> git.lyx.org Git - lyx.git/blob - src/lyx_main.h
GUI-indep toolbar and menus mostly work !
[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
26 class LyXGUI;
27 class LyXRC;
28 class LastFiles;
29 class Buffer;
30 class kb_keymap;
31
32 extern string system_lyxdir;
33 extern string user_lyxdir;
34 extern string system_tempdir;
35
36 extern LastFiles * lastfiles; /* we should hopefully be able to move this
37                               * inside the LyX class */
38
39
40 /**
41   This is the main LyX object it encapsulates most of the other objects.
42 */
43 class LyX {
44 public:
45         /**@name Constructors and Deconstructors */
46         //@{
47         /// the only allowed constructor
48         LyX(int * argc, char * argv[]); // constructor
49         // Always is useful a destructor
50         ~LyX();
51         //@}
52
53         /**@name Pointers to... */
54         //@{
55         ///
56         LyXGUI * lyxGUI;  // should be only one of this
57         //@}
58 private:
59         /**@name Constructors and Deconstructors */
60         //@{
61         /// not allowed
62         LyX(const LyX &) {} // not allowed
63         /// not allowed
64         LyX() {} // not allowed
65         //@}
66
67         /**@name Private variables */
68         //@{
69         /// does this user start lyx for the first time?
70         bool first_start;
71         ///
72         string batch_command;
73         /// 
74         // struct sigaction act_; // seems to be unused
75         //@}
76         /**@name Private Members */
77         //@{
78         ///
79         void runtime();
80         ///
81         void init(int * argc, char * argv[], bool);
82         ///
83         void defaultKeyBindings(kb_keymap * kbmap);
84         ///
85         void deadKeyBindings(kb_keymap * kbmap);
86         ///
87         void queryUserLyXDir(bool explicit_userdir);
88         ///
89         void ReadRcFile(string const & name);
90         /// Read the ui file `name'
91         void ReadUIFile(string const & name);
92         ///
93         bool easyParse(int * argc, char * argv[]);
94         //@}
95 };
96
97 #endif