2 * \file frontend/Application.h
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Abdelrazak Younes
8 * Full author contact details are available in file CREDITS.
11 #ifndef LYX_APPLICATION_H
12 #define LYX_APPLICATION_H
14 #include <boost/scoped_ptr.hpp>
22 class LyXServerSocket;
27 struct Application_pimpl;
32 /// The main application class
34 There should be only one instance of this class. No Qt object
35 initialisation should be done before the instanciation of this class.
37 \todo The work areas handling could be moved to a base virtual class
38 comon to all frontends.
44 Application(int & argc, char ** argv);
46 virtual ~Application() {}
48 int start(std::string const & batch);
50 virtual Gui & gui() = 0;
52 virtual int const exec() = 0;
54 virtual void exit(int status) = 0;
57 virtual Clipboard & clipboard() = 0;
59 virtual Selection & selection() = 0;
63 LyXFunc const & lyxFunc() const;
66 LyXServer const & server() const;
68 LyXServerSocket & socket();
69 LyXServerSocket const & socket() const;
71 BufferList & bufferList();
72 BufferList const & bufferList() const;
74 void setBufferView(BufferView * buffer_view);
77 /// This BufferView is the one receiving Clipboard and Selection
79 /// FIXME: \todo use Gui::currentView() in the future
80 BufferView * buffer_view_;
82 /// Application private implementation.
83 /// FIXME: this should be private but LyXFunc construction
84 /// is still done in GuiApplication.
85 Application_pimpl * pimpl_;
89 } // namespace frontend
92 extern lyx::frontend::Application * theApp;
95 #endif // LYX_APPLICATION_H