2002-08-15 17:48:53 +00:00
|
|
|
/**
|
2002-09-26 08:57:43 +00:00
|
|
|
* \file xforms/Dialogs2.C
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-08-15 17:48:53 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author Allan Rae
|
2002-12-01 22:59:25 +00:00
|
|
|
* \author Angus Leeming
|
2002-09-05 14:10:50 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2002-08-15 17:48:53 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
2003-03-26 12:41:27 +00:00
|
|
|
#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 "ControlPreamble.h"
|
|
|
|
#include "FormPreamble.h"
|
|
|
|
#include "forms/form_preamble.h"
|
|
|
|
|
|
|
|
#include "ControlPrefs.h"
|
|
|
|
#include "FormPreferences.h"
|
2003-07-23 15:36:40 +00:00
|
|
|
#include "FormColorpicker.h"
|
2003-03-26 12:41:27 +00:00
|
|
|
#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"
|
|
|
|
|
|
|
|
typedef GUI<ControlDocument, FormDocument, NoRepeatedApplyReadOnlyPolicy, xformsBC>
|
|
|
|
DocumentDialog;
|
|
|
|
|
|
|
|
typedef GUI<ControlForks, FormForks, OkApplyCancelPolicy, xformsBC>
|
|
|
|
ForksDialog;
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
|
|
struct Dialogs::Impl {
|
|
|
|
Impl(LyXView & lv, Dialogs & d);
|
|
|
|
|
|
|
|
DocumentDialog document;
|
|
|
|
ForksDialog forks;
|
|
|
|
PreambleDialog preamble;
|
|
|
|
PreferencesDialog preferences;
|
|
|
|
PrintDialog print;
|
|
|
|
SearchDialog search;
|
|
|
|
SendtoDialog sendto;
|
|
|
|
SpellcheckerDialog spellchecker;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
|
|
|
|
: document(lv, d),
|
|
|
|
forks(lv, d),
|
|
|
|
preamble(lv, d),
|
|
|
|
preferences(lv, d),
|
|
|
|
print(lv, d),
|
|
|
|
search(lv, d),
|
|
|
|
sendto(lv, d),
|
2003-06-19 17:16:12 +00:00
|
|
|
spellchecker(lv, d)
|
2003-03-26 12:41:27 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
void Dialogs::init_pimpl()
|
|
|
|
{
|
|
|
|
pimpl_ = new Impl(lyxview_, *this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Dialogs::~Dialogs()
|
|
|
|
{
|
|
|
|
delete pimpl_;
|
|
|
|
}
|
2002-08-15 17:48:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
void Dialogs::showDocument()
|
|
|
|
{
|
2002-11-22 10:47:56 +00:00
|
|
|
pimpl_->document.controller().show();
|
2002-08-15 17:48:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Dialogs::showForks()
|
|
|
|
{
|
2002-08-16 20:07:39 +00:00
|
|
|
pimpl_->forks.controller().show();
|
2002-08-15 17:48:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-08-16 20:07:39 +00:00
|
|
|
void Dialogs::showPreamble()
|
|
|
|
{
|
|
|
|
pimpl_->preamble.controller().show();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Dialogs::showPreferences()
|
|
|
|
{
|
2002-11-15 02:44:20 +00:00
|
|
|
pimpl_->preferences.controller().show();
|
2002-08-16 20:07:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Dialogs::showPrint()
|
|
|
|
{
|
|
|
|
pimpl_->print.controller().show();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Dialogs::showSearch()
|
|
|
|
{
|
|
|
|
pimpl_->search.controller().show();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Dialogs::showSendto()
|
|
|
|
{
|
|
|
|
pimpl_->sendto.controller().show();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Dialogs::showSpellchecker()
|
|
|
|
{
|
|
|
|
pimpl_->spellchecker.controller().show();
|
|
|
|
}
|