2 * \file frontend/Application.h
\r
3 * This file is part of LyX, the document processor.
\r
4 * Licence details can be found in the file COPYING.
\r
6 * \author Abdelrazak Younes
\r
8 * Full author contact details are available in file CREDITS.
\r
11 #ifndef LYX_APPLICATION_H
\r
12 #define LYX_APPLICATION_H
\r
14 #include "lyxfunc.h"
\r
15 #include "lyxserver.h"
\r
16 #include "lyxsocket.h"
\r
18 #include <boost/scoped_ptr.hpp>
\r
26 namespace frontend {
\r
28 //class GuiWorkArea;
\r
32 /// The main application class
\r
34 There should be only one instance of this class. No Qt object
\r
35 initialisation should be done before the instanciation of this class.
\r
37 \todo The work areas handling could be moved to a base virtual class
\r
38 comon to all frontends.
\r
43 Application(int & argc, char ** argv);
\r
45 int start(std::string const & batch);
\r
47 virtual Gui & gui() = 0;
\r
49 virtual int const exec() = 0;
\r
51 virtual void exit(int status) = 0;
\r
54 LyXFunc & lyxFunc();
\r
55 LyXFunc const & lyxFunc() const;
\r
57 LyXServer & server();
\r
58 LyXServer const & server() const;
\r
60 LyXServerSocket & socket();
\r
61 LyXServerSocket const & socket() const;
\r
63 void setBufferView(BufferView * buffer_view);
\r
67 BufferView * buffer_view_;
\r
69 // FIXME: lyxfunc_ should be private. But the actual construction is done in
\r
70 // GuiApplication for now.
\r
72 /// our function handler
\r
73 boost::scoped_ptr<LyXFunc> lyxfunc_;
\r
77 boost::scoped_ptr<LyXServer> lyx_server_;
\r
79 boost::scoped_ptr<LyXServerSocket> lyx_socket_;
\r
83 } // namespace frontend
\r
86 extern lyx::frontend::Application * theApp;
\r
89 #endif // LYX_APPLICATION_H
\r