From 153e7c9e55eb4286c85150d93e81ff60823780f7 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Fri, 16 Aug 2002 20:07:39 +0000 Subject: [PATCH] Use the same scheme as qt: vars not pointer to vars. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5018 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 12 +- src/frontends/xforms/Dialogs.C | 198 ++++------------- src/frontends/xforms/Dialogs2.C | 253 ++++++++++++++-------- src/frontends/xforms/Dialogs3.C | 253 ---------------------- src/frontends/xforms/Dialogs_impl.h | 320 ++++++++++++++++------------ src/frontends/xforms/Makefile.am | 1 - 6 files changed, 404 insertions(+), 633 deletions(-) delete mode 100644 src/frontends/xforms/Dialogs3.C diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 9b97b23de0..2ff0128cbf 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,11 @@ +2002-08-16 Angus Leeming + + * Dialogs.C: + * Dialogs2.C: + * Dialogs_impl.h: use the qt2 scheme of vars not pointer to vars. + + * Dialogs3.C: removed. + 2002-08-16 Angus Leeming * Tooltips.C (c-tor): don't forget the "#ifdef crap xforms" code next @@ -11,8 +19,8 @@ 2002-08-15 Angus Leeming * Dialogs.C: - * Dialogs2.C - * Dialogs3.C + * Dialogs2.C: + * Dialogs3.C: * Dialogs_impl.h: the brave new world of Dialog creation. * FormBaseDeprecated.C: diff --git a/src/frontends/xforms/Dialogs.C b/src/frontends/xforms/Dialogs.C index 516e53743d..11c5e678d9 100644 --- a/src/frontends/xforms/Dialogs.C +++ b/src/frontends/xforms/Dialogs.C @@ -16,163 +16,6 @@ #include "Dialogs_impl.h" -#include "Tooltips.h" -#include "xformsBC.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 "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 "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 "ControlInclude.h" -#include "FormInclude.h" -#include "forms/form_include.h" - -#include "ControlIndex.h" -#include "FormIndex.h" -#include "forms/form_index.h" - -#include "ControlLog.h" -#include "FormLog.h" - -#include "ControlShowFile.h" -#include "FormShowFile.h" - -#include "FormMathsBitmap.h" - -#include "FormMathsPanel.h" -#include "forms/form_maths_panel.h" - -#include "FormMathsDeco.h" -#include "forms/form_maths_deco.h" - -#include "FormMathsDelim.h" -#include "forms/form_maths_delim.h" - -#include "FormMathsMatrix.h" -#include "forms/form_maths_matrix.h" - -#include "FormMathsSpace.h" -#include "forms/form_maths_space.h" - -#include "FormMathsStyle.h" -#include "forms/form_maths_style.h" - -#include "ControlMinipage.h" -#include "FormMinipage.h" -#include "forms/form_minipage.h" - -#include "ControlParagraph.h" -#include "FormParagraph.h" -#include "forms/form_paragraph.h" - -#include "ControlPreamble.h" -#include "FormPreamble.h" -#include "forms/form_preamble.h" - -#include "FormPreferences.h" -#include "forms/form_preferences.h" - -#include "ControlPrint.h" -#include "FormPrint.h" -#include "forms/form_print.h" - -#include "ControlRef.h" -#include "FormRef.h" -#include "forms/form_ref.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 "FormTabular.h" -#include "forms/form_tabular.h" - -#include "ControlTabularCreate.h" -#include "FormTabularCreate.h" -#include "forms/form_tabular_create.h" - -#include "ControlTexinfo.h" -#include "FormTexinfo.h" -#include "forms/form_texinfo.h" - -#ifdef HAVE_LIBAIKSAURUS -#include "ControlThesaurus.h" -#include "FormThesaurus.h" -#include "forms/form_thesaurus.h" -#endif - -#include "ControlToc.h" -#include "FormToc.h" -#include "forms/form_toc.h" - -#include "ControlUrl.h" -#include "FormUrl.h" -#include "forms/form_url.h" - -#include "ControlVCLog.h" -#include "FormVCLog.h" - - -Dialogs::Impl::Impl(LyXView & lv, Dialogs & d) - : lv_(lv), d_(d) -{} - - Dialogs::Dialogs(LyXView & lv) : pimpl_(new Impl(lv, *this)) { @@ -197,3 +40,44 @@ bool Dialogs::tooltipsEnabled() { return Tooltips::enabled(); } + + +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 + thesaurus(lv, d), +#endif + + toc(lv, d), + url(lv, d), + vclogfile(lv, d) +{} diff --git a/src/frontends/xforms/Dialogs2.C b/src/frontends/xforms/Dialogs2.C index d0b7bef247..366da646c0 100644 --- a/src/frontends/xforms/Dialogs2.C +++ b/src/frontends/xforms/Dialogs2.C @@ -16,188 +16,269 @@ #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 "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 "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 "ControlInclude.h" -#include "FormInclude.h" -#include "forms/form_include.h" - -#include "ControlIndex.h" -#include "FormIndex.h" -#include "forms/form_index.h" - -#include "ControlLog.h" -#include "FormLog.h" - -#include "ControlShowFile.h" -#include "FormShowFile.h" - void Dialogs::showAboutlyx() { - pimpl_->dialog(pimpl_->aboutlyx).controller().show(); + pimpl_->aboutlyx.controller().show(); } void Dialogs::showBibitem(InsetCommand * ic) { - pimpl_->dialog(pimpl_->bibitem).controller().showInset(ic); + pimpl_->bibitem.controller().showInset(ic); } void Dialogs::showBibtex(InsetCommand * ic) { - pimpl_->dialog(pimpl_->bibtex).controller().showInset(ic); + pimpl_->bibtex.controller().showInset(ic); } void Dialogs::showCharacter() { - pimpl_->dialog(pimpl_->character).controller().show(); + pimpl_->character.controller().show(); } void Dialogs::setUserFreeFont() { - pimpl_->dialog(pimpl_->character).controller().apply(); + pimpl_->character.controller().apply(); } void Dialogs::showCitation(InsetCommand * ic) { - pimpl_->dialog(pimpl_->citation).controller().showInset(ic); + pimpl_->citation.controller().showInset(ic); } void Dialogs::createCitation(string const & s) { - pimpl_->dialog(pimpl_->citation).controller().createInset(s); + pimpl_->citation.controller().createInset(s); } void Dialogs::showDocument() { - pimpl_->dialog(pimpl_->document).show(); + pimpl_->document.show(); } void Dialogs::showError(InsetError * ie) { - pimpl_->dialog(pimpl_->error).controller().showInset(ie); + pimpl_->error.controller().showInset(ie); } void Dialogs::showERT(InsetERT * ie) { - pimpl_->dialog(pimpl_->ert).controller().showInset(ie); + pimpl_->ert.controller().showInset(ie); } void Dialogs::updateERT(InsetERT * ie) { - pimpl_->dialog(pimpl_->ert).controller().showInset(ie); + pimpl_->ert.controller().showInset(ie); } void Dialogs::showExternal(InsetExternal * ie) { - pimpl_->dialog(pimpl_->external).controller().showInset(ie); + pimpl_->external.controller().showInset(ie); } void Dialogs::showFile(string const & f) { - pimpl_->dialog(pimpl_->file).controller().showFile(f); + pimpl_->file.controller().showFile(f); } void Dialogs::showFloat(InsetFloat * ifl) { - pimpl_->dialog(pimpl_->floats).controller().showInset(ifl); + pimpl_->floats.controller().showInset(ifl); } void Dialogs::showForks() { - pimpl_->dialog(pimpl_->forks).controller().show(); + pimpl_->forks.controller().show(); } void Dialogs::showGraphics(InsetGraphics * ig) { - pimpl_->dialog(pimpl_->graphics).controller().showInset(ig); + pimpl_->graphics.controller().showInset(ig); } void Dialogs::showInclude(InsetInclude * ii) { - pimpl_->dialog(pimpl_->include).controller().showInset(ii); + pimpl_->include.controller().showInset(ii); } void Dialogs::showIndex(InsetCommand * ic) { - pimpl_->dialog(pimpl_->index).controller().showInset(ic); + pimpl_->index.controller().showInset(ic); } void Dialogs::createIndex() { - pimpl_->dialog(pimpl_->index).controller().createInset(string()); + pimpl_->index.controller().createInset(string()); } void Dialogs::showLogFile() { - pimpl_->dialog(pimpl_->logfile).controller().show(); + pimpl_->logfile.controller().show(); +} + + +void Dialogs::showMathPanel() +{ + pimpl_->mathpanel.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::showPreferences() +{ + pimpl_->preferences.show(); +} + + +void Dialogs::showPrint() +{ + pimpl_->print.controller().show(); +} + + +void Dialogs::showRef(InsetCommand * ic) +{ + pimpl_->ref.controller().showInset(ic); +} + + +void Dialogs::createRef(string const & s) +{ + pimpl_->ref.controller().createInset(s); +} + + +void Dialogs::showSearch() +{ + pimpl_->search.controller().show(); +} + + +void Dialogs::showSendto() +{ + pimpl_->sendto.controller().show(); +} + + +void Dialogs::showSpellchecker() +{ + pimpl_->spellchecker.controller().show(); +} + + +void Dialogs::showTabular(InsetTabular * it) +{ + pimpl_->tabular.showInset(it); +} + + +void Dialogs::updateTabular(InsetTabular * it) +{ + pimpl_->tabular.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::showTOC(InsetCommand * ic) +{ + pimpl_->toc.controller().showInset(ic); +} + + +void Dialogs::createTOC(string const & s) +{ + pimpl_->toc.controller().createInset(s); +} + + +void Dialogs::showUrl(InsetCommand * ic) +{ + pimpl_->url.controller().showInset(ic); +} + + +void Dialogs::createUrl(string const & s) +{ + pimpl_->url.controller().createInset(s); +} + + +void Dialogs::showVCLogFile() +{ + pimpl_->vclogfile.controller().show(); } diff --git a/src/frontends/xforms/Dialogs3.C b/src/frontends/xforms/Dialogs3.C deleted file mode 100644 index 3f760f6b3e..0000000000 --- a/src/frontends/xforms/Dialogs3.C +++ /dev/null @@ -1,253 +0,0 @@ -/** - * \file xforms/Dialogs2.C - * Copyright 1995 Matthias Ettrich - * Copyright 1995-2001 The LyX Team. - * See the file COPYING. - * - * \author Allan Rae, rae@lyx.org - * \author Angus Leeming - */ - -#include - -#ifdef __GNUG__ -#pragma implementation -#endif - -#include "Dialogs_impl.h" - -#include "Tooltips.h" -#include "xformsBC.h" -#include "combox.h" - -#include "FormBrowser.h" -#include "forms/form_browser.h" - -#include "FormMathsBitmap.h" - -#include "FormMathsPanel.h" -#include "forms/form_maths_panel.h" - -#include "FormMathsDeco.h" -#include "forms/form_maths_deco.h" - -#include "FormMathsDelim.h" -#include "forms/form_maths_delim.h" - -#include "FormMathsMatrix.h" -#include "forms/form_maths_matrix.h" - -#include "FormMathsSpace.h" -#include "forms/form_maths_space.h" - -#include "FormMathsStyle.h" -#include "forms/form_maths_style.h" - -#include "ControlMinipage.h" -#include "FormMinipage.h" -#include "forms/form_minipage.h" - -#include "ControlParagraph.h" -#include "FormParagraph.h" -#include "forms/form_paragraph.h" - -#include "ControlPreamble.h" -#include "FormPreamble.h" -#include "forms/form_preamble.h" - -#include "FormPreferences.h" -#include "forms/form_preferences.h" - -#include "ControlPrint.h" -#include "FormPrint.h" -#include "forms/form_print.h" - -#include "ControlRef.h" -#include "FormRef.h" -#include "forms/form_ref.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 "FormTabular.h" -#include "forms/form_tabular.h" - -#include "ControlTabularCreate.h" -#include "FormTabularCreate.h" -#include "forms/form_tabular_create.h" - -#include "ControlTexinfo.h" -#include "FormTexinfo.h" -#include "forms/form_texinfo.h" - -#ifdef HAVE_LIBAIKSAURUS -#include "ControlThesaurus.h" -#include "FormThesaurus.h" -#include "forms/form_thesaurus.h" -#endif - -#include "ControlToc.h" -#include "FormToc.h" -#include "forms/form_toc.h" - -#include "ControlUrl.h" -#include "FormUrl.h" -#include "forms/form_url.h" - -#include "ControlVCLog.h" -#include "FormVCLog.h" - -void Dialogs::showMathPanel() -{ - pimpl_->dialog(pimpl_->mathpanel).show(); -} - - -void Dialogs::showMinipage(InsetMinipage * im) -{ - pimpl_->dialog(pimpl_->minipage).controller().showInset(im); -} - - -void Dialogs::updateMinipage(InsetMinipage * im) -{ - pimpl_->dialog(pimpl_->minipage).controller().showInset(im); -} - - -void Dialogs::showParagraph() -{ - pimpl_->dialog(pimpl_->paragraph).controller().show(); -} - - -void Dialogs::updateParagraph() -{ - pimpl_->dialog(pimpl_->paragraph).controller().changedParagraph(); -} - - -void Dialogs::showPreamble() -{ - pimpl_->dialog(pimpl_->preamble).controller().show(); -} - - -void Dialogs::showPreferences() -{ - pimpl_->dialog(pimpl_->preferences).show(); -} - - -void Dialogs::showPrint() -{ - pimpl_->dialog(pimpl_->print).controller().show(); -} - - -void Dialogs::showRef(InsetCommand * ic) -{ - pimpl_->dialog(pimpl_->ref).controller().showInset(ic); -} - - -void Dialogs::createRef(string const & s) -{ - pimpl_->dialog(pimpl_->ref).controller().createInset(s); -} - - -void Dialogs::showSearch() -{ - pimpl_->dialog(pimpl_->search).controller().show(); -} - - -void Dialogs::showSendto() -{ - pimpl_->dialog(pimpl_->sendto).controller().show(); -} - - -void Dialogs::showSpellchecker() -{ - pimpl_->dialog(pimpl_->spellchecker).controller().show(); -} - - -void Dialogs::showTabular(InsetTabular * it) -{ - pimpl_->dialog(pimpl_->tabular).showInset(it); -} - - -void Dialogs::updateTabular(InsetTabular * it) -{ - pimpl_->dialog(pimpl_->tabular).updateInset(it); -} - - -void Dialogs::showTabularCreate() -{ - pimpl_->dialog(pimpl_->tabularcreate).controller().show(); -} - - -void Dialogs::showTexinfo() -{ - pimpl_->dialog(pimpl_->texinfo).controller().show(); -} - - -#ifdef HAVE_LIBAIKSAURUS - -void Dialogs::showThesaurus(string const & s) -{ - pimpl_->dialog(pimpl_->thesaurus).controller().showEntry(s); -} - -#else - -void Dialogs::showThesaurus(string const &) -{} - -#endif - - -void Dialogs::showTOC(InsetCommand * ic) -{ - pimpl_->dialog(pimpl_->toc).controller().showInset(ic); -} - - -void Dialogs::createTOC(string const & s) -{ - pimpl_->dialog(pimpl_->toc).controller().createInset(s); -} - - -void Dialogs::showUrl(InsetCommand * ic) -{ - pimpl_->dialog(pimpl_->url).controller().showInset(ic); -} - - -void Dialogs::createUrl(string const & s) -{ - pimpl_->dialog(pimpl_->url).controller().createInset(s); -} - - -void Dialogs::showVCLogFile() -{ - pimpl_->dialog(pimpl_->vclogfile).controller().show(); -} diff --git a/src/frontends/xforms/Dialogs_impl.h b/src/frontends/xforms/Dialogs_impl.h index f81e43e3f4..7b748fa9b7 100644 --- a/src/frontends/xforms/Dialogs_impl.h +++ b/src/frontends/xforms/Dialogs_impl.h @@ -16,82 +16,156 @@ #include "Dialogs.h" #include "controllers/GUI.h" -#include +#include "Tooltips.h" +#include "xformsBC.h" +#include "combox.h" +#include "ControlAboutlyx.h" +#include "FormAboutlyx.h" +#include "forms/form_aboutlyx.h" -class ControlAboutlyx; -class ControlBibitem; -class ControlBibtex; -class ControlCharacter; -class ControlCitation; -class ControlError; -class ControlERT; -class ControlExternal; -class ControlShowFile; -class ControlFloat; -class ControlForks; -class ControlGraphics; -class ControlInclude; -class ControlIndex; -class ControlLog; -class ControlMinipage; -class ControlParagraph; -class ControlPreamble; -class ControlPrint; -class ControlRef; -class ControlSearch; -class ControlSendto; -class ControlSpellchecker; -class ControlTabularCreate; -class ControlTexinfo; -class ControlToc; -class ControlUrl; -class ControlVCLog; +#include "ControlBibitem.h" +#include "FormBibitem.h" +#include "forms/form_bibitem.h" -class FormAboutlyx; -class FormBibitem; -class FormBibtex; -class FormCharacter; -class FormCitation; -class FormDocument; -class FormError; -class FormERT; -class FormExternal; -class FormShowFile; -class FormFloat; -class FormForks; -class FormGraphics; -class FormInclude; -class FormIndex; -class FormLog; -class FormMathsPanel; -class FormMinipage; -class FormParagraph; -class FormPreamble; -class FormPreferences; -class FormPrint; -class FormRef; -class FormSearch; -class FormSendto; -class FormSpellchecker; -class FormTabular; -class FormTabularCreate; -class FormTexinfo; -class FormToc; -class FormUrl; -class FormVCLog; +#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 "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 "ControlInclude.h" +#include "FormInclude.h" +#include "forms/form_include.h" + +#include "ControlIndex.h" +#include "FormIndex.h" +#include "forms/form_index.h" + +#include "ControlLog.h" +#include "FormLog.h" + +#include "ControlShowFile.h" +#include "FormShowFile.h" + +#include "FormMathsBitmap.h" + +#include "FormMathsPanel.h" +#include "forms/form_maths_panel.h" + +#include "FormMathsDeco.h" +#include "forms/form_maths_deco.h" + +#include "FormMathsDelim.h" +#include "forms/form_maths_delim.h" + +#include "FormMathsMatrix.h" +#include "forms/form_maths_matrix.h" + +#include "FormMathsSpace.h" +#include "forms/form_maths_space.h" + +#include "FormMathsStyle.h" +#include "forms/form_maths_style.h" + +#include "ControlMinipage.h" +#include "FormMinipage.h" +#include "forms/form_minipage.h" + +#include "ControlParagraph.h" +#include "FormParagraph.h" +#include "forms/form_paragraph.h" + +#include "ControlPreamble.h" +#include "FormPreamble.h" +#include "forms/form_preamble.h" + +#include "FormPreferences.h" +#include "forms/form_preferences.h" + +#include "ControlPrint.h" +#include "FormPrint.h" +#include "forms/form_print.h" + +#include "ControlRef.h" +#include "FormRef.h" +#include "forms/form_ref.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 "FormTabular.h" +#include "forms/form_tabular.h" + +#include "ControlTabularCreate.h" +#include "FormTabularCreate.h" +#include "forms/form_tabular_create.h" + +#include "ControlTexinfo.h" +#include "FormTexinfo.h" +#include "forms/form_texinfo.h" #ifdef HAVE_LIBAIKSAURUS -class ControlThesaurus; -class FormThesaurus; +#include "ControlThesaurus.h" +#include "FormThesaurus.h" +#include "forms/form_thesaurus.h" #endif -class OkCancelPolicy; -class OkApplyCancelPolicy; -class OkCancelReadOnlyPolicy; -class OkApplyCancelReadOnlyPolicy; -class NoRepeatedApplyReadOnlyPolicy; -class xformsBC; +#include "ControlToc.h" +#include "FormToc.h" +#include "forms/form_toc.h" + +#include "ControlUrl.h" +#include "FormUrl.h" +#include "forms/form_url.h" + +#include "ControlVCLog.h" +#include "FormVCLog.h" typedef GUI @@ -103,12 +177,10 @@ BibitemDialog; typedef GUI BibtexDialog; -typedef GUI +typedef GUI CharacterDialog; -typedef GUI +typedef GUI CitationDialog; typedef FormDocument DocumentDialog; @@ -119,8 +191,7 @@ ErrorDialog; typedef GUI ERTDialog; -typedef GUI +typedef GUI ExternalDialog; typedef GUI @@ -132,8 +203,7 @@ FloatDialog; typedef GUI ForksDialog; -typedef GUI +typedef GUI GraphicsDialog; typedef GUI @@ -147,16 +217,13 @@ LogFileDialog; typedef FormMathsPanel MathPanelDialog; -typedef GUI +typedef GUI MinipageDialog; -typedef GUI +typedef GUI ParagraphDialog; -typedef GUI +typedef GUI PreambleDialog; typedef FormPreferences PreferencesDialog; @@ -173,22 +240,19 @@ SearchDialog; typedef GUI SendtoDialog; -typedef GUI +typedef GUI SpellcheckerDialog; typedef FormTabular TabularDialog; -typedef GUI +typedef GUI TabularCreateDialog; typedef GUI TexinfoDialog; #ifdef HAVE_LIBAIKSAURUS -typedef GUI +typedef GUI ThesaurusDialog; #endif @@ -204,55 +268,43 @@ VCLogFileDialog; struct Dialogs::Impl { Impl(LyXView & lv, Dialogs & d); - template - T & dialog(boost::scoped_ptr & var) - { - if (!var.get()) - var.reset(new T(lv_, d_)); - return *var; - } - - boost::scoped_ptr aboutlyx; - boost::scoped_ptr bibitem; - boost::scoped_ptr bibtex; - boost::scoped_ptr character; - boost::scoped_ptr citation; - boost::scoped_ptr document; - boost::scoped_ptr error; - boost::scoped_ptr ert; - boost::scoped_ptr external; - boost::scoped_ptr file; - boost::scoped_ptr floats; - boost::scoped_ptr forks; - boost::scoped_ptr graphics; - boost::scoped_ptr include; - boost::scoped_ptr index; - boost::scoped_ptr logfile; - boost::scoped_ptr mathpanel; - boost::scoped_ptr minipage; - boost::scoped_ptr paragraph; - boost::scoped_ptr preamble; - boost::scoped_ptr preferences; - boost::scoped_ptr print; - boost::scoped_ptr ref; - boost::scoped_ptr search; - boost::scoped_ptr sendto; - boost::scoped_ptr spellchecker; - boost::scoped_ptr tabular; - boost::scoped_ptr tabularcreate; - boost::scoped_ptr texinfo; + AboutlyxDialog aboutlyx; + BibitemDialog bibitem; + BibtexDialog bibtex; + CharacterDialog character; + CitationDialog citation; + DocumentDialog document; + ErrorDialog error; + ERTDialog ert; + ExternalDialog external; + FileDialog file; + FloatDialog floats; + ForksDialog forks; + GraphicsDialog graphics; + IncludeDialog include; + IndexDialog index; + LogFileDialog logfile; + MathPanelDialog mathpanel; + MinipageDialog minipage; + ParagraphDialog paragraph; + PreambleDialog preamble; + PreferencesDialog preferences; + PrintDialog print; + RefDialog ref; + SearchDialog search; + SendtoDialog sendto; + SpellcheckerDialog spellchecker; + TabularDialog tabular; + TabularCreateDialog tabularcreate; + TexinfoDialog texinfo; #ifdef HAVE_LIBAIKSAURUS - boost::scoped_ptr thesaurus; + ThesaurusDialog thesaurus; #endif - boost::scoped_ptr toc; - boost::scoped_ptr url; - boost::scoped_ptr vclogfile; - -private: - LyXView & lv_; - Dialogs & d_; + TocDialog toc; + UrlDialog url; + VCLogFileDialog vclogfile; }; #endif // DIALOGS_IMPL_H diff --git a/src/frontends/xforms/Makefile.am b/src/frontends/xforms/Makefile.am index 207a40ad20..e8950a9d67 100644 --- a/src/frontends/xforms/Makefile.am +++ b/src/frontends/xforms/Makefile.am @@ -49,7 +49,6 @@ libxforms_la_SOURCES = \ ColorHandler.h \ Dialogs.C \ Dialogs2.C \ - Dialogs3.C \ Dialogs_impl.h \ DropDown.h \ DropDown.C \