#include <config.h>
-
-#include "Dialogs_impl.h"
-
-
-void Dialogs::showAboutlyx()
-{
- pimpl_->aboutlyx.controller().show();
-}
-
-
-void Dialogs::showMergeChanges()
-{
- pimpl_->changes.controller().show();
-}
+#include "Dialogs.h"
+#include "controllers/GUI.h"
+#include "ButtonController.h"
+
+#include "Tooltips.h"
+#include "xformsBC.h"
+
+#include "ControlDocument.h"
+#include "FormDocument.h"
+#include "forms/form_document.h"
+
+#include "ControlForks.h"
+#include "FormForks.h"
+#include "forms/form_forks.h"
+
+#include "ControlMath.h"
+#include "FormMathsPanel.h"
+#include "forms/form_maths_panel.h"
+
+#include "ControlPreamble.h"
+#include "FormPreamble.h"
+#include "forms/form_preamble.h"
+
+#include "ControlPrefs.h"
+#include "FormPreferences.h"
+#include "forms/form_preferences.h"
+
+#include "ControlPrint.h"
+#include "FormPrint.h"
+#include "forms/form_print.h"
+
+#include "ControlSearch.h"
+#include "FormSearch.h"
+#include "forms/form_search.h"
+
+#include "ControlSendto.h"
+#include "FormSendto.h"
+#include "forms/form_sendto.h"
+
+#include "ControlSpellchecker.h"
+#include "FormSpellchecker.h"
+#include "forms/form_spellchecker.h"
+
+#include "ControlTexinfo.h"
+#include "FormTexinfo.h"
+#include "forms/form_texinfo.h"
+
+typedef GUI<ControlDocument, FormDocument, NoRepeatedApplyReadOnlyPolicy, xformsBC>
+DocumentDialog;
+
+typedef GUI<ControlForks, FormForks, OkApplyCancelPolicy, xformsBC>
+ForksDialog;
+
+typedef GUI<ControlMath, FormMathsPanel, OkCancelReadOnlyPolicy, xformsBC>
+MathPanelDialog;
+
+typedef GUI<ControlPreamble, FormPreamble, NoRepeatedApplyReadOnlyPolicy, xformsBC>
+PreambleDialog;
+
+typedef GUI<ControlPrefs, FormPreferences, OkApplyCancelPolicy, xformsBC>
+PreferencesDialog;
+
+typedef GUI<ControlPrint, FormPrint, OkApplyCancelPolicy, xformsBC>
+PrintDialog;
+
+typedef GUI<ControlSearch, FormSearch, NoRepeatedApplyReadOnlyPolicy, xformsBC>
+SearchDialog;
+
+typedef GUI<ControlSendto, FormSendto, OkApplyCancelPolicy, xformsBC>
+SendtoDialog;
+
+typedef GUI<ControlSpellchecker, FormSpellchecker, NoRepeatedApplyReadOnlyPolicy, xformsBC>
+SpellcheckerDialog;
+
+typedef GUI<ControlTexinfo, FormTexinfo, OkCancelPolicy, xformsBC>
+TexinfoDialog;
+
+struct Dialogs::Impl {
+ Impl(LyXView & lv, Dialogs & d);
+
+ DocumentDialog document;
+ ForksDialog forks;
+ MathPanelDialog mathpanel;
+ PreambleDialog preamble;
+ PreferencesDialog preferences;
+ PrintDialog print;
+ SearchDialog search;
+ SendtoDialog sendto;
+ SpellcheckerDialog spellchecker;
+ TexinfoDialog texinfo;
+};
+
+
+Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
+ : document(lv, d),
+ forks(lv, d),
+ mathpanel(lv, d),
+ preamble(lv, d),
+ preferences(lv, d),
+ print(lv, d),
+ search(lv, d),
+ sendto(lv, d),
+ spellchecker(lv, d),
+ texinfo(lv, d)
+{}
-void Dialogs::showCharacter()
+void Dialogs::init_pimpl()
{
- pimpl_->character.controller().show();
+ pimpl_ = new Impl(lyxview_, *this);
}
-void Dialogs::setUserFreeFont()
+Dialogs::~Dialogs()
{
- pimpl_->character.controller().apply();
+ delete pimpl_;
}
}
-void Dialogs::showFile(string const & f)
-{
- pimpl_->file.controller().showFile(f);
-}
-
-
-void Dialogs::showFloat(InsetFloat * ifl)
-{
- pimpl_->floats.controller().showInset(ifl);
-}
-
-
void Dialogs::showForks()
{
pimpl_->forks.controller().show();
}
-void Dialogs::showGraphics(InsetGraphics * ig)
-{
- pimpl_->graphics.controller().showInset(ig);
-}
-
-
-void Dialogs::showInclude(InsetInclude * ii)
-{
- pimpl_->include.controller().showInset(ii);
-}
-
-
-void Dialogs::showLogFile()
-{
- pimpl_->logfile.controller().show();
-}
-
-
void Dialogs::showMathPanel()
{
pimpl_->mathpanel.controller().show();
}
-void Dialogs::showMinipage(InsetMinipage * im)
-{
- pimpl_->minipage.controller().showInset(im);
-}
-
-
-void Dialogs::updateMinipage(InsetMinipage * im)
-{
- pimpl_->minipage.controller().showInset(im);
-}
-
-
-void Dialogs::showParagraph()
-{
- pimpl_->paragraph.controller().show();
-}
-
-
-void Dialogs::updateParagraph()
-{
- pimpl_->paragraph.controller().changedParagraph();
-}
-
-
void Dialogs::showPreamble()
{
pimpl_->preamble.controller().show();
}
-void Dialogs::showTabular(InsetTabular * it)
-{
- pimpl_->tabular.controller().showInset(it);
-}
-
-
-void Dialogs::updateTabular(InsetTabular * it)
-{
- pimpl_->tabular.controller().updateInset(it);
-}
-
-
-void Dialogs::showTabularCreate()
-{
- pimpl_->tabularcreate.controller().show();
-}
-
-
void Dialogs::showTexinfo()
{
pimpl_->texinfo.controller().show();
}
-
-
-#ifdef HAVE_LIBAIKSAURUS
-
-void Dialogs::showThesaurus(string const & s)
-{
- pimpl_->thesaurus.controller().showEntry(s);
-}
-
-#else
-
-void Dialogs::showThesaurus(string const &)
-{}
-
-#endif
-
-
-void Dialogs::showVCLogFile()
-{
- pimpl_->vclogfile.controller().show();
-}
-
-
-void Dialogs::showWrap(InsetWrap * iw)
-{
- pimpl_->wrap.controller().showInset(iw);
-}