]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/Dialogs2.C
remove defaults stuff, let Qt handle no toolbar
[lyx.git] / src / frontends / xforms / Dialogs2.C
index 3914284c3f6c1f7c39d546bda73237b339abc5fb..0c95fde9811dcf6f1b955914d7438408e52e51ed 100644 (file)
 
 #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_;
 }
 
 
@@ -45,42 +137,18 @@ void Dialogs::showDocument()
 }
 
 
-void Dialogs::showFile(string const & f)
-{
-       pimpl_->file.controller().showFile(f);
-}
-
-
 void Dialogs::showForks()
 {
        pimpl_->forks.controller().show();
 }
 
 
-void Dialogs::showLogFile()
-{
-       pimpl_->logfile.controller().show();
-}
-
-
 void Dialogs::showMathPanel()
 {
        pimpl_->mathpanel.controller().show();
 }
 
 
-void Dialogs::showParagraph()
-{
-       pimpl_->paragraph.controller().show();
-}
-
-
-void Dialogs::updateParagraph()
-{
-       pimpl_->paragraph.controller().changedParagraph();
-}
-
-
 void Dialogs::showPreamble()
 {
        pimpl_->preamble.controller().show();
@@ -117,34 +185,7 @@ void Dialogs::showSpellchecker()
 }
 
 
-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();
-}