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 /// Method inherited from \c Application class
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);
57 xftFontLoader & fontLoader() { return font_loader_; }
60 LyXView & createView(unsigned int width, unsigned int height,
61 int posx, int posy, bool maximize);
65 GuiImplementation gui_;
67 GuiClipboard clipboard_;
69 GuiSelection selection_;
71 xftFontLoader font_loader_;
74 } // namespace frontend
77 extern lyx::frontend::GuiApplication * guiApp;
80 #endif // GTK_APPLICATION_H