]> 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 d0b7bef247ddf9b386dfbbcb8665237d4793e9ce..0c95fde9811dcf6f1b955914d7438408e52e51ed 100644 (file)
 /**
- * \file xforms/Dialogs.C
+ * \file xforms/Dialogs2.C
  * Copyright 1995 Matthias Ettrich
- * Copyright 1995-2001 The LyX Team.
- * See the file COPYING.
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author Allan Rae, rae@lyx.org
- * \author Angus Leeming <leeming@lyx.org>
+ * \author Allan Rae
+ * \author Angus Leeming
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "Dialogs_impl.h"
-
-#include "combox.h"
-
-#include "ControlAboutlyx.h"
-#include "FormAboutlyx.h"
-#include "forms/form_aboutlyx.h"
-
-#include "ControlBibitem.h"
-#include "FormBibitem.h"
-#include "forms/form_bibitem.h"
+#include "Dialogs.h"
+#include "controllers/GUI.h"
+#include "ButtonController.h"
 
-#include "ControlBibtex.h"
-#include "FormBibtex.h"
-#include "forms/form_bibtex.h"
-
-#include "FormBrowser.h"
-#include "forms/form_browser.h"
-
-#include "ControlCharacter.h"
-#include "FormCharacter.h"
-#include "forms/form_character.h"
-
-#include "ControlCitation.h"
-#include "FormCitation.h"
-#include "forms/form_citation.h"
+#include "Tooltips.h"
+#include "xformsBC.h"
 
+#include "ControlDocument.h"
 #include "FormDocument.h"
 #include "forms/form_document.h"
 
-#include "ControlError.h"
-#include "FormError.h"
-#include "forms/form_error.h"
-
-#include "ControlERT.h"
-#include "FormERT.h"
-#include "forms/form_ert.h"
-
-#include "ControlExternal.h"
-#include "FormExternal.h"
-#include "forms/form_external.h"
-
-#include "ControlFloat.h"
-#include "FormFloat.h"
-#include "forms/form_float.h"
-
 #include "ControlForks.h"
 #include "FormForks.h"
 #include "forms/form_forks.h"
 
-#include "ControlGraphics.h"
-#include "FormGraphics.h"
-#include "forms/form_graphics.h"
+#include "ControlMath.h"
+#include "FormMathsPanel.h"
+#include "forms/form_maths_panel.h"
 
-#include "ControlInclude.h"
-#include "FormInclude.h"
-#include "forms/form_include.h"
+#include "ControlPreamble.h"
+#include "FormPreamble.h"
+#include "forms/form_preamble.h"
 
-#include "ControlIndex.h"
-#include "FormIndex.h"
-#include "forms/form_index.h"
+#include "ControlPrefs.h"
+#include "FormPreferences.h"
+#include "forms/form_preferences.h"
 
-#include "ControlLog.h"
-#include "FormLog.h"
+#include "ControlPrint.h"
+#include "FormPrint.h"
+#include "forms/form_print.h"
 
-#include "ControlShowFile.h"
-#include "FormShowFile.h"
+#include "ControlSearch.h"
+#include "FormSearch.h"
+#include "forms/form_search.h"
 
+#include "ControlSendto.h"
+#include "FormSendto.h"
+#include "forms/form_sendto.h"
 
-void Dialogs::showAboutlyx()
-{
-       pimpl_->dialog(pimpl_->aboutlyx).controller().show();
-}
+#include "ControlSpellchecker.h"
+#include "FormSpellchecker.h"
+#include "forms/form_spellchecker.h"
 
+#include "ControlTexinfo.h"
+#include "FormTexinfo.h"
+#include "forms/form_texinfo.h"
 
-void Dialogs::showBibitem(InsetCommand * ic)
-{
-       pimpl_->dialog(pimpl_->bibitem).controller().showInset(ic);
-}
+typedef GUI<ControlDocument, FormDocument, NoRepeatedApplyReadOnlyPolicy, xformsBC>
+DocumentDialog;
 
+typedef GUI<ControlForks, FormForks, OkApplyCancelPolicy, xformsBC>
+ForksDialog;
 
-void Dialogs::showBibtex(InsetCommand * ic)
-{
-       pimpl_->dialog(pimpl_->bibtex).controller().showInset(ic);
-}
+typedef GUI<ControlMath, FormMathsPanel, OkCancelReadOnlyPolicy, xformsBC>
+MathPanelDialog;
 
+typedef GUI<ControlPreamble, FormPreamble, NoRepeatedApplyReadOnlyPolicy, xformsBC>
+PreambleDialog;
 
-void Dialogs::showCharacter()
-{
-       pimpl_->dialog(pimpl_->character).controller().show();
-}
+typedef GUI<ControlPrefs, FormPreferences, OkApplyCancelPolicy, xformsBC>
+PreferencesDialog;
 
+typedef GUI<ControlPrint, FormPrint, OkApplyCancelPolicy, xformsBC>
+PrintDialog;
 
-void Dialogs::setUserFreeFont()
-{
-       pimpl_->dialog(pimpl_->character).controller().apply();
-}
+typedef GUI<ControlSearch, FormSearch, NoRepeatedApplyReadOnlyPolicy, xformsBC>
+SearchDialog;
 
+typedef GUI<ControlSendto, FormSendto, OkApplyCancelPolicy, xformsBC>
+SendtoDialog;
 
-void Dialogs::showCitation(InsetCommand * ic)
-{
-       pimpl_->dialog(pimpl_->citation).controller().showInset(ic);
-}
+typedef GUI<ControlSpellchecker, FormSpellchecker, NoRepeatedApplyReadOnlyPolicy, xformsBC>
+SpellcheckerDialog;
 
+typedef GUI<ControlTexinfo, FormTexinfo, OkCancelPolicy, xformsBC>
+TexinfoDialog;
 
-void Dialogs::createCitation(string const & s)
-{
-       pimpl_->dialog(pimpl_->citation).controller().createInset(s);
-}
+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;
+};
 
-void Dialogs::showDocument()
-{
-       pimpl_->dialog(pimpl_->document).show();
-}
 
+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::showError(InsetError * ie)
+
+void Dialogs::init_pimpl()
 {
-       pimpl_->dialog(pimpl_->error).controller().showInset(ie);
+       pimpl_ = new Impl(lyxview_, *this);
 }
 
 
-void Dialogs::showERT(InsetERT * ie)
+Dialogs::~Dialogs()
 {
-       pimpl_->dialog(pimpl_->ert).controller().showInset(ie);
+       delete pimpl_;
 }
 
 
-void Dialogs::updateERT(InsetERT * ie)
+void Dialogs::showDocument()
 {
-       pimpl_->dialog(pimpl_->ert).controller().showInset(ie);
+       pimpl_->document.controller().show();
 }
 
 
-void Dialogs::showExternal(InsetExternal * ie)
+void Dialogs::showForks()
 {
-       pimpl_->dialog(pimpl_->external).controller().showInset(ie);
+       pimpl_->forks.controller().show();
 }
 
 
-void Dialogs::showFile(string const & f)
+void Dialogs::showMathPanel()
 {
-       pimpl_->dialog(pimpl_->file).controller().showFile(f);
+       pimpl_->mathpanel.controller().show();
 }
 
 
-void Dialogs::showFloat(InsetFloat * ifl)
+void Dialogs::showPreamble()
 {
-       pimpl_->dialog(pimpl_->floats).controller().showInset(ifl);
+       pimpl_->preamble.controller().show();
 }
 
 
-void Dialogs::showForks()
+void Dialogs::showPreferences()
 {
-       pimpl_->dialog(pimpl_->forks).controller().show();
+       pimpl_->preferences.controller().show();
 }
 
 
-void Dialogs::showGraphics(InsetGraphics * ig)
+void Dialogs::showPrint()
 {
-       pimpl_->dialog(pimpl_->graphics).controller().showInset(ig);
+       pimpl_->print.controller().show();
 }
 
 
-void Dialogs::showInclude(InsetInclude * ii)
+void Dialogs::showSearch()
 {
-       pimpl_->dialog(pimpl_->include).controller().showInset(ii);
+       pimpl_->search.controller().show();
 }
 
 
-void Dialogs::showIndex(InsetCommand * ic)
+void Dialogs::showSendto()
 {
-       pimpl_->dialog(pimpl_->index).controller().showInset(ic);
+       pimpl_->sendto.controller().show();
 }
 
 
-void Dialogs::createIndex()
+void Dialogs::showSpellchecker()
 {
-       pimpl_->dialog(pimpl_->index).controller().createInset(string());
+       pimpl_->spellchecker.controller().show();
 }
 
 
-void Dialogs::showLogFile()
+void Dialogs::showTexinfo()
 {
-       pimpl_->dialog(pimpl_->logfile).controller().show();
+       pimpl_->texinfo.controller().show();
 }