Qt2 compiles again and in about half the time of xforms.

Lars, shall I change over the xforms code to this scheme?


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5005 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-08-15 19:07:17 +00:00
parent 1538facded
commit 66ad217fcf
6 changed files with 578 additions and 514 deletions

View File

@ -1,3 +1,14 @@
2002-08-15 Angus Leeming <leeming@lyx.org>
* Dialogs.C:
* Dialogs2.C
* Dialogs_impl.h: the brave new world of Dialog creation.
* guiapi.C: discard.
* Makefile.am: add new files Dialogs2.C Dialogs_impl.h and
remove guiapi.C.
2002-08-14 John Levon <levon@movementarian.org> 2002-08-14 John Levon <levon@movementarian.org>
* Alert_pimpl.C: remove xforms header * Alert_pimpl.C: remove xforms header

View File

@ -1,27 +1,76 @@
/** /**
* \file qt2/Dialogs.C * \file qt2/Dialogs.C
* Copyright 2001 the LyX Team * Copyright 1995 Matthias Ettrich
* Read the file COPYING * Copyright 1995-2001 The LyX Team.
* See the file COPYING.
* *
* \author Allan Rae, rae@lyx.org
* \author Angus Leeming <leeming@lyx.org>
*/ */
#include <config.h> #include <config.h>
#include "Dialogs.h" #ifdef __GNUG__
#pragma implementation
LyXView * dialogs_lyxview; #endif
Dialogs::Dialogs(LyXView * lv) #include "Dialogs_impl.h"
Dialogs::Dialogs(LyXView & lv)
: pimpl_(new Impl(lv, *this))
{ {
dialogs_lyxview = lv;
// reduce the number of connections needed in // reduce the number of connections needed in
// dialogs by a simple connection here. // dialogs by a simple connection here.
hideAll.connect(hideBufferDependent); hideAll.connect(hideBufferDependent);
} }
bool Dialogs::tooltipsEnabled(void) Dialogs::~Dialogs()
{}
void Dialogs::toggleTooltips()
{}
/// Are the tooltips on or off?
bool Dialogs::tooltipsEnabled()
{ {
return false; return false;
} }
Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
: aboutlyx(lv, d),
bibitem(lv, d),
bibtex(lv, d),
character(lv, d),
citation(lv, d),
error(lv, d),
ert(lv, d),
external(lv, d),
file(lv, d),
floats(lv, d),
graphics(lv, d),
include(lv, d),
index(lv, d),
logfile(lv, d),
minipage(lv, d),
paragraph(lv, d),
preamble(lv, d),
print(lv, d),
ref(lv, d),
search(lv, d),
spellchecker(lv, d),
tabularcreate(lv, d),
texinfo(lv, d),
#ifdef HAVE_LIBAIKSAURUS
thesaurus(lv, d),
#endif
toc(lv, d),
url(lv, d),
vclogfile(lv, d)
{}

View File

