4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
16 #include "FuncStatus.h"
18 #include <boost/function.hpp>
28 class LyXServerSocket;
37 /// are we using the GUI at all
40 /// return a suitable serif font name (called from non-gui context too !)
41 std::string const roman_font_name();
43 /// return a suitable sans serif font name (called from non-gui context too !)
44 std::string const sans_font_name();
46 /// return a suitable monospaced font name (called from non-gui context too !)
47 std::string const typewriter_font_name();
50 * set up GUI parameters. At this point lyxrc may
56 * Start the main event loop, after executing the given
57 * batch commands, and loading the given documents
59 int start(std::string const & batch, std::vector<std::string> const & files,
60 unsigned int width, unsigned int height, int posx, int posy,
64 * Enter the main event loop (\sa LyX::exec2)
66 int exec(int & argc, char * argv[]);
69 * Synchronise all pending events.
74 * Quit running LyX. This may either quit directly or record the exit status
75 * and only stop the event loop.
80 * return the status flag for a given action. This can be used to tell
81 * that a given lfun is not implemented by a frontend
83 FuncStatus getStatus(FuncRequest const & ev);
86 * Given col, fills r, g, b in the range 0-255.
87 * The function returns true if successful.
88 * It returns false on failure and sets r, g, b to 0.
90 bool getRGBColor(LColor_color col, lyx::RGBColor & rgbcol);
92 /** Eg, passing LColor::black returns "000000",
93 * passing LColor::white returns "ffffff".
95 std::string const hexname(LColor_color col);
98 * update an altered GUI color
100 void update_color(LColor_color col);
103 * update the font cache
108 * is the given font available ?
110 bool font_available(LyXFont const & font);
113 * add a callback for socket read notification
114 * @param fd socket descriptor (file/socket/etc)
116 void register_socket_callback(int fd, boost::function<void()> func);
119 * remove a I/O read callback
120 * @param fd socket descriptor (file/socket/etc)
122 void unregister_socket_callback(int fd);
124 } // namespace lyx_gui