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;
28 struct Application_pimpl;
33 /// The main application class
35 There should be only one instance of this class. No Qt object
36 initialisation should be done before the instanciation of this class.
38 \todo The work areas handling could be moved to a base virtual class
39 comon to all frontends.
45 Application(int & argc, char ** argv);
47 virtual ~Application() {}
49 int start(std::string const & batch);
51 virtual Gui & gui() = 0;
53 virtual int const exec() = 0;
55 virtual void exit(int status) = 0;
58 virtual Clipboard & clipboard() = 0;
60 virtual Selection & selection() = 0;
64 LyXFunc const & lyxFunc() const;
67 LyXServer const & server() const;
69 LyXServerSocket & socket();
70 LyXServerSocket const & socket() const;
72 BufferList & bufferList();
73 BufferList const & bufferList() const;
76 LyXView & createView(unsigned int width, unsigned int height,
77 int posx, int posy, bool maximize);
80 void setBufferView(BufferView * buffer_view);
83 /// This BufferView is the one receiving Clipboard and Selection
85 /// FIXME: \todo use Gui::currentView() in the future
86 BufferView * buffer_view_;
89 /// Application private implementation.
90 Application_pimpl * pimpl_;
94 } // namespace frontend
97 extern lyx::frontend::Application * theApp;
100 #endif // LYX_APPLICATION_H