#include <boost/signal.hpp> // FIXME: Is this needed? (Lgb)
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
+#include "frontends/WorkArea.h"
#include "GuiImplementation.h"
#include "QtView.h"
{}
-int start(string const & batch, vector<string> const & files,
- unsigned int width, unsigned int height, int posx, int posy, bool maximize)
+LyXView* create_view(unsigned int width, unsigned int height, int posx, int posy,
+ bool maximize)
{
// this can't be done before because it needs the Languages object
initEncodings();
} else
view.show();
+ return &view;
+}
+
+
+int start(LyXView * view, string const & batch)
+{
// FIXME: some code below needs moving
- lyxserver = new LyXServer(&view.getLyXFunc(), lyxrc.lyxpipes);
- lyxsocket = new LyXServerSocket(&view.getLyXFunc(),
+ lyxserver = new LyXServer(&view->getLyXFunc(), lyxrc.lyxpipes);
+ lyxsocket = new LyXServerSocket(&view->getLyXFunc(),
os::internal_path(package().temp_dir() + "/lyxsocket"));
- for_each(files.begin(), files.end(),
- bind(&BufferView::loadLyXFile, view.view(), _1, true));
-
// handle the batch commands the user asked for
if (!batch.empty()) {
- view.getLyXFunc().dispatch(lyxaction.lookupFunc(batch));
+ view->getLyXFunc().dispatch(lyxaction.lookupFunc(batch));
}
int const status = qApp->exec();
{
FuncStatus flag;
switch (ev.action) {
- case LFUN_DIALOG_SHOW:
- if (ev.argument == "preamble")
- flag.unknown(true);
- break;
case LFUN_TOOLTIPS_TOGGLE:
flag.unknown(true);
break;