]> git.lyx.org Git - lyx.git/blob - src/frontends/lyx_gui.h
* lyx_gui: parse_lyxrc() and getStatus() methods deleted.
[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
16 #include "FuncStatus.h"
17
18 #include <boost/function.hpp>
19
20 #include <string>
21 #include <vector>
22
23 class Dialogs;
24 class LColor_color;
25 class LyXFont;
26 class LyXComm;
27 class FuncRequest;
28 class LyXView;
29 namespace lyx {
30 struct RGBColor;
31 }
32
33 /// GUI interaction
34 namespace lyx_gui {
35
36 /// are we using the GUI at all
37 extern bool use_gui;
38
39 /**
40  * Enter the main event loop (\sa LyX::exec2)
41  */
42 int exec(int & argc, char * argv[]);
43
44 /**
45  * Synchronise all pending events.
46  */
47 void sync_events();
48
49 /**
50  * Given col, fills r, g, b in the range 0-255.
51  * The function returns true if successful.
52  * It returns false on failure and sets r, g, b to 0.
53  */
54 bool getRGBColor(LColor_color col, lyx::RGBColor & rgbcol);
55
56 /** Eg, passing LColor::black returns "000000",
57  *      passing LColor::white returns "ffffff".
58  */
59 std::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  * add a callback for socket read notification
68  * @param fd socket descriptor (file/socket/etc)
69  */
70 void register_socket_callback(int fd, boost::function<void()> func);
71
72 /**
73  * remove a I/O read callback
74  * @param fd socket descriptor (file/socket/etc)
75  */
76 void unregister_socket_callback(int fd);
77
78 } // namespace lyx_gui
79
80 #endif // LYX_GUI_H