#ifndef LYX_H
#define LYX_H
-#include <boost/scoped_ptr.hpp>
-#include <boost/noncopyable.hpp>
-
-#include <string>
+#include "support/strfwd.h"
namespace lyx {
}
/// initial startup
-class LyX : boost::noncopyable {
+class LyX {
public:
LyX();
/// Execute LyX.
int exec(int & argc, char * argv[]);
+ /// Try to exit LyX properly.
+ /// \p exit_code is 0 by default, if a non zero value is passed,
+ /// emergencyCleanup() will be called before exiting.
+ void exit(int exit_code = 0) const;
+
static LyX & ref();
static LyX const & cref();
///
frontend::LyXView * newLyXView();
- /** redraw \c inset in all the BufferViews in which it is currently
- * visible. If successful return a pointer to the owning Buffer.
- */
- Buffer const * updateInset(Inset const *) const;
-
- void hideDialogs(std::string const & name, Inset * inset) const;
-
/// Execute batch commands if available.
void execBatchCommands();
void addFileToLoad(support::FileName const &);
private:
+ /// noncopyable
+ LyX(LyX const &);
+ void operator=(LyX const &);
+
/// Do some cleanup in preparation of an exit.
void prepareExit();
/// Create a View, load files and restore GUI Session.
void restoreGuiSession();
- /// Initialize RC font for the GUI.
- void initGuiFont();
-
/// initial LyX set up
bool init();
/// set up the default dead key bindings if requested
/// shows up a parsing error on screen
void printError(ErrorItem const &);
+ /// Use the Pimpl idiom to hide the internals.
+ // Mostly used for singletons.
+ struct Impl;
+ Impl * pimpl_;
+
/// has this user started lyx for the first time?
bool first_start;
- /// the parsed command line batch command if any
- std::string batch_command;
-
- /// Use the Pimpl idiom to hide the internals.
- struct Singletons;
- boost::scoped_ptr<Singletons> pimpl_;
friend Movers & theMovers();
friend Mover const & getMover(std::string const & fmt);