]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/Dialogs.C
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / Dialogs.C
index e5c2fdff86056cd77c25fe1f32b5d35269c254f1..c79539325a015c8be2102fdca52baf6800271f13 100644 (file)
@@ -1,10 +1,13 @@
 /**
  * \file xforms/Dialogs.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 Allan Rae
+ * \author Angus Leeming 
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
 #pragma implementation
 #endif
 
-#include "Dialogs.h"
+#include "Dialogs_impl.h"
+
+Dialogs::Dialogs(LyXView & lv)
+       : pimpl_(new Impl(lv, *this))
+{
+       // reduce the number of connections needed in
+       // dialogs by a simple connection here.
+       hideAll.connect(hideBufferDependent);
+}
 
-#include "GUI.h"
-#include "xformsBC.h"
 
-#include "combox.h"       // needed for clean destruction of boost::scoped_ptr
-#include "form_aboutlyx.h"
-#include "form_bibitem.h"
-#include "form_bibtex.h"
-#include "form_browser.h"
-#include "form_character.h"
-#include "form_citation.h"
-#include "form_error.h"
-#include "form_ert.h"
-#include "form_external.h"
-#include "form_float.h"
-#include "form_forks.h"
-#include "form_graphics.h"
-#include "form_include.h"
-#include "form_index.h"
-#include "form_minipage.h"
-#include "form_preamble.h"
-#include "form_print.h"
-#include "form_ref.h"
-#include "form_search.h"
-#include "form_sendto.h"
-#include "form_spellchecker.h"
-#include "form_tabular_create.h"
-#include "form_texinfo.h"
-#include "form_thesaurus.h"
-#include "form_toc.h"
-#include "form_url.h"
+Dialogs::~Dialogs()
+{}
 
-#include "FormAboutlyx.h"
-#include "FormBibitem.h"
-#include "FormBibtex.h"
-#include "FormCharacter.h"
-#include "FormCitation.h"
-#include "FormError.h"
-#include "FormERT.h"
-#include "FormExternal.h"
-#include "FormFloat.h"
-#include "FormForks.h"
-#include "FormGraphics.h"
-#include "FormInclude.h"
-#include "FormIndex.h"
-#include "FormLog.h"
-#include "FormMinipage.h"
-#include "FormPreamble.h"
-#include "FormPrint.h"
-#include "FormRef.h"
-#include "FormSearch.h"
-#include "FormSendto.h"
-#include "FormShowFile.h"
-#include "FormSpellchecker.h"
-#include "FormTabularCreate.h"
-#include "FormTexinfo.h"
-#include "FormThesaurus.h"
-#include "FormToc.h"
-#include "FormUrl.h"
-#include "FormVCLog.h"
 
-#include "FormDocument.h"
-#include "FormMathsPanel.h"
-#include "FormParagraph.h"
-#include "FormPreferences.h"
-#include "FormTabular.h"
+void Dialogs::toggleTooltips()
+{
+       Tooltips::toggleEnabled();
+}
 
-#include "Tooltips.h"
 
 /// Are the tooltips on or off?
 bool Dialogs::tooltipsEnabled()
@@ -90,74 +44,43 @@ bool Dialogs::tooltipsEnabled()
 }
 
 
-Dialogs::Dialogs(LyXView * lv)
-{
-       add(new GUI<ControlAboutlyx, FormAboutlyx,
-                   OkCancelPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlBibitem, FormBibitem,
-                   OkCancelReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlBibtex, FormBibtex,
-                   OkCancelReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlCharacter, FormCharacter,
-                   OkApplyCancelReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlCitation, FormCitation,
-                   NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlError, FormError,
-                   OkCancelPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlERT, FormERT,
-                   NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlExternal, FormExternal,
-                   OkApplyCancelReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlForks, FormForks,
-                   OkApplyCancelPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlGraphics, FormGraphics,
-                   NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlInclude, FormInclude,
-                   OkCancelReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlIndex, FormIndex,
-                   NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlLog, FormLog,
-                   OkCancelPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlMinipage, FormMinipage,
-                   NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlFloat, FormFloat,
-                   NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlPreamble, FormPreamble,
-                   NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlPrint, FormPrint,
-                   OkApplyCancelPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlRef, FormRef,
-                   NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlSearch, FormSearch,
-                   NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlSendto, FormSendto,
-                   OkApplyCancelPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlShowFile, FormShowFile,
-                   OkCancelPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlSpellchecker, FormSpellchecker,
-                   NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlTabularCreate, FormTabularCreate,
-                   OkApplyCancelReadOnlyPolicy, xformsBC>(*lv, *this));
+Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
+       : aboutlyx(lv, d),
+         bibitem(lv, d),
+         bibtex(lv, d),
+         character(lv, d),
+         citation(lv, d),
+         document(lv, d),
+         error(lv, d),
+         ert(lv, d),
+         external(lv, d),
+         file(lv, d),
+         floats(lv, d),
+         forks(lv, d),
+         graphics(lv, d),
+         include(lv, d),
+         index(lv, d),
+         logfile(lv, d),
+         mathpanel(lv, d),
+         minipage(lv, d),
+         paragraph(lv, d),
+         preamble(lv, d),
+         preferences(lv, d),
+         print(lv, d),
+         ref(lv, d),
+         search(lv, d),
+         sendto(lv, d),
+         spellchecker(lv, d),
+         tabular(lv, d),
+         tabularcreate(lv, d),
+         texinfo(lv, d),
+
 #ifdef HAVE_LIBAIKSAURUS
-       add(new GUI<ControlThesaurus, FormThesaurus,
-                   OkApplyCancelReadOnlyPolicy, xformsBC>(*lv, *this));
+         thesaurus(lv, d),
 #endif
-       add(new GUI<ControlTexinfo, FormTexinfo,
-                   OkCancelPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlToc, FormToc,
-                   OkCancelPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlUrl, FormUrl,
-                   NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
-       add(new GUI<ControlVCLog, FormVCLog,
-                   OkCancelPolicy, xformsBC>(*lv, *this));
-
-       add(new FormDocument(lv, this));
-       add(new FormMathsPanel(lv, this));
-       add(new FormParagraph(lv, this));
-       add(new FormPreferences(lv, this));
-       add(new FormTabular(lv, this));
 
-       // reduce the number of connections needed in
-       // dialogs by a simple connection here.
-       hideAll.connect(hideBufferDependent);
-}
+         toc(lv, d),
+         url(lv, d),
+         vclogfile(lv, d),
+         wrap(lv, d)
+{}