]> git.lyx.org Git - lyx.git/blob - src/frontends/lyx_gui.h
remove preamble and tooltips menu entries on qt2; small compile fix
[lyx.git] / src / frontends / lyx_gui.h
1 // -*- C++ -*-
2 /**
3  * \file lyx_gui.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef LYX_GUI_H
13 #define LYX_GUI_H
14
15 #include "LColor.h"
16 #include "LString.h"
17 #include "FuncStatus.h"
18
19 #include <vector>
20
21 class Dialogs;
22 class LyXFont;
23 class LyXComm;
24 class FuncRequest;
25
26 /// GUI interaction
27 namespace lyx_gui {
28
29 /// parse command line and do basic initialisation
30 void parse_init(int & argc, char * argv[]);
31
32 /**
33  * set up GUI parameters. At this point lyxrc may
34  * be used.
35  */
36 void parse_lyxrc();
37
38 /**
39  * Start the main event loop, after executing the given
40  * batch commands, and loading the given documents
41  */
42 void start(string const & batch, std::vector<string> const & files);
43
44 /**
45  * quit running LyX
46  */
47 void exit();
48
49
50 /**
51  * return the status flag for a given action. This can be used to tell
52  * that a given lfun is not implemented by a frontend
53  */
54 FuncStatus getStatus(FuncRequest const & ev);
55
56 /** Eg, passing LColor::black returns "000000",
57  *      passing LColor::white returns "ffffff".
58  */
59 string const hexname(LColor::color col);
60
61 /**
62  * update an altered GUI color
63  */
64 void update_color(LColor::color col);
65
66 /**
67  * update the font cache
68  */
69 void update_fonts();
70
71 /**
72  * is the given font available ?
73  */
74 bool font_available(LyXFont const & font);
75
76 /**
77  * add a callback for I/O read notification
78  */
79 void set_read_callback(int fd, LyXComm * comm);
80
81 /**
82  * remove a I/O read callback
83  * @param fd file descriptor
84  */
85 void remove_read_callback(int fd);
86
87 } // namespace lyx_gui
88
89 #endif // LYX_GUI_H