]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GuiApplication.h
make it compile again
[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         /// Method inherited from \c Application class
48         //@{
49         virtual Clipboard& clipboard();
50         virtual Selection& selection();
51         virtual int const exec();
52         virtual Gui & gui() { return gui_; }
53         virtual void exit(int status);
54         //@}
55
56         ///
57         xftFontLoader & fontLoader() { return font_loader_; }
58
59         ///
60         LyXView & createView(unsigned int width, unsigned int height,
61                 int posx, int posy, bool maximize);
62
63 private:
64         ///
65         GuiImplementation gui_;
66         ///
67         GuiClipboard clipboard_;
68         ///
69         GuiSelection selection_;
70         ///
71         xftFontLoader font_loader_;
72 }; // GuiApplication
73
74 } // namespace frontend
75 } // namespace lyx
76
77 extern lyx::frontend::GuiApplication * guiApp;
78
79
80 #endif // GTK_APPLICATION_H