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>
36 /// are we using the GUI at all
39 /// return a suitable serif font name (called from non-gui context too !)
40 std::string const roman_font_name();
42 /// return a suitable sans serif font name (called from non-gui context too !)
43 std::string const sans_font_name();
45 /// return a suitable monospaced font name (called from non-gui context too !)
46 std::string const typewriter_font_name();
49 * set up GUI parameters. At this point lyxrc may
55 * Create the main window with given geometry settings
57 LyXView * create_view(unsigned int width, unsigned int height, int posx, int posy,
61 * Start the main event loop, after executing the given
64 int start(LyXView* view, std::string const & batch);
67 * Enter the main event loop (\sa LyX::exec2)
69 int exec(int & argc, char * argv[]);
72 * Synchronise all pending events.
77 * Quit running LyX. This may either quit directly or record the exit status
78 * and only stop the event loop.
83 * return the status flag for a given action. This can be used to tell
84 * that a given lfun is not implemented by a frontend
86 FuncStatus getStatus(FuncRequest const & ev);
89 * Given col, fills r, g, b in the range 0-255.
90 * The function returns true if successful.
91 * It returns false on failure and sets r, g, b to 0.
93 bool getRGBColor(LColor_color col, lyx::RGBColor & rgbcol);
95 /** Eg, passing LColor::black returns "000000",
96 * passing LColor::white returns "ffffff".
98 std::string const hexname(LColor_color col);
101 * update an altered GUI color
103 void update_color(LColor_color col);
106 * update the font cache
111 * is the given font available ?
113 bool font_available(LyXFont const & font);
116 * add a callback for socket read notification
117 * @param fd socket descriptor (file/socket/etc)
119 void register_socket_callback(int fd, boost::function<void()> func);
122 * remove a I/O read callback
123 * @param fd socket descriptor (file/socket/etc)
125 void unregister_socket_callback(int fd);
127 } // namespace lyx_gui