src_frontends_header_files = Split('''
Alert.h
Alert_pimpl.h
+ Application_pimpl.h
Application.h
Clipboard.h
Dialogs.h
#include "buffer.h"
#include "buffer_funcs.h"
+#include "bufferlist.h"
#include "bufferparams.h"
#include "coordcache.h"
#include "CutAndPaste.h"
#include <config.h>
+#include "bufferlist.h"
#include "LaTeX.h"
#include "gettext.h"
#include "lyxrc.h"
#include "author.h"
#include "BranchList.h"
#include "buffer_funcs.h"
+#include "bufferlist.h"
#include "bufferparams.h"
#include "counters.h"
#include "Bullet.h"
#include "buffer_funcs.h"
#include "buffer.h"
+#include "bufferlist.h"
#include "bufferparams.h"
#include "dociterator.h"
#include "counters.h"
#include "lyxrc.h"
#include "debug.h"
#include "gettext.h"
+#include "lyxsocket.h"
#include "frontends/Application.h"
#include "frontends/Alert.h" //to be removed?
#include "Application.h"
-#include "funcrequest.h"
+#include "Application_pimpl.h"
+#include "Gui.h"
+
#include "LyXAction.h"
+#include "lyxfunc.h"
#include "lyxrc.h"
#include "LyXView.h"
#include "support/os.h"
#include "support/package.h"
-#include <boost/scoped_ptr.hpp>
using lyx::support::package;
namespace lyx {
namespace frontend {
-
Application::Application(int &, char **)
{
+ pimpl_ = new Application_pimpl;
}
LyXFunc & Application::lyxFunc()
{
- return *lyxfunc_.get();
+ return *pimpl_->lyxfunc_.get();
}
LyXFunc const & Application::lyxFunc() const
{
- return *lyxfunc_.get();
+ return *pimpl_->lyxfunc_.get();
}
LyXServer & Application::server()
{
- return *lyx_server_.get();
+ return *pimpl_->lyx_server_.get();
}
LyXServer const & Application::server() const
{
- return *lyx_server_.get();
+ return *pimpl_->lyx_server_.get();
}
LyXServerSocket & Application::socket()
{
- return *lyx_socket_.get();
+ return *pimpl_->lyx_socket_.get();
}
LyXServerSocket const & Application::socket() const
{
- return *lyx_socket_.get();
+ return *pimpl_->lyx_socket_.get();
}
BufferList & Application::bufferList()
{
- return buffer_list_;
+ return pimpl_->buffer_list_;
}
BufferList const & Application::bufferList() const
{
- return buffer_list_;
+ return pimpl_->buffer_list_;
}
int Application::start(std::string const & batch)
{
- lyx_server_.reset(new LyXServer(lyxfunc_.get(), lyxrc.lyxpipes));
- lyx_socket_.reset(new LyXServerSocket(lyxfunc_.get(),
+ pimpl_->lyx_server_.reset(new LyXServer(pimpl_->lyxfunc_.get(), lyxrc.lyxpipes));
+ pimpl_->lyx_socket_.reset(new LyXServerSocket(pimpl_->lyxfunc_.get(),
lyx::support::os::internal_path(package().temp_dir() + "/lyxsocket")));
// handle the batch commands the user asked for
if (!batch.empty()) {
- lyxfunc_->dispatch(lyxaction.lookupFunc(batch));
+ pimpl_->lyxfunc_->dispatch(lyxaction.lookupFunc(batch));
}
return exec();
#ifndef LYX_APPLICATION_H
#define LYX_APPLICATION_H
-#include "bufferlist.h"
-#include "lyxfunc.h"
-#include "lyxserver.h"
-#include "lyxsocket.h"
-
#include <boost/scoped_ptr.hpp>
#include <string>
+class BufferList;
class BufferView;
-class LyXView;
-
+class LyXFunc;
+class LyXServer;
+class LyXServerSocket;
+
namespace lyx {
namespace frontend {
+struct Application_pimpl;
class Clipboard;
class Gui;
class Selection;
-
/// The main application class
/**
There should be only one instance of this class. No Qt object
void setBufferView(BufferView * buffer_view);
protected:
- ///
+ /// This BufferView is the one receiving Clipboard and Selection
+ /// Events
+ /// FIXME: \todo use Gui::currentView() in the future
BufferView * buffer_view_;
- // FIXME: lyxfunc_ should be private. But the actual construction is done in
- // GuiApplication for now.
-
- /// our function handler
- boost::scoped_ptr<LyXFunc> lyxfunc_;
-
-private:
- ///
- boost::scoped_ptr<LyXServer> lyx_server_;
- ///
- boost::scoped_ptr<LyXServerSocket> lyx_socket_;
- ///
- BufferList buffer_list_;
+ /// Application private implementation.
+ /// FIXME: this should be private but LyXFunc construction
+ /// is still done in GuiApplication.
+ Application_pimpl * pimpl_;
}; // Application
--- /dev/null
+/**
+ * \file frontend/Application_pimpl.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Abdelrazak Younes
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#ifndef LYX_APPLICATION_PIMPL_H
+#define LYX_APPLICATION_PIMPL_H
+
+#include "bufferlist.h"
+#include "funcrequest.h"
+#include "lyxserver.h"
+#include "lyxsocket.h"
+
+#include <boost/scoped_ptr.hpp>
+
+namespace lyx {
+namespace frontend {
+
+/// The main application class private implementation.
+struct Application_pimpl
+{
+ ///
+ BufferList buffer_list_;
+ /// our function handler
+ boost::scoped_ptr<LyXFunc> lyxfunc_;
+ ///
+ boost::scoped_ptr<LyXServer> lyx_server_;
+ ///
+ boost::scoped_ptr<LyXServerSocket> lyx_socket_;
+};
+
+} // namespace frontend
+} // namespace lyx
+
+#endif // LYX_APPLICATION_PIMPL_H
: work_area_(0),
toolbars_(new Toolbars(*this)),
autosave_timeout_(new Timeout(5000)),
- lyxfunc_(new LyXFunc(this)),
dialogs_(new Dialogs(*this)),
controlcommand_(new ControlCommandBuffer(*this))
{
#include "frontends/Application.h"
#include "frontends/Toolbars.h"
+#include "lyxfunc.h"
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/signal.hpp>
Alert.C \
Alert.h \
Alert_pimpl.h \
+ Application_pimpl.h \
Application.C \
Application.h \
Dialogs.C \
#include "helper_funcs.h"
#include "Kernel.h"
+#include "bufferlist.h"
#include "gettext.h"
#include "funcrequest.h"
#include "paper.h"
#include "ControlRef.h"
+
#include "buffer.h"
+#include "bufferlist.h"
#include "funcrequest.h"
#include "frontends/Application.h"
#include "BufferView.h"
+// FIXME: this is needed for now because LyXFunc is still constructed
+// there.
+#include "frontends/Application_pimpl.h"
+
#include "graphics/LoaderQueue.h"
#include "support/lstrings.h"
int view_id = gui().newView(width, height);
GView & view = static_cast<GView &>(gui().view(view_id));
- lyxfunc_.reset(new LyXFunc(&view));
+ pimpl_->lyxfunc_.reset(new LyXFunc(&view));
LyX::ref().addLyXView(&view);
class LColor_color;
class LyXFont;
class LyXComm;
-class LyXDataSocket;
-class LyXServerSocket;
class FuncRequest;
class LyXView;
namespace lyx {
#include "BufferView.h"
+// FIXME: this is needed for now because LyXFunc is still constructed
+// there.
+#include "frontends/Application_pimpl.h"
+
#include "graphics/LoaderQueue.h"
#include "support/lstrings.h"
int view_id = gui().newView(width, height);
QtView & view = static_cast<QtView &> (gui().view(view_id));
- lyxfunc_.reset(new LyXFunc(&view));
+ pimpl_->lyxfunc_.reset(new LyXFunc(&view));
// FIXME: for now we assume that there is only one LyXView with id = 0.
/*int workArea_id_ =*/ gui().newWorkArea(width, height, 0);
#include "BufferView.h"
+// FIXME: this is needed for now because LyXFunc is still constructed
+// there.
+#include "frontends/Application_pimpl.h"
+
#include "graphics/LoaderQueue.h"
#include "support/lstrings.h"
int view_id = gui().newView(width, height);
GuiView & view = static_cast<GuiView &> (gui().view(view_id));
- lyxfunc_.reset(new LyXFunc(&view));
+ pimpl_->lyxfunc_.reset(new LyXFunc(&view));
// FIXME: for now we assume that there is only one LyXView with id = 0.
/*int workArea_id_ =*/ gui().newWorkArea(width, height, 0);
#include "buffer.h"
#include "buffer_funcs.h"
+#include "bufferlist.h"
#include "bufferparams.h"
#include "BufferView.h"
#include "cursor.h"
#include "funcrequest.h"
#include "gettext.h"
#include "LaTeXFeatures.h"
+#include "lyxfunc.h"
#include "outputparams.h"
#include "sgml.h"
#include "lyx_cb.h"
#include "buffer.h"
+#include "bufferlist.h"
#include "BufferView.h"
#include "buffer_funcs.h"
#include "cursor.h"
#include "buffer.h"
#include "buffer_funcs.h"
+#include "bufferlist.h"
#include "converter.h"
#include "debug.h"
#include "encoding.h"
#include "lyxfunc.h"
#include "lyxlex.h"
#include "lyxrc.h"
+#include "lyxserver.h"
#include "lyxtextclasslist.h"
#include "MenuBackend.h"
#include "mover.h"
#include "BranchList.h"
#include "buffer.h"
#include "buffer_funcs.h"
+#include "bufferlist.h"
#include "bufferparams.h"
#include "BufferView.h"
#include "cursor.h"
#include "lyxlex.h"
#include "lyxrc.h"
#include "lyxrow.h"
+#include "lyxserver.h"
#include "lyxtextclasslist.h"
#include "lyxvc.h"
#include "paragraph.h"
#include "frontends/Selection.h"
#include "frontends/nullpainter.h"
+//#include "bufferlist.h"
+#include "funcrequest.h"
+#include "lyxserver.h"
+#include "lyxsocket.h"
+
#include <sstream>
using lyx::cap::copySelection;
#include "buffer.h"
#include "buffer_funcs.h"
+#include "bufferlist.h"
#include "bufferparams.h"
#include "BufferView.h"
#include "Bullet.h"
#include "gettext.h"
#include "language.h"
#include "LColor.h"
+#include "lyxfunc.h"
#include "lyxrc.h"
#include "lyxrow.h"
#include "lyxrow_funcs.h"
#include "paragraph_funcs.h"
#include "ParagraphParameters.h"
#include "pariterator.h"
+#include "lyxserver.h"
+#include "lyxsocket.h"
#include "undo.h"
#include "vspace.h"