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