#include "support/Systemcall.h"
#include <boost/bind.hpp>
+#include <boost/scoped_ptr.hpp>
#include <algorithm>
#include <iostream>
-/// are we using the GUI at all?
-/**
-* We default to true and this is changed to false when the export feature is used.
-*/
+// Are we using the GUI at all? We default to true and this is changed
+// to false when the export feature is used.
+
bool use_gui = true;
bool quitting; // flag, that we are quitting the program
LyX::~LyX()
{
+ delete pimpl_;
}
: first_start(false)
{
singleton_ = this;
- pimpl_.reset(new Singletons);
+ pimpl_ = new Singletons;
}
return 0;
}
+
int parse_version(string const &, string const &)
{
lyxerr << "LyX " << lyx_version
return 0;
}
+
int parse_sysdir(string const & arg, string const &)
{
if (arg.empty()) {
return 1;
}
+
int parse_userdir(string const & arg, string const &)
{
if (arg.empty()) {
return 1;
}
+
int parse_execute(string const & arg, string const &)
{
if (arg.empty()) {
return 1;
}
+
int parse_export(string const & type, string const &)
{
if (type.empty()) {
return 1;
}
+
int parse_import(string const & type, string const & file)
{
if (type.empty()) {
return 2;
}
+
int parse_geometry(string const & arg1, string const &)
{
geometryArg = arg1;
if (it == cmdmap.end())
continue;
- string const arg((i + 1 < argc) ? to_utf8(from_local8bit(argv[i + 1])) : string());
- string const arg2((i + 2 < argc) ? to_utf8(from_local8bit(argv[i + 2])) : string());
+ string const arg =
+ (i + 1 < argc) ? to_utf8(from_local8bit(argv[i + 1])) : string();
+ string const arg2 =
+ (i + 2 < argc) ? to_utf8(from_local8bit(argv[i + 2])) : string();
int const remove = 1 + it->second(arg, arg2);
#ifndef LYX_H
#define LYX_H
-#include <boost/scoped_ptr.hpp>
-#include <boost/noncopyable.hpp>
-
#include <string>
namespace lyx {
}
/// initial startup
-class LyX : boost::noncopyable {
+class LyX {
public:
LyX();
void addFileToLoad(support::FileName const &);
private:
+ /// noncopyable
+ LyX(LyX const &);
+ void operator=(LyX const &);
+
/// Do some cleanup in preparation of an exit.
void prepareExit();
/// Use the Pimpl idiom to hide the internals.
struct Singletons;
- boost::scoped_ptr<Singletons> pimpl_;
+ Singletons * pimpl_;
friend Movers & theMovers();
friend Mover const & getMover(std::string const & fmt);
#include "debug.h"
#include "LyX.h"
+#include <boost/assert.hpp>
+
namespace lyx {
void MailInset::showDialog(BufferView * bv) const
{
BOOST_ASSERT(bv);
- bv->showInsetDialog(name(), inset2string(bv->buffer()),
- &inset());
+ bv->showInsetDialog(name(), inset2string(bv->buffer()), &inset());
}