@ -0,0 +1,265 @@
/**
* \file xforms/Dialogs.C
* Copyright 1995 Matthias Ettrich
* Copyright 1995-2001 The LyX Team.
* See the file COPYING.
*
* \author Allan Rae, rae@lyx.org
* \author Angus Leeming <leeming@lyx.org>
*/
#include <config.h>
#ifdef __GNUG__
#pragma implementation
#endif
#include "Dialogs_impl.h"
void Dialogs::showAboutlyx()
{
pimpl_->aboutlyx.controller().show();
}
void Dialogs::showBibitem(InsetCommand * ic)
{
pimpl_->bibitem.controller().showInset(ic);
}
void Dialogs::showBibtex(InsetCommand * ic)
{
pimpl_->bibtex.controller().showInset(ic);
}
void Dialogs::showCharacter()
{
pimpl_->character.controller().show();
}
void Dialogs::setUserFreeFont()
{
pimpl_->character.controller().apply();
}
void Dialogs::showCitation(InsetCommand * ic)
{
pimpl_->citation.controller().showInset(ic);
}
void Dialogs::createCitation(string const & s)
{
pimpl_->citation.controller().createInset(s);
}
void Dialogs::showDocument()
{}
void Dialogs::showError(InsetError * ie)
{
pimpl_->error.controller().showInset(ie);
}
void Dialogs::showERT(InsetERT * ie)
{
pimpl_->ert.controller().showInset(ie);
}
void Dialogs::updateERT(InsetERT * ie)
{
pimpl_->ert.controller().showInset(ie);
}
void Dialogs::showExternal(InsetExternal * ie)
{
pimpl_->external.controller().showInset(ie);
}
void Dialogs::showFile(string const & f)
{
pimpl_->file.controller().showFile(f);
}
void Dialogs::showFloat(InsetFloat * ifl)
{
pimpl_->floats.controller().showInset(ifl);
}
void Dialogs::showForks()
{}
void Dialogs::showGraphics(InsetGraphics * ig)
{
pimpl_->graphics.controller().showInset(ig);
}
void Dialogs::showInclude(InsetInclude * ii)
{
pimpl_->include.controller().showInset(ii);
}
void Dialogs::showIndex(InsetCommand * ic)
{
pimpl_->index.controller().showInset(ic);
}
void Dialogs::createIndex()
{
pimpl_->index.controller().createInset(string());
}
void Dialogs::showLogFile()
{
pimpl_->logfile.controller().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()
{}
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()
{}
void Dialogs::showSpellchecker()
{
pimpl_->spellchecker.controller().show();
}
void Dialogs::showTabular(InsetTabular * it)
{}
void Dialogs::updateTabular(InsetTabular * 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();
}

View File

@ -0,0 +1,242 @@
// -*- C++ -*-
/**
* \file Dialogs_impl.h
* Copyright 1995-2002 The LyX Team.
* See the file COPYING.
* \author Angus Leeming <leeming@lyx.org>
*/
#ifndef DIALOGS_IMPL_H
#define DIALOGS_IMP_H
#ifdef __GNUG__
#pragma interface
#endif
#include "Dialogs.h"
#include "controllers/GUI.h"
#include "ControlAboutlyx.h"
#include "ControlBibitem.h"
#include "ControlBibtex.h"
#include "ControlCharacter.h"
#include "ControlCitation.h"
#include "ControlError.h"
#include "ControlERT.h"
#include "ControlExternal.h"
#include "ControlFloat.h"
#include "ControlForks.h"
#include "ControlGraphics.h"
#include "insets/insetgraphicsParams.h"
#include "ControlInclude.h"
#include "ControlIndex.h"
#include "ControlLog.h"
#include "ControlMinipage.h"
#include "ControlParagraph.h"
#include "ControlPreamble.h"
#include "ControlPrint.h"
#include "ControlRef.h"
#include "ControlSearch.h"
#include "ControlSendto.h"
#include "ControlShowFile.h"
#include "ControlSpellchecker.h"
#include "ControlTabularCreate.h"
#include "ControlTexinfo.h"
#include "ControlToc.h"
#include "ControlUrl.h"
#include "ControlVCLog.h"
#include "QAbout.h"
#include "QAboutDialog.h"
#include "QBibitem.h"
#include "QBibitemDialog.h"
#include "QBibtex.h"
#include "QBibtexDialog.h"
#include "QCharacter.h"
#include "QCharacterDialog.h"
#include "QCitation.h"
#include "QCitationDialog.h"
//#include "QDocument.h"
#include "QError.h"
#include "QErrorDialog.h"
#include "QERT.h"
#include "QERTDialog.h"
#include "QExternal.h"
#include "QExternalDialog.h"
#include "QFloat.h"
#include "QFloatDialog.h"
//#include "QForks.h"
// Here would be an appropriate point to lecture on the evils
// of the Qt headers, those most fucked up of disgusting ratholes.
// But I won't.
#undef signals
#include "QGraphics.h"
#include "QGraphicsDialog.h"
#include "QInclude.h"
#include "QIncludeDialog.h"
#include "QIndex.h"
#include "QIndexDialog.h"
#include "QLog.h"
#include "QLogDialog.h"
#include "QMinipage.h"
#include "QMinipageDialog.h"
#include "QParagraph.h"
#include "QParagraphDialog.h"
#include "QPreamble.h"
#include "QPreambleDialog.h"
//#include "QPreferences.h"
#include "QPrint.h"
#include "QPrintDialog.h"
#include "QRef.h"
#include "QRefDialog.h"
#include "QSearch.h"
#include "QSearchDialog.h"
//#include "QSendto.h"
#include "QShowFile.h"
#include "QShowFileDialog.h"
#include "QSpellchecker.h"
#include "QSpellcheckerDialog.h"
//#include "QTabular.h"
#include "QTabularCreate.h"
#include "QTabularCreateDialog.h"
#include "QTexinfo.h"
#include "QTexinfoDialog.h"
#ifdef HAVE_LIBAIKSAURUS
#include "ControlThesaurus.h"
#include "QThesaurus.h"
#include "QThesaurusDialog.h"
#endif
#include "QToc.h"
#include "QTocDialog.h"
#include "QURL.h"
#include "QURLDialog.h"
#include "QVCLog.h"
#include "QVCLogDialog.h"
#include "Qt2BC.h"
typedef GUI<ControlAboutlyx, QAbout, OkCancelPolicy, Qt2BC>
AboutlyxDialog;
typedef GUI<ControlBibitem, QBibitem, OkCancelReadOnlyPolicy, Qt2BC>
BibitemDialog;
typedef GUI<ControlBibtex, QBibtex, OkCancelReadOnlyPolicy, Qt2BC>
BibtexDialog;
typedef GUI<ControlCharacter, QCharacter, OkApplyCancelReadOnlyPolicy, Qt2BC>
CharacterDialog;
typedef GUI<ControlCitation, QCitation, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
CitationDialog;
typedef GUI<ControlError, QError, OkCancelPolicy, Qt2BC>
ErrorDialog;
typedef GUI<ControlERT, QERT, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
ERTDialog;
typedef GUI<ControlExternal, QExternal, OkApplyCancelReadOnlyPolicy, Qt2BC>
ExternalDialog;
typedef GUI<ControlShowFile, QShowFile, OkCancelPolicy, Qt2BC>
FileDialog;
typedef GUI<ControlFloat, QFloat, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
FloatDialog;
typedef GUI<ControlGraphics, QGraphics, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
GraphicsDialog;
typedef GUI<ControlInclude, QInclude, OkCancelReadOnlyPolicy, Qt2BC>
IncludeDialog;
typedef GUI<ControlIndex, QIndex, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
IndexDialog;
typedef GUI<ControlLog, QLog, OkCancelPolicy, Qt2BC>
LogFileDialog;
typedef GUI<ControlMinipage, QMinipage, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
MinipageDialog;
typedef GUI<ControlParagraph, QParagraph, OkApplyCancelReadOnlyPolicy, Qt2BC>
ParagraphDialog;
typedef GUI<ControlPreamble, QPreamble, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
PreambleDialog;
typedef GUI<ControlPrint, QPrint, OkApplyCancelPolicy, Qt2BC>
PrintDialog;
typedef GUI<ControlRef, QRef, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
RefDialog;
typedef GUI<ControlSearch, QSearch, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
SearchDialog;
typedef GUI<ControlSpellchecker, QSpellchecker, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
SpellcheckerDialog;
typedef GUI<ControlTabularCreate, QTabularCreate, OkApplyCancelReadOnlyPolicy, Qt2BC>
TabularCreateDialog;
typedef GUI<ControlTexinfo, QTexinfo, OkCancelPolicy, Qt2BC>
TexinfoDialog;
#ifdef HAVE_LIBAIKSAURUS
typedef GUI<ControlThesaurus, QThesaurus, OkApplyCancelReadOnlyPolicy, Qt2BC>
ThesaurusDialog;
#endif
typedef GUI<ControlToc, QToc, OkCancelPolicy, Qt2BC>
TocDialog;
typedef GUI<ControlUrl, QURL, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
UrlDialog;
typedef GUI<ControlVCLog, QVCLog, OkCancelPolicy, Qt2BC>
VCLogFileDialog;
struct Dialogs::Impl {
Impl(LyXView & lv, Dialogs & d);
AboutlyxDialog aboutlyx;
BibitemDialog bibitem;
BibtexDialog bibtex;
CharacterDialog character;
CitationDialog citation;
ErrorDialog error;
ERTDialog ert;
ExternalDialog external;
FileDialog file;
FloatDialog floats;
GraphicsDialog graphics;
IncludeDialog include;
IndexDialog index;
LogFileDialog logfile;
MinipageDialog minipage;
ParagraphDialog paragraph;
PreambleDialog preamble;
PrintDialog print;
RefDialog ref;
SearchDialog search;
SpellcheckerDialog spellchecker;
TabularCreateDialog tabularcreate;
TexinfoDialog texinfo;
#ifdef HAVE_LIBAIKSAURUS
ThesaurusDialog thesaurus;
#endif
TocDialog toc;
UrlDialog url;
VCLogFileDialog vclogfile;
};
#endif // DIALOGS_IMPL_H

View File

@ -19,6 +19,8 @@ include $(srcdir)/Makefile.dialogs
libqt2_la_SOURCES = \ libqt2_la_SOURCES = \
Alert_pimpl.C \ Alert_pimpl.C \
Dialogs.C \ Dialogs.C \
Dialogs2.C \
Dialogs_impl.h \
FileDialog.C \ FileDialog.C \
FileDialog_private.C \ FileDialog_private.C \
LyXKeySymFactory.C \ LyXKeySymFactory.C \
@ -52,7 +54,6 @@ libqt2_la_SOURCES = \
WorkAreaFactory.C \ WorkAreaFactory.C \
emptytable.C \ emptytable.C \
emptytable.h \ emptytable.h \
guiapi.C \
io_callback.h \ io_callback.h \
lengthcombo.C \ lengthcombo.C \
lengthcombo.h \ lengthcombo.h \

View File

@ -1,504 +0,0 @@
/**
* \file guiapi.C
* Copyright 2002 the LyX Team
* Read the file COPYING
*
* \author John Levon <moz@compsoc.man.ac.uk>
*/
#include <config.h>
#include "guiapi.h"
#include "QAbout.h"
#include "QAboutDialog.h"
#include "QBibitem.h"
#include "QBibitemDialog.h"
#include "QBibtex.h"
#include "QBibtexDialog.h"
#include "QCharacter.h"
#include "QCharacterDialog.h"
#include "QCitation.h"
#include "QCitationDialog.h"
//#include "QDocument.h"
#include "QError.h"
#include "QErrorDialog.h"
#include "QERT.h"
#include "QERTDialog.h"
#include "QExternal.h"
#include "QExternalDialog.h"
#include "QFloat.h"
#include "QFloatDialog.h"
//#include "QForks.h"
// Here would be an appropriate point to lecture on the evils
// of the Qt headers, those most fucked up of disgusting ratholes.
// But I won't.
#undef signals
#include "QGraphics.h"
#include "QGraphicsDialog.h"
#include "QInclude.h"
#include "QIncludeDialog.h"
#include "QIndex.h"
#include "QIndexDialog.h"
#include "QLog.h"
#include "QLogDialog.h"
#include "QMinipage.h"
#include "QMinipageDialog.h"
#include "QParagraph.h"
#include "QParagraphDialog.h"
#include "QPreamble.h"
#include "QPreambleDialog.h"
//#include "QPreferences.h"
#include "QPrint.h"
#include "QPrintDialog.h"
#include "QRef.h"
#include "QRefDialog.h"
#include "QSearch.h"
#include "QSearchDialog.h"
//#include "QSendto.h"
#include "QShowFile.h"
#include "QShowFileDialog.h"
#include "QSpellchecker.h"
#include "QSpellcheckerDialog.h"
//#include "QTabular.h"
#include "QTabularCreate.h"
#include "QTabularCreateDialog.h"
#include "QTexinfo.h"
#include "QTexinfoDialog.h"
#ifdef HAVE_LIBAIKSAURUS
#include "QThesaurus.h"
#include "QThesaurusDialog.h"
#endif
#include "QToc.h"
#include "QTocDialog.h"
#include "QURL.h"
#include "QURLDialog.h"
#include "QVCLog.h"
#include "QVCLogDialog.h"
#include "Qt2BC.h"
#include "controllers/GUI.h"
#include "insets/inseterror.h"
#include "LyXView.h"
#include "ControlAboutlyx.h"
#include "ControlBibitem.h"
#include "ControlBibtex.h"
#include "ControlCharacter.h"
#include "ControlCitation.h"
#include "ControlError.h"
#include "ControlERT.h"
#include "ControlExternal.h"
#include "ControlFloat.h"
#include "ControlForks.h"
#include "ControlGraphics.h"
#include "insets/insetgraphicsParams.h"
#include "ControlInclude.h"
#include "ControlIndex.h"
#include "ControlLog.h"
#include "ControlMinipage.h"
#include "ControlParagraph.h"
#include "ControlPreamble.h"
#include "ControlPrint.h"
#include "ControlRef.h"
#include "ControlSearch.h"
#include "ControlSendto.h"
#include "ControlShowFile.h"
#include "ControlSpellchecker.h"
#include "ControlTabularCreate.h"
#include "ControlTexinfo.h"
#include "ControlThesaurus.h"
#include "ControlToc.h"
#include "ControlUrl.h"
#include "ControlVCLog.h"
namespace { // anon
// I belive that this one is buggy (Lgb)
// But not if used correctly. (Lgb)
template <class T>
class GUISingleton {
public:
static
T & get(LyXView & lv, Dialogs & d) {
static T t(lv, d);
return t;
}
};
GUISingleton<GUI<ControlCharacter, QCharacter,
OkApplyCancelReadOnlyPolicy, Qt2BC> >
controlCharacterSingleton;
GUISingleton<GUI<ControlCitation, QCitation,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> >
controlCitationSingleton;
GUISingleton<GUI<ControlERT, QERT,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> >
controlERTSingleton;
GUISingleton<GUI<ControlIndex, QIndex,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> >
controlIndexSingleton;
GUISingleton<GUI<ControlMinipage, QMinipage,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> >
controlMinipageSingleton;
GUISingleton<GUI<ControlParagraph, QParagraph,
OkApplyCancelReadOnlyPolicy, Qt2BC> >
controlParagraphSingleton;
//GUISingleton<QPreferences> formPreferencesSingleton;
GUISingleton<GUI<ControlRef, QRef,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> >
controlRefSingleton;
//GUISingleton<QTabular> formTabularSingleton;
GUISingleton<GUI<ControlToc, QToc,
OkCancelPolicy, Qt2BC> >
controlTocSingleton;
GUISingleton<GUI<ControlUrl, QURL,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> >
controlUrlSingleton;
} // anon
extern "C" {
void gui_ShowAboutlyx(LyXView & lv, Dialogs & d)
{
static GUI<ControlAboutlyx, QAbout,
OkCancelPolicy, Qt2BC> cal(lv, d);
cal.controller().show();
}
void gui_ShowBibitem(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
static GUI<ControlBibitem, QBibitem,
OkCancelReadOnlyPolicy, Qt2BC> cbi(lv, d);
cbi.controller().showInset(ic);
}
void gui_ShowBibtex(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
static GUI<ControlBibtex, QBibtex,
OkCancelReadOnlyPolicy, Qt2BC> cbt(lv, d);
cbt.controller().showInset(ic);
}
void gui_ShowCharacter(LyXView & lv, Dialogs & d)
{
controlCharacterSingleton.get(lv, d).controller().show();
}
void gui_SetUserFreeFont(LyXView & lv, Dialogs & d)
{
controlCharacterSingleton.get(lv, d).controller().apply();
}
void gui_ShowCitation(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
controlCitationSingleton.get(lv, d).controller().showInset(ic);
}
void gui_CreateCitation(string const & s, LyXView & lv, Dialogs & d)
{
controlCitationSingleton.get(lv, d).controller().createInset(s);
}
void gui_ShowDocument(LyXView & lv, Dialogs & d)
{
//static QDocument fd(&lv, &d);
//fd.show();
}
void gui_ShowError(InsetError * ie, LyXView & lv, Dialogs & d)
{
static GUI<ControlError, QError,
OkCancelPolicy, Qt2BC> ce(lv, d);
ce.controller().showInset(ie);
}
void gui_ShowERT(InsetERT * ie, LyXView & lv, Dialogs & d)
{
controlERTSingleton.get(lv, d).controller().showInset(ie);
}
void gui_UpdateERT(InsetERT * ie, LyXView & lv, Dialogs & d)
{
controlERTSingleton.get(lv, d).controller().showInset(ie);
}
void gui_ShowExternal(InsetExternal * ie, LyXView & lv, Dialogs & d)
{
static GUI<ControlExternal, QExternal,
OkApplyCancelReadOnlyPolicy, Qt2BC> ce(lv, d);
ce.controller().showInset(ie);
}
void gui_ShowFile(string const & f, LyXView & lv, Dialogs & d)
{
static GUI<ControlShowFile, QShowFile,
OkCancelPolicy, Qt2BC> csf(lv, d);
csf.controller().showFile(f);
}
void gui_ShowFloat(InsetFloat * ifl, LyXView & lv, Dialogs & d)
{
static GUI<ControlFloat, QFloat,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> cf(lv, d);
cf.controller().showInset(ifl);
}
void gui_ShowForks(LyXView & lv, Dialogs & d)
{
#if 0
static GUI<ControlForks, QForks,
OkApplyCancelPolicy, Qt2BC> cf(lv, d);
cf.controller().show();
#endif
}
void gui_ShowGraphics(InsetGraphics * ig, LyXView & lv, Dialogs & d)
{
static GUI<ControlGraphics, QGraphics,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> cg(lv, d);
cg.controller().showInset(ig);
}
void gui_ShowInclude(InsetInclude * ii, LyXView & lv, Dialogs & d)
{
static GUI<ControlInclude, QInclude,
OkCancelReadOnlyPolicy, Qt2BC> ci(lv, d);
ci.controller().showInset(ii);
}
void gui_ShowIndex(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
controlIndexSingleton.get(lv, d).controller().showInset(ic);
}
void gui_CreateIndex(LyXView & lv, Dialogs & d)
{
controlIndexSingleton.get(lv, d).controller().createInset("");
}
#if 0
void gui_ShowInfo(InsetInfo *, LyXView & lv, Dialogs & d)
{
}
#endif
void gui_ShowLogFile(LyXView & lv, Dialogs & d)
{
static GUI<ControlLog, QLog,
OkCancelPolicy, Qt2BC> cl(lv, d);
cl.controller().show();
}
void gui_ShowMathPanel(LyXView & lv, Dialogs & d)
{
//static QMathsPanel fmp(&lv, &d);
//fmp.show();
}
void gui_ShowMinipage(InsetMinipage * im, LyXView & lv, Dialogs & d)
{
controlMinipageSingleton.get(lv, d).controller().showInset(im);
}
void gui_UpdateMinipage(InsetMinipage * im, LyXView & lv, Dialogs & d)
{
controlMinipageSingleton.get(lv, d).controller().showInset(im);
}
void gui_ShowParagraph(LyXView & lv, Dialogs & d)
{
controlParagraphSingleton.get(lv, d).controller().show();
#if 0
static GUI<ControlParagraph, QParagraph,
OkApplyCancelReadOnlyPolicy, Qt2BC> cp(lv, d);
cp.controller().show();
#endif
}
#if 0
void gui_UpdateParagraph(LyXView & lv, Dialogs & d)
{
#warning FIXME!
// This should be the same object as in gui_ShowParagraph
static GUI<ControlParagraph, QParagraph,
OkApplyCancelReadOnlyPolicy, Qt2BC> cp(lv, d);
#if 0
cp.
#endif
}
#endif
void gui_ShowPreamble(LyXView & lv, Dialogs & d)
{
static GUI<ControlPreamble, QPreamble,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> cp(lv, d);
cp.controller().show();
}
void gui_ShowPreferences(LyXView & lv, Dialogs & d)
{
//formPreferencesSingleton.get(lv, d).show();
}
void gui_ShowPrint(LyXView & lv, Dialogs & d)
{
static GUI<ControlPrint, QPrint,
OkApplyCancelPolicy, Qt2BC> cp(lv, d);
cp.controller().show();
}
void gui_ShowRef(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
controlRefSingleton.get(lv, d).controller().showInset(ic);
}
void gui_CreateRef(string const & s, LyXView & lv, Dialogs & d)
{
controlRefSingleton.get(lv, d).controller().createInset(s);
}
void gui_ShowSearch(LyXView & lv, Dialogs & d)
{
static GUI<ControlSearch, QSearch,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> cs(lv, d);
cs.controller().show();
}
void gui_ShowSendto(LyXView & lv, Dialogs & d)
{
#if 0
static GUI<ControlSendto, QSendto,
OkApplyCancelPolicy, Qt2BC> cs(lv, d);
cs.show();
#endif
}
void gui_ShowSpellchecker(LyXView & lv, Dialogs & d)
{
static GUI<ControlSpellchecker, QSpellchecker,
NoRepeatedApplyReadOnlyPolicy, Qt2BC> cp(lv, d);
cp.controller().show();
}
void gui_ShowTabular(InsetTabular * it, LyXView & lv, Dialogs & d)
{
//formTabularSingleton.get(lv, d).showInset(it);
}
void gui_UpdateTabular(InsetTabular * it, LyXView & lv, Dialogs & d)
{
//formTabularSingleton.get(lv, d).updateInset(it);
}
void gui_ShowTabularCreate(LyXView & lv, Dialogs & d)
{
static GUI<ControlTabularCreate, QTabularCreate,
OkApplyCancelReadOnlyPolicy, Qt2BC> ctc(lv, d);
ctc.controller().show();
}
void gui_ShowTexinfo(LyXView & lv, Dialogs & d)
{
static GUI<ControlTexinfo, QTexinfo,
OkCancelPolicy, Qt2BC> ct(lv, d);
ct.controller().show();
}
void gui_ShowThesaurus(string const & s, LyXView & lv, Dialogs & d)
{
#ifdef HAVE_LIBAIKSAURUS
static GUI<ControlThesaurus, QThesaurus,
OkApplyCancelReadOnlyPolicy, Qt2BC> ct(lv, d);
ct.controller().showEntry(s);
#endif
}
void gui_ShowTOC(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
controlTocSingleton.get(lv, d).controller().showInset(ic);
}
void gui_CreateTOC(string const & s, LyXView & lv, Dialogs & d)
{
controlTocSingleton.get(lv, d).controller().createInset(s);
}
void gui_ShowUrl(InsetCommand * ic, LyXView & lv, Dialogs & d)
{
controlUrlSingleton.get(lv, d).controller().showInset(ic);
}
void gui_CreateUrl(string const & s, LyXView & lv, Dialogs & d)
{
controlUrlSingleton.get(lv, d).controller().createInset(s);
}
void gui_ShowVCLogFile(LyXView & lv, Dialogs & d)
{
static GUI<ControlVCLog, QVCLog,
OkCancelPolicy, Qt2BC> cv(lv, d);
cv.controller().show();
}
} // extern "C"