+++ /dev/null
-/**
- * \file ControlPrefs.cpp
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author John Levon
- *
- * Full author contact details are available in file CREDITS.
- */
-
-#include <config.h>
-
-#include "ControlPrefs.h"
-
-#include "frontend_helpers.h"
-
-#include "BufferList.h"
-#include "gettext.h"
-#include "FuncRequest.h"
-#include "paper.h"
-#include "Color.h"
-
-#include "support/FileFilterList.h"
-
-#include <sstream>
-
-using std::ostringstream;
-using std::pair;
-using std::string;
-using std::vector;
-using lyx::support::FileFilterList;
-
-namespace lyx {
-
-namespace frontend {
-
-
-ControlPrefs::ControlPrefs(Dialog & parent)
- : Controller(parent),
- update_screen_font_(false)
-{}
-
-
-bool ControlPrefs::initialiseParams(std::string const &)
-{
- rc_ = lyxrc;
- formats_ = lyx::formats;
- converters_ = theConverters();
- converters_.update(formats_);
- movers_ = theMovers();
- colors_.clear();
- update_screen_font_ = false;
-
- return true;
-}
-
-
-void ControlPrefs::dispatchParams()
-{
- ostringstream ss;
- rc_.write(ss, true);
- dispatch(FuncRequest(LFUN_LYXRC_APPLY, ss.str()));
- // FIXME: these need lfuns
- // FIXME UNICODE
- theBufferList().setCurrentAuthor(from_utf8(rc_.user_name), from_utf8(rc_.user_email));
-
- lyx::formats = formats_;
-
- theConverters() = converters_;
- theConverters().update(lyx::formats);
- theConverters().buildGraph();
-
- theMovers() = movers_;
-
- vector<string>::const_iterator it = colors_.begin();
- vector<string>::const_iterator const end = colors_.end();
- for (; it != end; ++it)
- dispatch(FuncRequest(LFUN_SET_COLOR, *it));
- colors_.clear();
-
- if (update_screen_font_) {
- dispatch(FuncRequest(LFUN_SCREEN_FONT_UPDATE));
- update_screen_font_ = false;
- }
-
- // The Save button has been pressed
- if (dialog().isClosing()) {
- dispatch(FuncRequest(LFUN_PREFERENCES_SAVE));
- }
-}
-
-
-void ControlPrefs::setColor(Color_color col, string const & hex)
-{
- colors_.push_back(lcolor.getLyXName(col) + ' ' + hex);
-}
-
-
-void ControlPrefs::updateScreenFonts()
-{
- update_screen_font_ = true;
-}
-
-
-docstring const ControlPrefs::browsebind(docstring const & file) const
-{
- return browseLibFile(from_ascii("bind"), file, from_ascii("bind"),
- _("Choose bind file"),
- FileFilterList(_("LyX bind files (*.bind)")));
-}
-
-
-docstring const ControlPrefs::browseUI(docstring const & file) const
-{
- return browseLibFile(from_ascii("ui"), file, from_ascii("ui"),
- _("Choose UI file"),
- FileFilterList(_("LyX UI files (*.ui)")));
-}
-
-
-docstring const ControlPrefs::browsekbmap(docstring const & file) const
-{
- return browseLibFile(from_ascii("kbd"), file, from_ascii("kmap"),
- _("Choose keyboard map"),
- FileFilterList(_("LyX keyboard maps (*.kmap)")));
-}
-
-
-docstring const ControlPrefs::browsedict(docstring const & file) const
-{
- if (lyxrc.use_spell_lib)
- return browseFile(file,
- _("Choose personal dictionary"),
- FileFilterList(_("*.pws")));
- else
- return browseFile(file,
- _("Choose personal dictionary"),
- FileFilterList(_("*.ispell")));
-}
-
-
-docstring const ControlPrefs::browse(docstring const & file,
- docstring const & title) const
-{
- return browseFile(file, title, FileFilterList(), true);
-}
-
-
-docstring const ControlPrefs::browsedir(docstring const & path,
- docstring const & title) const
-{
- return browseDir(path, title);
-}
-
-
-// We support less paper sizes than the document dialog
-// Therefore this adjustment is needed.
-PAPER_SIZE ControlPrefs::toPaperSize(int i) const
-{
- switch (i) {
- case 0:
- return PAPER_DEFAULT;
- case 1:
- return PAPER_USLETTER;
- case 2:
- return PAPER_USLEGAL;
- case 3:
- return PAPER_USEXECUTIVE;
- case 4:
- return PAPER_A3;
- case 5:
- return PAPER_A4;
- case 6:
- return PAPER_A5;
- case 7:
- return PAPER_B5;
- default:
- // should not happen
- return PAPER_DEFAULT;
- }
-}
-
-
-int ControlPrefs::fromPaperSize(PAPER_SIZE papersize) const
-{
- switch (papersize) {
- case PAPER_DEFAULT:
- return 0;
- case PAPER_USLETTER:
- return 1;
- case PAPER_USLEGAL:
- return 2;
- case PAPER_USEXECUTIVE:
- return 3;
- case PAPER_A3:
- return 4;
- case PAPER_A4:
- return 5;
- case PAPER_A5:
- return 6;
- case PAPER_B5:
- return 7;
- default:
- // should not happen
- return 0;
- }
-}
-
-} // namespace frontend
-} // namespace lyx
#include <config.h>
#include "GuiPrefs.h"
-#include "ControlPrefs.h"
#include "qt_helpers.h"
#include "GuiApplication.h"
+#include "BufferList.h"
+#include "Color.h"
#include "ConverterCache.h"
-#include "Session.h"
#include "debug.h"
-#include "Color.h"
#include "Font.h"
-#include "PanelStack.h"
-#include "GuiFontExample.h"
+#include "FuncRequest.h"
#include "gettext.h"
+#include "GuiFontExample.h"
+#include "PanelStack.h"
+#include "paper.h"
+#include "Session.h"
#include "support/lstrings.h"
#include "support/os.h"
+#include "support/FileFilterList.h"
#include "frontend_helpers.h"
using namespace Ui;
-using lyx::support::compare_ascii_no_case;
-using lyx::support::os::external_path;
-using lyx::support::os::external_path_list;
-using lyx::support::os::internal_path;
-using lyx::support::os::internal_path_list;
-
using std::endl;
-using std::string;
+using std::ostringstream;
using std::pair;
+using std::string;
using std::vector;
-
namespace lyx {
namespace frontend {
+using support::compare_ascii_no_case;
+using support::os::external_path;
+using support::os::external_path_list;
+using support::os::internal_path;
+using support::os::internal_path_list;
+using support::FileFilterList;
+
+
/////////////////////////////////////////////////////////////////////
//
// Helpers
//
/////////////////////////////////////////////////////////////////////
-PrefKeyboard::PrefKeyboard(GuiPrefsDialog * form, QWidget * parent)
+PrefKeyboard::PrefKeyboard(GuiPreferences * form, QWidget * parent)
: PrefModule(_("Keyboard"), form, parent)
{
setupUi(this);
QString PrefKeyboard::testKeymap(QString keymap)
{
- return toqstr(form_->controller().browsekbmap(from_utf8(internal_path(fromqstr(keymap)))));
+ return toqstr(form_->browsekbmap(from_utf8(internal_path(fromqstr(keymap)))));
}
//
/////////////////////////////////////////////////////////////////////
-PrefLatex::PrefLatex(GuiPrefsDialog * form, QWidget * parent)
+PrefLatex::PrefLatex(GuiPreferences * form, QWidget * parent)
: PrefModule(_("LaTeX"), form, parent)
{
setupUi(this);
rc.auto_reset_options = latexAutoresetCB->isChecked();
rc.view_dvi_paper_option = fromqstr(latexDviPaperED->text());
rc.default_papersize =
- form_->controller().toPaperSize(latexPaperSizeCO->currentIndex());
+ form_->toPaperSize(latexPaperSizeCO->currentIndex());
#if defined(__CYGWIN__) || defined(_WIN32)
rc.windows_style_tex_paths = pathCB->isChecked();
#endif
latexAutoresetCB->setChecked(rc.auto_reset_options);
latexDviPaperED->setText(toqstr(rc.view_dvi_paper_option));
latexPaperSizeCO->setCurrentIndex(
- form_->controller().fromPaperSize(rc.default_papersize));
+ form_->fromPaperSize(rc.default_papersize));
#if defined(__CYGWIN__) || defined(_WIN32)
pathCB->setChecked(rc.windows_style_tex_paths);
#endif
//
/////////////////////////////////////////////////////////////////////
-PrefScreenFonts::PrefScreenFonts(GuiPrefsDialog * form, QWidget * parent)
+PrefScreenFonts::PrefScreenFonts(GuiPreferences * form, QWidget * parent)
: PrefModule(_("Screen fonts"), form, parent)
{
setupUi(this);
|| rc.sans_font_name != oldrc.sans_font_name
|| rc.typewriter_font_name != oldrc.typewriter_font_name
|| rc.zoom != oldrc.zoom || rc.dpi != oldrc.dpi) {
- form_->controller().updateScreenFonts();
+ form_->updateScreenFonts();
}
}
} // namespace anon
-PrefColors::PrefColors(GuiPrefsDialog * form, QWidget * parent)
+PrefColors::PrefColors(GuiPreferences * form, QWidget * parent)
: PrefModule( _("Colors"), form, parent)
{
setupUi(this);
{
for (unsigned int i = 0; i < lcolors_.size(); ++i)
if (curcolors_[i] != newcolors_[i])
- form_->controller().setColor(lcolors_[i], fromqstr(newcolors_[i]));
+ form_->setColor(lcolors_[i], fromqstr(newcolors_[i]));
}
//
/////////////////////////////////////////////////////////////////////
-PrefPaths::PrefPaths(GuiPrefsDialog * form, QWidget * parent)
+PrefPaths::PrefPaths(GuiPreferences * form, QWidget * parent)
: PrefModule(_("Paths"), form, parent)
{
setupUi(this);
void PrefPaths::select_templatedir()
{
- docstring file(form_->controller().browsedir(
+ docstring file(form_->browsedir(
from_utf8(internal_path(fromqstr(templateDirED->text()))),
_("Select a document templates directory")));
if (!file.empty())
void PrefPaths::select_tempdir()
{
- docstring file(form_->controller().browsedir(
+ docstring file(form_->browsedir(
from_utf8(internal_path(fromqstr(tempDirED->text()))),
_("Select a temporary directory")));
if (!file.empty())
void PrefPaths::select_backupdir()
{
- docstring file(form_->controller().browsedir(
+ docstring file(form_->browsedir(
from_utf8(internal_path(fromqstr(backupDirED->text()))),
_("Select a backups directory")));
if (!file.empty())
void PrefPaths::select_workingdir()
{
- docstring file(form_->controller().browsedir(
+ docstring file(form_->browsedir(
from_utf8(internal_path(fromqstr(workingDirED->text()))),
_("Select a document directory")));
if (!file.empty())
void PrefPaths::select_lyxpipe()
{
- docstring file(form_->controller().browse(
+ docstring file(form_->browse(
from_utf8(internal_path(fromqstr(lyxserverDirED->text()))),
_("Give a filename for the LyX server pipe")));
if (!file.empty())
//
/////////////////////////////////////////////////////////////////////
-PrefSpellchecker::PrefSpellchecker(GuiPrefsDialog * form, QWidget * parent)
+PrefSpellchecker::PrefSpellchecker(GuiPreferences * form, QWidget * parent)
: PrefModule(_("Spellchecker"), form, parent)
{
setupUi(this);
void PrefSpellchecker::select_dict()
{
- docstring file(form_->controller().browsedict(
+ docstring file(form_->browsedict(
from_utf8(internal_path(fromqstr(persDictionaryED->text())))));
if (!file.empty())
persDictionaryED->setText(toqstr(file));
/////////////////////////////////////////////////////////////////////
-PrefConverters::PrefConverters(GuiPrefsDialog * form, QWidget * parent)
+PrefConverters::PrefConverters(GuiPreferences * form, QWidget * parent)
: PrefModule(_("Converters"), form, parent)
{
setupUi(this);
}
-PrefFileformats::PrefFileformats(GuiPrefsDialog * form, QWidget * parent)
+PrefFileformats::PrefFileformats(GuiPreferences * form, QWidget * parent)
: PrefModule(_("File formats"), form, parent)
{
setupUi(this);
//
/////////////////////////////////////////////////////////////////////
-PrefUserInterface::PrefUserInterface(GuiPrefsDialog * form, QWidget * parent)
+PrefUserInterface::PrefUserInterface(GuiPreferences * form, QWidget * parent)
: PrefModule(_("User interface"), form, parent)
{
setupUi(this);
{
docstring const name =
from_utf8(internal_path(fromqstr(uiFileED->text())));
- docstring file = form_->controller().browseUI(name);
+ docstring file = form_->browseUI(name);
if (!file.empty())
uiFileED->setText(toqstr(file));
}
{
docstring const name =
from_utf8(internal_path(fromqstr(bindFileED->text())));
- docstring file = form_->controller().browsebind(name);
+ docstring file = form_->browsebind(name);
if (!file.empty())
bindFileED->setText(toqstr(file));
}
/////////////////////////////////////////////////////////////////////
//
-// GuiPrefsDialog
+// GuiPreferences
//
/////////////////////////////////////////////////////////////////////
-GuiPrefsDialog::GuiPrefsDialog(LyXView & lv)
- : GuiDialog(lv, "prefs")
+GuiPreferences::GuiPreferences(LyXView & lv)
+ : GuiDialog(lv, "prefs"), Controller(this), update_screen_font_(false)
{
setupUi(this);
setViewTitle(_("Preferences"));
- setController(new ControlPrefs(*this));
+ setController(this, false);
QDialog::setModal(false);
}
-ControlPrefs & GuiPrefsDialog::controller()
-{
- return static_cast<ControlPrefs &>(GuiDialog::controller());
-}
-
-
-void GuiPrefsDialog::add(PrefModule * module)
+void GuiPreferences::add(PrefModule * module)
{
BOOST_ASSERT(module);
prefsPS->addPanel(module, module->title());
}
-void GuiPrefsDialog::closeEvent(QCloseEvent * e)
+void GuiPreferences::closeEvent(QCloseEvent * e)
{
slotClose();
e->accept();
}
-void GuiPrefsDialog::change_adaptor()
+void GuiPreferences::change_adaptor()
{
changed();
}
-void GuiPrefsDialog::apply(LyXRC & rc) const
+void GuiPreferences::apply(LyXRC & rc) const
{
size_t end = modules_.size();
for (size_t i = 0; i != end; ++i)
}
-void GuiPrefsDialog::updateRc(LyXRC const & rc)
+void GuiPreferences::updateRc(LyXRC const & rc)
{
size_t const end = modules_.size();
for (size_t i = 0; i != end; ++i)
}
-Converters & GuiPrefsDialog::converters()
+void GuiPreferences::applyView()
+{
+ apply(rc());
+}
+
+
+void GuiPreferences::updateContents()
+{
+ updateRc(rc());
+}
+
+
+bool GuiPreferences::initialiseParams(std::string const &)
+{
+ rc_ = lyxrc;
+ formats_ = lyx::formats;
+ converters_ = theConverters();
+ converters_.update(formats_);
+ movers_ = theMovers();
+ colors_.clear();
+ update_screen_font_ = false;
+
+ return true;
+}
+
+
+void GuiPreferences::dispatchParams()
+{
+ ostringstream ss;
+ rc_.write(ss, true);
+ dispatch(FuncRequest(LFUN_LYXRC_APPLY, ss.str()));
+ // FIXME: these need lfuns
+ // FIXME UNICODE
+ theBufferList().setCurrentAuthor(from_utf8(rc_.user_name), from_utf8(rc_.user_email));
+
+ lyx::formats = formats_;
+
+ theConverters() = converters_;
+ theConverters().update(lyx::formats);
+ theConverters().buildGraph();
+
+ theMovers() = movers_;
+
+ vector<string>::const_iterator it = colors_.begin();
+ vector<string>::const_iterator const end = colors_.end();
+ for (; it != end; ++it)
+ dispatch(FuncRequest(LFUN_SET_COLOR, *it));
+ colors_.clear();
+
+ if (update_screen_font_) {
+ dispatch(FuncRequest(LFUN_SCREEN_FONT_UPDATE));
+ update_screen_font_ = false;
+ }
+
+ // The Save button has been pressed
+ if (dialog().isClosing()) {
+ dispatch(FuncRequest(LFUN_PREFERENCES_SAVE));
+ }
+}
+
+
+void GuiPreferences::setColor(Color_color col, string const & hex)
+{
+ colors_.push_back(lcolor.getLyXName(col) + ' ' + hex);
+}
+
+
+void GuiPreferences::updateScreenFonts()
+{
+ update_screen_font_ = true;
+}
+
+
+docstring const GuiPreferences::browsebind(docstring const & file) const
+{
+ return browseLibFile(from_ascii("bind"), file, from_ascii("bind"),
+ _("Choose bind file"),
+ FileFilterList(_("LyX bind files (*.bind)")));
+}
+
+
+docstring const GuiPreferences::browseUI(docstring const & file) const
+{
+ return browseLibFile(from_ascii("ui"), file, from_ascii("ui"),
+ _("Choose UI file"),
+ FileFilterList(_("LyX UI files (*.ui)")));
+}
+
+
+docstring const GuiPreferences::browsekbmap(docstring const & file) const
+{
+ return browseLibFile(from_ascii("kbd"), file, from_ascii("kmap"),
+ _("Choose keyboard map"),
+ FileFilterList(_("LyX keyboard maps (*.kmap)")));
+}
+
+
+docstring const GuiPreferences::browsedict(docstring const & file) const
{
- return controller().converters();
+ if (lyxrc.use_spell_lib)
+ return browseFile(file,
+ _("Choose personal dictionary"),
+ FileFilterList(_("*.pws")));
+ else
+ return browseFile(file,
+ _("Choose personal dictionary"),
+ FileFilterList(_("*.ispell")));
}
-Formats & GuiPrefsDialog::formats()
+docstring const GuiPreferences::browse(docstring const & file,
+ docstring const & title) const
{
- return controller().formats();
+ return browseFile(file, title, FileFilterList(), true);
}
-Movers & GuiPrefsDialog::movers()
+docstring const GuiPreferences::browsedir(docstring const & path,
+ docstring const & title) const
{
- return controller().movers();
+ return browseDir(path, title);
}
-void GuiPrefsDialog::applyView()
+// We support less paper sizes than the document dialog
+// Therefore this adjustment is needed.
+PAPER_SIZE GuiPreferences::toPaperSize(int i) const
{
- apply(controller().rc());
+ switch (i) {
+ case 0:
+ return PAPER_DEFAULT;
+ case 1:
+ return PAPER_USLETTER;
+ case 2:
+ return PAPER_USLEGAL;
+ case 3:
+ return PAPER_USEXECUTIVE;
+ case 4:
+ return PAPER_A3;
+ case 5:
+ return PAPER_A4;
+ case 6:
+ return PAPER_A5;
+ case 7:
+ return PAPER_B5;
+ default:
+ // should not happen
+ return PAPER_DEFAULT;
+ }
}
-void GuiPrefsDialog::updateContents()
+
+int GuiPreferences::fromPaperSize(PAPER_SIZE papersize) const
{
- updateRc(controller().rc());
+ switch (papersize) {
+ case PAPER_DEFAULT:
+ return 0;
+ case PAPER_USLETTER:
+ return 1;
+ case PAPER_USLEGAL:
+ return 2;
+ case PAPER_USEXECUTIVE:
+ return 3;
+ case PAPER_A3:
+ return 4;
+ case PAPER_A4:
+ return 5;
+ case PAPER_A5:
+ return 6;
+ case PAPER_B5:
+ return 7;
+ default:
+ // should not happen
+ return 0;
+ }
}
+
+Dialog * createGuiPreferences(LyXView & lv) { return new GuiPreferences(lv); }
+
+
} // namespace frontend
} // namespace lyx
#define GUIPREFS_H
#include "GuiDialog.h"
-#include "ControlPrefs.h"
+
#include "Color.h"
-#include "LyXRC.h"
+#include "Converter.h"
#include "Format.h"
+#include "LyXRC.h"
+#include "Mover.h"
#include "ui_PrefsUi.h"
#include <QDialog>
#include <QValidator>
+#include <string>
#include <vector>
+
namespace lyx {
+class Color_color;
class Converters;
class Formats;
class Movers;
namespace frontend {
-class GuiPrefsDialog;
+class GuiPreferences;
class PrefModule : public QWidget
{
Q_OBJECT
public:
PrefModule(docstring const & t,
- GuiPrefsDialog * form = 0, QWidget * parent = 0)
+ GuiPreferences * form = 0, QWidget * parent = 0)
: QWidget(parent), title_(t), form_(form)
{}
protected:
docstring title_;
- GuiPrefsDialog * form_;
+ GuiPreferences * form_;
Q_SIGNALS:
void changed();
{
Q_OBJECT
public:
- PrefKeyboard(GuiPrefsDialog * form, QWidget * parent = 0);
+ PrefKeyboard(GuiPreferences * form, QWidget * parent = 0);
virtual void apply(LyXRC & rc) const;
virtual void update(LyXRC const & rc);
{
Q_OBJECT
public:
- PrefLatex(GuiPrefsDialog * form, QWidget * parent = 0);
+ PrefLatex(GuiPreferences * form, QWidget * parent = 0);
virtual void apply(LyXRC & rc) const;
virtual void update(LyXRC const & rc);
{
Q_OBJECT
public:
- PrefScreenFonts(GuiPrefsDialog * form, QWidget * parent = 0);
+ PrefScreenFonts(GuiPreferences * form, QWidget * parent = 0);
virtual void apply(LyXRC & rc) const;
virtual void update(LyXRC const & rc);
{
Q_OBJECT
public:
- PrefColors(GuiPrefsDialog * form, QWidget * parent = 0);
+ PrefColors(GuiPreferences * form, QWidget * parent = 0);
void apply(LyXRC & rc) const;
void update(LyXRC const & rc);
{
Q_OBJECT
public:
- PrefPaths(GuiPrefsDialog * form, QWidget * parent = 0);
+ PrefPaths(GuiPreferences * form, QWidget * parent = 0);
void apply(LyXRC & rc) const;
void update(LyXRC const & rc);
{
Q_OBJECT
public:
- PrefSpellchecker(GuiPrefsDialog * form, QWidget * parent = 0);
+ PrefSpellchecker(GuiPreferences * form, QWidget * parent = 0);
void apply(LyXRC & rc) const;
void update(LyXRC const & rc);
{
Q_OBJECT
public:
- PrefConverters(GuiPrefsDialog * form, QWidget * parent = 0);
+ PrefConverters(GuiPreferences * form, QWidget * parent = 0);
void apply(LyXRC & rc) const;
void update(LyXRC const & rc);
{
Q_OBJECT
public:
- PrefFileformats(GuiPrefsDialog * form, QWidget * parent = 0);
+ PrefFileformats(GuiPreferences * form, QWidget * parent = 0);
void apply(LyXRC & rc) const;
void update(LyXRC const & rc);
{
Q_OBJECT
public:
- PrefUserInterface(GuiPrefsDialog * form, QWidget * parent = 0);
+ PrefUserInterface(GuiPreferences * form, QWidget * parent = 0);
void apply(LyXRC & rc) const;
void update(LyXRC const & rc);
void update(LyXRC const & rc);
};
-///
-class GuiPrefsDialog : public GuiDialog, public Ui::PrefsUi
+
+class GuiPreferences : public GuiDialog, public Ui::PrefsUi, public Controller
{
Q_OBJECT
public:
- GuiPrefsDialog(LyXView & lv);
+ GuiPreferences(LyXView & lv);
void apply(LyXRC & rc) const;
void updateRc(LyXRC const & rc);
void closeEvent(QCloseEvent * e);
///
void add(PrefModule * module);
- ///
- Converters & converters();
- ///
- Formats & formats();
- ///
- Movers & movers();
/// parent controller
- ControlPrefs & controller();
+ Controller & controller() { return *this; }
/// Apply changes
void applyView();
/// update (do we need this?)
void updateContents();
std::vector<PrefModule *> modules_;
+
+ ///
+ bool initialiseParams(std::string const &);
+ ///
+ void clearParams() {}
+ ///
+ void dispatchParams();
+ ///
+ bool isBufferDependent() const { return false; }
+
+ /// various file pickers
+ docstring const browsebind(docstring const & file) const;
+ docstring const browseUI(docstring const & file) const;
+ docstring const browsekbmap(docstring const & file) const;
+ docstring const browsedict(docstring const & file) const;
+
+ /// general browse
+ docstring const browse(docstring const & file,
+ docstring const & title) const;
+
+ /// browse directory
+ docstring const browsedir(docstring const & path,
+ docstring const & title) const;
+
+ /// set a color
+ void setColor(Color_color col, std::string const & hex);
+
+ /// update the screen fonts after change
+ void updateScreenFonts();
+
+ /// adjust the prefs paper sizes
+ PAPER_SIZE toPaperSize(int i) const;
+ /// adjust the prefs paper sizes
+ int fromPaperSize(PAPER_SIZE papersize) const;
+
+ LyXRC & rc() { return rc_; }
+ Converters & converters() { return converters_; }
+ Formats & formats() { return formats_; }
+ Movers & movers() { return movers_; }
+
+private:
+ /// temporary lyxrc
+ LyXRC rc_;
+ /// temporary converters
+ Converters converters_;
+ /// temporary formats
+ Formats formats_;
+ /// temporary movers
+ Movers movers_;
+
+ /// A list of colors to be dispatched
+ std::vector<std::string> colors_;
+
+ bool redraw_gui_;
+ bool update_screen_font_;
};