]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GuiApplication.h
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / gtk / GuiApplication.h
1 /**
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.
5  *
6  * \author unknown
7  * \author John Levon
8  * \author Abdelrazak Younes
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GTK_APPLICATION_H
14 #define GTK_APPLICATION_H
15
16 #include "GuiClipboard.h"
17 #include "GuiImplementation.h"
18 #include "GuiSelection.h"
19 #include "xftFontLoader.h"
20
21 #include "frontends/Application.h"
22
23 #include <gtkmm.h>
24
25 ///////////////////////////////////////////////////////////////
26
27 class BufferView;
28
29 namespace lyx {
30 namespace frontend {
31
32 class GuiWorkArea;
33
34 /// The Gtk main application class
35 /**
36 There should be only one instance of this class. No Gtk object
37 initialisation should be done before the instanciation of this class.
38
39 \todo The work areas handling could be moved to a base virtual class
40 comon to all frontends.
41 */
42 class GuiApplication : public Gtk::Main, public Application
43 {
44 public:
45         GuiApplication(int & argc, char ** argv);
46         ///
47         virtual ~GuiApplication() {}
48
49         /// Method inherited from \c Application class
50         //@{
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);
57         virtual std::string const romanFontName();
58         virtual std::string const sansFontName();
59         virtual std::string const typewriterFontName();
60         //@}
61
62         ///
63
64 private:
65         ///
66         GuiImplementation gui_;
67         ///
68         GuiClipboard clipboard_;
69         ///
70         GuiSelection selection_;
71         ///
72         xftFontLoader font_loader_;
73 }; // GuiApplication
74
75 } // namespace frontend
76 } // namespace lyx
77
78 extern lyx::frontend::GuiApplication * guiApp;
79
80
81 #endif // GTK_APPLICATION_H