#include "frontends/alert.h"
#include "frontends/Application.h"
-#include "frontends/Gui.h"
#include "frontends/LyXView.h"
#include "support/environment.h"
}
-Buffer const * LyX::updateInset(Inset const * inset) const
-{
- if (quitting || !inset)
- return 0;
- return application().gui().updateInset(inset);
-}
-
-
-void LyX::hideDialogs(std::string const & name, Inset * inset) const
-{
- if (quitting || !use_gui)
- return;
- application().gui().hideDialogs(name, inset);
-}
-
-
int LyX::exec(int & argc, char * argv[])
{
// Here we need to parse the command line. At least
// Let the frontend parse and remove all arguments that it knows
pimpl_->application_.reset(createApplication(argc, argv));
- initGuiFont();
-
// Parse and remove all known arguments in the LyX singleton
// Give an error for all remaining ones.
int exit_status = init(argc, argv);
}
-void LyX::initGuiFont()
-{
- if (lyxrc.roman_font_name.empty())
- lyxrc.roman_font_name = pimpl_->application_->romanFontName();
-
- if (lyxrc.sans_font_name.empty())
- lyxrc.sans_font_name = pimpl_->application_->sansFontName();
-
- if (lyxrc.typewriter_font_name.empty())
- lyxrc.typewriter_font_name
- = pimpl_->application_->typewriterFontName();
-}
-
-
bool LyX::init()
{
#ifdef SIGHUP