2 * \file qt4/Application.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 LYX_APPLICATION_H
14 #define LYX_APPLICATION_H
16 #include "GuiImplementation.h"
17 #include "FontLoader.h"
19 #include <QApplication>
21 ///////////////////////////////////////////////////////////////
25 #include <Carbon/Carbon.h>
27 ///////////////////////////////////////////////////////////////
36 /// The Qt main application class
38 There should be only one instance of this class. No Qt object
39 initialisation should be done before the instanciation of this class.
41 \todo The work areas handling could be moved to a base virtual class
42 comon to all frontends.
44 class Application : public QApplication
47 Application(int & argc, char ** argv);
50 Gui & gui() { return gui_; }
52 FontLoader & fontLoader() { return font_loader_; }
54 void setBufferView(BufferView * buffer_view);
58 BufferView * buffer_view_;
61 GuiImplementation gui_;
64 FontLoader font_loader_;
68 bool x11EventFilter (XEvent * ev);
73 bool macEventFilter(EventRef event);
75 // static OSStatus handleOpenDocuments(
76 static pascal OSErr handleOpenDocuments(
77 const AppleEvent* inEvent, AppleEvent*, long);
81 } // namespace frontend
84 extern lyx::frontend::Application * theApp;
87 #endif // LYX_APPLICATION_H