2 * \file gtk/GuiApplication.h
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * \author Abdelrazak Younes
10 * Full author contact details are available in file CREDITS.
13 #ifndef GTK_APPLICATION_H
14 #define GTK_APPLICATION_H
16 #include "GuiClipboard.h"
17 #include "GuiImplementation.h"
18 #include "GuiSelection.h"
19 #include "xftFontLoader.h"
21 #include "frontends/Application.h"
25 ///////////////////////////////////////////////////////////////
34 /// The Gtk main application class
36 There should be only one instance of this class. No Gtk object
37 initialisation should be done before the instanciation of this class.
39 \todo The work areas handling could be moved to a base virtual class
40 comon to all frontends.
42 class GuiApplication : public Gtk::Main, public Application
45 GuiApplication(int & argc, char ** argv);
47 virtual ~GuiApplication() {}
49 /// Method inherited from \c Application class
51 virtual Clipboard& clipboard();
52 virtual Selection& selection();
53 virtual FontLoader & fontLoader() { return font_loader_; }
54 virtual int const exec();
55 virtual Gui & gui() { return gui_; }
56 virtual void exit(int status);
58 virtual std::string const romanFontName();
59 virtual std::string const sansFontName();
60 virtual std::string const typewriterFontName();
61 virtual bool getRgbColor(LColor_color col, lyx::RGBColor & rgbcol);
62 virtual std::string const hexName(LColor_color col);
63 virtual void updateColor(LColor_color col);
64 virtual void registerSocketCallback(
65 int fd, boost::function<void()> func);
66 virtual void unregisterSocketCallback(int fd);
73 GuiImplementation gui_;
75 GuiClipboard clipboard_;
77 GuiSelection selection_;
79 xftFontLoader font_loader_;
82 } // namespace frontend
85 extern lyx::frontend::GuiApplication * guiApp;
88 #endif // GTK_APPLICATION_H