mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
The dialogs/guiapi re-working.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5003 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7feb18698e
commit
0cfafddc7d
@ -1,3 +1,12 @@
|
||||
2002-08-15 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* Dialogs.[Ch]:
|
||||
* guiapi.[Ch]: the brave new world of Dialog creation.
|
||||
|
||||
* LyXView.C: associated change.
|
||||
|
||||
* Makefile.am: add new file guiapi.C.
|
||||
|
||||
2002-08-13 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* DialogBase.h: removed.
|
||||
|
@ -1,17 +1,10 @@
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright 1995 Matthias Ettrich
|
||||
* Copyright 1995-2001 The LyX Team.
|
||||
*
|
||||
* ======================================================
|
||||
*
|
||||
/**
|
||||
* \file Dialogs.C
|
||||
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
||||
* Copyright 1995-2002 The LyX Team.
|
||||
* See the file COPYING.
|
||||
* \author Angus Leeming <leeming@lyx.org>
|
||||
*
|
||||
* Methods common to all frontends' Dialogs that should not be inline
|
||||
* Common to all frontends' Dialogs
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
@ -22,274 +15,28 @@
|
||||
|
||||
#include "Dialogs.h"
|
||||
|
||||
#include "support/LAssert.h"
|
||||
// Note that static boost signals break some compilers, so this wrapper
|
||||
// initialises the signal dynamically when it is first invoked.
|
||||
template<typename Signal>
|
||||
class BugfixSignal {
|
||||
public:
|
||||
Signal & operator()() { return thesignal(); }
|
||||
Signal const & operator()() const { return thesignal(); }
|
||||
|
||||
#include "guiapi.h"
|
||||
private:
|
||||
Signal & thesignal() const
|
||||
{
|
||||
if (!signal_.get())
|
||||
signal_.reset(new Signal);
|
||||
return *signal_;
|
||||
}
|
||||
|
||||
// Signal enabling all visible dialogs to be redrawn if so desired.
|
||||
// E.g., when the GUI colours have been remapped.
|
||||
//boost::signal0<void> Dialogs::redrawGUI;
|
||||
|
||||
extern LyXView * dialogs_lyxview;
|
||||
mutable boost::scoped_ptr<Signal> signal_;
|
||||
};
|
||||
|
||||
|
||||
// toggle tooltips on/off in all dialogs.
|
||||
//boost::signal0<void> Dialogs::toggleTooltips;
|
||||
|
||||
void Dialogs::showAboutlyx()
|
||||
boost::signal0<void> & Dialogs::redrawGUI()
|
||||
{
|
||||
gui_ShowAboutlyx(*dialogs_lyxview, *this);
|
||||
static BugfixSignal<boost::signal0<void> > thesignal;
|
||||
return thesignal();
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showBibitem(InsetCommand * ic)
|
||||
{
|
||||
gui_ShowBibitem(ic, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showBibtex(InsetCommand * ic)
|
||||
{
|
||||
gui_ShowBibtex(ic, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showCharacter()
|
||||
{
|
||||
gui_ShowCharacter(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::setUserFreeFont()
|
||||
{
|
||||
gui_SetUserFreeFont(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showCitation(InsetCommand * ic)
|
||||
{
|
||||
gui_ShowCitation(ic, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::createCitation(string const & s)
|
||||
{
|
||||
gui_CreateCitation(s, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showDocument()
|
||||
{
|
||||
gui_ShowDocument(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showError(InsetError * ie)
|
||||
{
|
||||
gui_ShowError(ie, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showERT(InsetERT * ie)
|
||||
{
|
||||
gui_ShowERT(ie, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::updateERT(InsetERT * ie)
|
||||
{
|
||||
gui_UpdateERT(ie, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showExternal(InsetExternal * ie)
|
||||
{
|
||||
gui_ShowExternal(ie, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showFile(string const & f)
|
||||
{
|
||||
gui_ShowFile(f, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showFloat(InsetFloat * ifl)
|
||||
{
|
||||
gui_ShowFloat(ifl, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showForks()
|
||||
{
|
||||
gui_ShowForks(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showGraphics(InsetGraphics * ig)
|
||||
{
|
||||
gui_ShowGraphics(ig, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showInclude(InsetInclude * ii)
|
||||
{
|
||||
gui_ShowInclude(ii, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showIndex(InsetCommand * ic)
|
||||
{
|
||||
gui_ShowIndex(ic, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::createIndex()
|
||||
{
|
||||
gui_CreateIndex(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showLogFile()
|
||||
{
|
||||
gui_ShowLogFile(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showMathPanel()
|
||||
{
|
||||
gui_ShowMathPanel(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showMinipage(InsetMinipage * im)
|
||||
{
|
||||
gui_ShowMinipage(im, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::updateMinipage(InsetMinipage * im)
|
||||
{
|
||||
gui_UpdateMinipage(im, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showParagraph()
|
||||
{
|
||||
gui_ShowParagraph(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showPreamble()
|
||||
{
|
||||
gui_ShowPreamble(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showPreferences()
|
||||
{
|
||||
gui_ShowPreferences(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showPrint()
|
||||
{
|
||||
gui_ShowPrint(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showRef(InsetCommand * ic)
|
||||
{
|
||||
gui_ShowRef(ic, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::createRef(string const & s)
|
||||
{
|
||||
gui_CreateRef(s, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showSearch()
|
||||
{
|
||||
gui_ShowSearch(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showSendto()
|
||||
{
|
||||
gui_ShowSendto(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showSpellchecker()
|
||||
{
|
||||
gui_ShowSpellchecker(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showTabular(InsetTabular * it)
|
||||
{
|
||||
gui_ShowTabular(it, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::updateTabular(InsetTabular * it)
|
||||
{
|
||||
gui_UpdateTabular(it, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showTabularCreate()
|
||||
{
|
||||
gui_ShowTabularCreate(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showThesaurus(string const & s)
|
||||
{
|
||||
gui_ShowThesaurus(s, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showTexinfo()
|
||||
{
|
||||
gui_ShowTexinfo(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showTOC(InsetCommand * ic)
|
||||
{
|
||||
gui_ShowTOC(ic, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::createTOC(string const & s)
|
||||
{
|
||||
gui_CreateTOC(s, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showUrl(InsetCommand * ic)
|
||||
{
|
||||
gui_ShowUrl(ic, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::createUrl(string const & s)
|
||||
{
|
||||
gui_CreateUrl(s, *dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showVCLogFile()
|
||||
{
|
||||
gui_ShowVCLogFile(*dialogs_lyxview, *this);
|
||||
}
|
||||
|
||||
|
||||
//void Dialogs::add(DialogBase * ptr)
|
||||
//{
|
||||
// lyx::Assert(ptr);
|
||||
// dialogs_.push_back(db_ptr(ptr));
|
||||
//}
|
||||
|
@ -16,13 +16,11 @@
|
||||
#include "LString.h"
|
||||
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/signals/signal0.hpp>
|
||||
#include <boost/signals/signal1.hpp>
|
||||
|
||||
// Maybe this should be a UIFunc modelled on LyXFunc
|
||||
class LyXView;
|
||||
|
||||
class InsetBibKey;
|
||||
class InsetBibtex;
|
||||
class InsetCommand;
|
||||
@ -45,16 +43,20 @@ class Dialogs : boost::noncopyable
|
||||
{
|
||||
public:
|
||||
///
|
||||
typedef boost::shared_ptr<boost::noncopyable> db_ptr;
|
||||
///
|
||||
Dialogs(LyXView *);
|
||||
Dialogs(LyXView &);
|
||||
/// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
|
||||
~Dialogs();
|
||||
|
||||
/** Redraw all visible dialogs because, for example, the GUI colours
|
||||
have been re-mapped. */
|
||||
boost::signal0<void> redrawGUI;
|
||||
* have been re-mapped.
|
||||
*
|
||||
* Note that static boost signals break some compilers, so we return a
|
||||
* reference to some hidden magic ;-)
|
||||
*/
|
||||
static boost::signal0<void> & redrawGUI();
|
||||
|
||||
/// Toggle tooltips on/off in all dialogs.
|
||||
boost::signal0<void> toggleTooltips;
|
||||
static void toggleTooltips();
|
||||
|
||||
/// Are the tooltips on or off?
|
||||
static bool tooltipsEnabled();
|
||||
@ -126,7 +128,7 @@ public:
|
||||
///
|
||||
void showParagraph();
|
||||
///
|
||||
boost::signal0<void> updateParagraph;
|
||||
void updateParagraph();
|
||||
///
|
||||
void showPreamble();
|
||||
///
|
||||
@ -164,6 +166,12 @@ public:
|
||||
/// show the version control log
|
||||
void showVCLogFile();
|
||||
//@}
|
||||
|
||||
private:
|
||||
/// Use the Pimpl idiom to hide the internals.
|
||||
class Impl;
|
||||
/// The pointer never changes although *pimpl_'s contents may.
|
||||
boost::scoped_ptr<Impl> const pimpl_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -49,8 +49,8 @@ LyXView::LyXView()
|
||||
: intl_(new Intl),
|
||||
autosave_timeout_(new Timeout(5000)),
|
||||
lyxfunc_(new LyXFunc(this)),
|
||||
dialogs_(new Dialogs(this)),
|
||||
controlcommand_(new ControlCommandBuffer(getLyXFunc()))
|
||||
dialogs_(new Dialogs(*this)),
|
||||
controlcommand_(new ControlCommandBuffer(getLyXFunc()))
|
||||
{
|
||||
lyxerr[Debug::INIT] << "Initializing LyXFunc" << endl;
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ libfrontends_la_SOURCES = \
|
||||
WorkAreaFactory.h \
|
||||
font_metrics.h \
|
||||
guiapi.h \
|
||||
guiapi.C \
|
||||
key_state.h \
|
||||
lyx_gui.h \
|
||||
mouse_state.h \
|
||||
|
@ -1,3 +1,9 @@
|
||||
2002-08-15 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* ControlConnections.C: Dialogs::redrawGUI is now a method not a signal.
|
||||
|
||||
* ControlParagraph.C: no longer bind to Dailogs::updateParagraph.
|
||||
|
||||
2002-08-15 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* lots: changed my email address to leeming@lyx.org.
|
||||
|
@ -8,7 +8,7 @@
|
||||
* ======================================================
|
||||
*
|
||||
* \file ControlConnections.C
|
||||
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
||||
* \author Angus Leeming <leeming@lyx.org>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
@ -36,7 +36,7 @@ ControlConnectBase::ControlConnectBase(LyXView & lv, Dialogs & d)
|
||||
|
||||
void ControlConnectBase::connect()
|
||||
{
|
||||
r_ = d_.redrawGUI.
|
||||
r_ = d_.redrawGUI().
|
||||
connect(boost::bind(&ControlConnectBase::redraw, this));
|
||||
}
|
||||
|
||||
|
@ -24,22 +24,16 @@
|
||||
#include "lyxtext.h"
|
||||
#include "ParagraphParameters.h"
|
||||
|
||||
#include "frontends/Dialogs.h"
|
||||
#include "frontends/Liason.h"
|
||||
|
||||
#include "support/LAssert.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using Liason::setMinibuffer;
|
||||
|
||||
|
||||
ControlParagraph::ControlParagraph(LyXView & lv, Dialogs & d)
|
||||
: ControlDialogBD(lv, d), pp_(0), ininset_(false)
|
||||
{
|
||||
d_.updateParagraph.connect(
|
||||
boost::bind(&ControlParagraph::changedParagraph, this));
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
ControlParagraph::~ControlParagraph()
|
||||
|
@ -48,5 +48,4 @@ GUI<Controller, GUIview, Policy, GUIbc>::GUI(LyXView & lv, Dialogs & d)
|
||||
view_.setController(controller_);
|
||||
}
|
||||
|
||||
|
||||
#endif // GUI_H
|
||||
|
@ -0,0 +1,278 @@
|
||||
/**
|
||||
* \file guiapi.C
|
||||
* Copyright 2002 The LyX Team.
|
||||
* See the file COPYING.
|
||||
*
|
||||
* \author Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
* \author Angus Leeming <leeming@lyx.org>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "guiapi.h"
|
||||
#include "Dialogs.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
void gui_ShowAboutlyx(Dialogs & d)
|
||||
{
|
||||
d.showAboutlyx();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowBibitem(InsetCommand * ic, Dialogs & d)
|
||||
{
|
||||
d.showBibitem(ic);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowBibtex(InsetCommand * ic, Dialogs & d)
|
||||
{
|
||||
d.showBibtex(ic);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowCharacter(Dialogs & d)
|
||||
{
|
||||
d.showCharacter();
|
||||
}
|
||||
|
||||
|
||||
void gui_SetUserFreeFont(Dialogs & d)
|
||||
{
|
||||
d.setUserFreeFont();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowCitation(InsetCommand * ic, Dialogs & d)
|
||||
{
|
||||
d.showCitation(ic);
|
||||
}
|
||||
|
||||
|
||||
void gui_CreateCitation(string const & s, Dialogs & d)
|
||||
{
|
||||
d.createCitation(s);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowDocument(Dialogs & d)
|
||||
{
|
||||
d.showDocument();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowError(InsetError * ie, Dialogs & d)
|
||||
{
|
||||
d.showError(ie);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowERT(InsetERT * ie, Dialogs & d)
|
||||
{
|
||||
d.showERT(ie);
|
||||
}
|
||||
|
||||
|
||||
void gui_UpdateERT(InsetERT * ie, Dialogs & d)
|
||||
{
|
||||
d.updateERT(ie);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowExternal(InsetExternal * ie, Dialogs & d)
|
||||
{
|
||||
d.showExternal(ie);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowFile(string const & f, Dialogs & d)
|
||||
{
|
||||
d.showFile(f);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowFloat(InsetFloat * ifl, Dialogs & d)
|
||||
{
|
||||
d.showFloat(ifl);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowForks(Dialogs & d)
|
||||
{
|
||||
d.showForks();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowGraphics(InsetGraphics * ig, Dialogs & d)
|
||||
{
|
||||
d.showGraphics(ig);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowInclude(InsetInclude * ii, Dialogs & d)
|
||||
{
|
||||
d.showInclude(ii);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowIndex(InsetCommand * ic, Dialogs & d)
|
||||
{
|
||||
d.showIndex(ic);
|
||||
}
|
||||
|
||||
|
||||
void gui_CreateIndex(Dialogs & d)
|
||||
{
|
||||
d.createIndex();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowLogFile(Dialogs & d)
|
||||
{
|
||||
d.showLogFile();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowMathPanel(Dialogs & d)
|
||||
{
|
||||
d.showMathPanel();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowMinipage(InsetMinipage * im, Dialogs & d)
|
||||
{
|
||||
d.showMinipage(im);
|
||||
}
|
||||
|
||||
|
||||
void gui_UpdateMinipage(InsetMinipage * im, Dialogs & d)
|
||||
{
|
||||
d.updateMinipage(im);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowParagraph(Dialogs & d)
|
||||
{
|
||||
d.showParagraph();
|
||||
}
|
||||
|
||||
|
||||
void gui_UpdateParagraph(Dialogs & d)
|
||||
{
|
||||
d.updateParagraph();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowPreamble(Dialogs & d)
|
||||
{
|
||||
d.showPreamble();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowPreferences(Dialogs & d)
|
||||
{
|
||||
d.showPreferences();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowPrint(Dialogs & d)
|
||||
{
|
||||
d.showPrint();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowRef(InsetCommand * ic, Dialogs & d)
|
||||
{
|
||||
d.showRef(ic);
|
||||
}
|
||||
|
||||
|
||||
void gui_CreateRef(string const & s, Dialogs & d)
|
||||
{
|
||||
d.createRef(s);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowSearch(Dialogs & d)
|
||||
{
|
||||
d.showSearch();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowSendto(Dialogs & d)
|
||||
{
|
||||
d.showSendto();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowSpellchecker(Dialogs & d)
|
||||
{
|
||||
d.showSpellchecker();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowTabular(InsetTabular * it, Dialogs & d)
|
||||
{
|
||||
d.showTabular(it);
|
||||
}
|
||||
|
||||
|
||||
void gui_UpdateTabular(InsetTabular * it, Dialogs & d)
|
||||
{
|
||||
d.updateTabular(it);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowTabularCreate(Dialogs & d)
|
||||
{
|
||||
d.showTabularCreate();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowTexinfo(Dialogs & d)
|
||||
{
|
||||
d.showTexinfo();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowThesaurus(string const & s, Dialogs & d)
|
||||
{
|
||||
d.showThesaurus(s);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowTOC(InsetCommand * ic, Dialogs & d)
|
||||
{
|
||||
d.showTOC(ic);
|
||||
}
|
||||
|
||||
|
||||
void gui_CreateTOC(string const & s, Dialogs & d)
|
||||
{
|
||||
d.createTOC(s);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowUrl(InsetCommand * ic, Dialogs & d)
|
||||
{
|
||||
d.showUrl(ic);
|
||||
}
|
||||
|
||||
|
||||
void gui_CreateUrl(string const & s, Dialogs & d)
|
||||
{
|
||||
d.createUrl(s);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowVCLogFile(Dialogs & d)
|
||||
{
|
||||
d.showVCLogFile();
|
||||
}
|
||||
|
||||
} // extern "C"
|
@ -1,8 +1,21 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file guiapi.h
|
||||
* Copyright 2002 The LyX Team.
|
||||
* See the file COPYING.
|
||||
*
|
||||
* \author Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
*/
|
||||
|
||||
#ifndef GUIAPI_H
|
||||
#define GUIAPI_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
class LyXView;
|
||||
class Dialogs;
|
||||
class InsetCommand;
|
||||
class InsetError;
|
||||
@ -16,48 +29,50 @@ class InsetTabular;
|
||||
|
||||
extern "C" {
|
||||
|
||||
void gui_ShowAboutlyx(LyXView &, Dialogs &);
|
||||
void gui_ShowBibitem(InsetCommand * ic, LyXView & lv, Dialogs & d);
|
||||
void gui_ShowBibtex(InsetCommand * ic, LyXView & lv, Dialogs & d);
|
||||
void gui_ShowCharacter(LyXView & lv, Dialogs & d);
|
||||
void gui_SetUserFreeFont(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowCitation(InsetCommand * ic, LyXView & lv, Dialogs & d);
|
||||
void gui_CreateCitation(string const &, LyXView & lv, Dialogs & d);
|
||||
void gui_ShowDocument(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowError(InsetError * ie, LyXView & lv, Dialogs & d);
|
||||
void gui_ShowERT(InsetERT * ie, LyXView & lv, Dialogs & d);
|
||||
void gui_UpdateERT(InsetERT * ie, LyXView & lv, Dialogs & d);
|
||||
void gui_ShowExternal(InsetExternal * ie, LyXView & lv, Dialogs & d);
|
||||
void gui_ShowFile(string const & f, LyXView & lv, Dialogs & d);
|
||||
void gui_ShowFloat(InsetFloat *, LyXView & lv, Dialogs &);
|
||||
void gui_ShowForks(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowGraphics(InsetGraphics *, LyXView & lv, Dialogs & d);
|
||||
void gui_ShowInclude(InsetInclude *, LyXView & lv, Dialogs & d);
|
||||
void gui_ShowIndex(InsetCommand *, LyXView & lv, Dialogs & d);
|
||||
void gui_CreateIndex(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowLogFile(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowMathPanel(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowMinipage(InsetMinipage *, LyXView & lv, Dialogs & d);
|
||||
void gui_UpdateMinipage(InsetMinipage *, LyXView & lv, Dialogs & d);
|
||||
void gui_ShowParagraph(LyXView & lv, Dialogs & d);
|
||||
void gui_UpdateParagraph(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowPreamble(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowPreferences(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowPrint(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowRef(InsetCommand *, LyXView &, Dialogs &);
|
||||
void gui_CreateRef(string const &, LyXView &, Dialogs &);
|
||||
void gui_ShowSearch(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowSendto(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowSpellchecker(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowTabular(InsetTabular *, LyXView &, Dialogs &);
|
||||
void gui_UpdateTabular(InsetTabular *, LyXView &, Dialogs &);
|
||||
void gui_ShowTabularCreate(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowTexinfo(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowThesaurus(string const &, LyXView &, Dialogs &);
|
||||
void gui_ShowTOC(InsetCommand *, LyXView &, Dialogs &);
|
||||
void gui_CreateTOC(string const &, LyXView &, Dialogs &);
|
||||
void gui_ShowUrl(InsetCommand *, LyXView &, Dialogs &);
|
||||
void gui_CreateUrl(string const &, LyXView &, Dialogs &);
|
||||
void gui_ShowVCLogFile(LyXView & lv, Dialogs & d);
|
||||
void gui_ShowAboutlyx(Dialogs &);
|
||||
void gui_ShowBibitem(InsetCommand *, Dialogs &);
|
||||
void gui_ShowBibtex(InsetCommand *, Dialogs &);
|
||||
void gui_ShowCharacter(Dialogs &);
|
||||
void gui_SetUserFreeFont(Dialogs &);
|
||||
void gui_ShowCitation(InsetCommand *, Dialogs &);
|
||||
void gui_CreateCitation(string const &, Dialogs &);
|
||||
void gui_ShowDocument(Dialogs &);
|
||||
void gui_ShowError(InsetError *, Dialogs &);
|
||||
void gui_ShowERT(InsetERT *, Dialogs &);
|
||||
void gui_UpdateERT(InsetERT *, Dialogs &);
|
||||
void gui_ShowExternal(InsetExternal *, Dialogs &);
|
||||
void gui_ShowFile(string const &, Dialogs &);
|
||||
void gui_ShowFloat(InsetFloat *, Dialogs &);
|
||||
void gui_ShowForks(Dialogs &);
|
||||
void gui_ShowGraphics(InsetGraphics *, Dialogs &);
|
||||
void gui_ShowInclude(InsetInclude *, Dialogs &);
|
||||
void gui_ShowIndex(InsetCommand *, Dialogs &);
|
||||
void gui_CreateIndex(Dialogs &);
|
||||
void gui_ShowLogFile(Dialogs &);
|
||||
void gui_ShowMathPanel(Dialogs &);
|
||||
void gui_ShowMinipage(InsetMinipage *, Dialogs &);
|
||||
void gui_UpdateMinipage(InsetMinipage *, Dialogs &);
|
||||
void gui_ShowParagraph(Dialogs &);
|
||||
void gui_UpdateParagraph(Dialogs &);
|
||||
void gui_ShowPreamble(Dialogs &);
|
||||
void gui_ShowPreferences(Dialogs &);
|
||||
void gui_ShowPrint(Dialogs &);
|
||||
void gui_ShowRef(InsetCommand *, Dialogs &);
|
||||
void gui_CreateRef(string const &, Dialogs &);
|
||||
void gui_ShowSearch(Dialogs &);
|
||||
void gui_ShowSendto(Dialogs &);
|
||||
void gui_ShowSpellchecker(Dialogs &);
|
||||
void gui_ShowTabular(InsetTabular *, Dialogs &);
|
||||
void gui_UpdateTabular(InsetTabular *, Dialogs &);
|
||||
void gui_ShowTabularCreate(Dialogs &);
|
||||
void gui_ShowTexinfo(Dialogs &);
|
||||
void gui_ShowThesaurus(string const &, Dialogs &);
|
||||
void gui_ShowTOC(InsetCommand *, Dialogs &);
|
||||
void gui_CreateTOC(string const &, Dialogs &);
|
||||
void gui_ShowUrl(InsetCommand *, Dialogs &);
|
||||
void gui_CreateUrl(string const &, Dialogs &);
|
||||
void gui_ShowVCLogFile(Dialogs &);
|
||||
|
||||
} // extern "C"
|
||||
|
||||
#endif // GUIAPI_H
|
||||
|
@ -1,3 +1,19 @@
|
||||
2002-08-15 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* Dialogs.C:
|
||||
* Dialogs2.C
|
||||
* Dialogs3.C
|
||||
* Dialogs_impl.h: the brave new world of Dialog creation.
|
||||
|
||||
* FormBaseDeprecated.C:
|
||||
* FormFiledialog.C:
|
||||
* XFormsView.C: Dialogs::redrawGUI is now a method not a signal.
|
||||
|
||||
* guiapi.C: discard.
|
||||
|
||||
* Makefile.am: add new files Dialogs[23].C Dialogs_impl.h and
|
||||
remove guiapi.C.
|
||||
|
||||
2002-08-15 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* lots: changed my email address to leeming@lyx.org.
|
||||
|
@ -5,6 +5,7 @@
|
||||
* See the file COPYING.
|
||||
*
|
||||
* \author Allan Rae, rae@lyx.org
|
||||
* \author Angus Leeming <leeming@lyx.org>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
@ -13,12 +14,177 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "Dialogs.h"
|
||||
#include "Dialogs_impl.h"
|
||||
|
||||
#include "Tooltips.h"
|
||||
#include "xformsBC.h"
|
||||
#include "combox.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include "ControlAboutlyx.h"
|
||||
#include "FormAboutlyx.h"
|
||||
#include "forms/form_aboutlyx.h"
|
||||
|
||||
LyXView * dialogs_lyxview;
|
||||
#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::Dialogs(LyXView & lv)
|
||||
: pimpl_(new Impl(lv, *this))
|
||||
{
|
||||
// reduce the number of connections needed in
|
||||
// dialogs by a simple connection here.
|
||||
hideAll.connect(hideBufferDependent);
|
||||
}
|
||||
|
||||
|
||||
Dialogs::~Dialogs()
|
||||
{}
|
||||
|
||||
|
||||
void Dialogs::toggleTooltips()
|
||||
{
|
||||
Tooltips::toggleEnabled();
|
||||
}
|
||||
|
||||
|
||||
/// Are the tooltips on or off?
|
||||
@ -26,15 +192,3 @@ bool Dialogs::tooltipsEnabled()
|
||||
{
|
||||
return Tooltips::enabled();
|
||||
}
|
||||
|
||||
|
||||
Dialogs::Dialogs(LyXView * lv)
|
||||
{
|
||||
#if 1
|
||||
dialogs_lyxview = lv;
|
||||
#endif
|
||||
toggleTooltips.connect(boost::bind(&Tooltips::toggleEnabled));
|
||||
// reduce the number of connections needed in
|
||||
// dialogs by a simple connection here.
|
||||
hideAll.connect(hideBufferDependent);
|
||||
}
|
||||
|
203
src/frontends/xforms/Dialogs2.C
Normal file
203
src/frontends/xforms/Dialogs2.C
Normal file
@ -0,0 +1,203 @@
|
||||
/**
|
||||
* \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"
|
||||
|
||||
#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();
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showBibitem(InsetCommand * ic)
|
||||
{
|
||||
pimpl_->dialog(pimpl_->bibitem).controller().showInset(ic);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showBibtex(InsetCommand * ic)
|
||||
{
|
||||
pimpl_->dialog(pimpl_->bibtex).controller().showInset(ic);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showCharacter()
|
||||
{
|
||||
pimpl_->dialog(pimpl_->character).controller().show();
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::setUserFreeFont()
|
||||
{
|
||||
pimpl_->dialog(pimpl_->character).controller().apply();
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showCitation(InsetCommand * ic)
|
||||
{
|
||||
pimpl_->dialog(pimpl_->citation).controller().showInset(ic);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::createCitation(string const & s)
|
||||
{
|
||||
pimpl_->dialog(pimpl_->citation).controller().createInset(s);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showDocument()
|
||||
{
|
||||
pimpl_->dialog(pimpl_->document).show();
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showError(InsetError * ie)
|
||||
{
|
||||
pimpl_->dialog(pimpl_->error).controller().showInset(ie);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showERT(InsetERT * ie)
|
||||
{
|
||||
pimpl_->dialog(pimpl_->ert).controller().showInset(ie);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::updateERT(InsetERT * ie)
|
||||
{
|
||||
pimpl_->dialog(pimpl_->ert).controller().showInset(ie);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showExternal(InsetExternal * ie)
|
||||
{
|
||||
pimpl_->dialog(pimpl_->external).controller().showInset(ie);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showFile(string const & f)
|
||||
{
|
||||
pimpl_->dialog(pimpl_->file).controller().showFile(f);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showFloat(InsetFloat * ifl)
|
||||
{
|
||||
pimpl_->dialog(pimpl_->floats).controller().showInset(ifl);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showForks()
|
||||
{
|
||||
pimpl_->dialog(pimpl_->forks).controller().show();
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showGraphics(InsetGraphics * ig)
|
||||
{
|
||||
pimpl_->dialog(pimpl_->graphics).controller().showInset(ig);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showInclude(InsetInclude * ii)
|
||||
{
|
||||
pimpl_->dialog(pimpl_->include).controller().showInset(ii);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showIndex(InsetCommand * ic)
|
||||
{
|
||||
pimpl_->dialog(pimpl_->index).controller().showInset(ic);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::createIndex()
|
||||
{
|
||||
pimpl_->dialog(pimpl_->index).controller().createInset(string());
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::showLogFile()
|
||||
{
|
||||
pimpl_->dialog(pimpl_->logfile).controller().show();
|
||||
}
|
253
src/frontends/xforms/Dialogs3.C
Normal file
253
src/frontends/xforms/Dialogs3.C
Normal file
@ -0,0 +1,253 @@
|
||||
/**
|
||||
* \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 <leeming@lyx.org>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#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();
|
||||
}
|
258
src/frontends/xforms/Dialogs_impl.h
Normal file
258
src/frontends/xforms/Dialogs_impl.h
Normal file
@ -0,0 +1,258 @@
|
||||
// -*- 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 "GUI.h"
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
#ifdef HAVE_LIBAIKSAURUS
|
||||
class ControlThesaurus;
|
||||
class FormThesaurus;
|
||||
#endif
|
||||
|
||||
class OkCancelPolicy;
|
||||
class OkApplyCancelPolicy;
|
||||
class OkCancelReadOnlyPolicy;
|
||||
class OkApplyCancelReadOnlyPolicy;
|
||||
class NoRepeatedApplyReadOnlyPolicy;
|
||||
class xformsBC;
|
||||
|
||||
|
||||
typedef GUI<ControlAboutlyx, FormAboutlyx, OkCancelPolicy, xformsBC>
|
||||
AboutlyxDialog;
|
||||
|
||||
typedef GUI<ControlBibitem, FormBibitem, OkCancelReadOnlyPolicy, xformsBC>
|
||||
BibitemDialog;
|
||||
|
||||
typedef GUI<ControlBibtex, FormBibtex, OkCancelReadOnlyPolicy, xformsBC>
|
||||
BibtexDialog;
|
||||
|
||||
typedef GUI<ControlCharacter, FormCharacter,
|
||||
OkApplyCancelReadOnlyPolicy, xformsBC>
|
||||
CharacterDialog;
|
||||
|
||||
typedef GUI<ControlCitation, FormCitation,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC>
|
||||
CitationDialog;
|
||||
|
||||
typedef FormDocument DocumentDialog;
|
||||
|
||||
typedef GUI<ControlError, FormError, OkCancelPolicy, xformsBC>
|
||||
ErrorDialog;
|
||||
|
||||
typedef GUI<ControlERT, FormERT, NoRepeatedApplyReadOnlyPolicy, xformsBC>
|
||||
ERTDialog;
|
||||
|
||||
typedef GUI<ControlExternal, FormExternal,
|
||||
OkApplyCancelReadOnlyPolicy, xformsBC>
|
||||
ExternalDialog;
|
||||
|
||||
typedef GUI<ControlShowFile, FormShowFile, OkCancelPolicy, xformsBC>
|
||||
FileDialog;
|
||||
|
||||
typedef GUI<ControlFloat, FormFloat, NoRepeatedApplyReadOnlyPolicy, xformsBC>
|
||||
FloatDialog;
|
||||
|
||||
typedef GUI<ControlForks, FormForks, OkApplyCancelPolicy, xformsBC>
|
||||
ForksDialog;
|
||||
|
||||
typedef GUI<ControlGraphics, FormGraphics,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC>
|
||||
GraphicsDialog;
|
||||
|
||||
typedef GUI<ControlInclude, FormInclude, OkCancelReadOnlyPolicy, xformsBC>
|
||||
IncludeDialog;
|
||||
|
||||
typedef GUI<ControlIndex, FormIndex, NoRepeatedApplyReadOnlyPolicy, xformsBC>
|
||||
IndexDialog;
|
||||
|
||||
typedef GUI<ControlLog, FormLog, OkCancelPolicy, xformsBC>
|
||||
LogFileDialog;
|
||||
|
||||
typedef FormMathsPanel MathPanelDialog;
|
||||
|
||||
typedef GUI<ControlMinipage, FormMinipage,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC>
|
||||
MinipageDialog;
|
||||
|
||||
typedef GUI<ControlParagraph, FormParagraph,
|
||||
OkApplyCancelReadOnlyPolicy, xformsBC>
|
||||
ParagraphDialog;
|
||||
|
||||
typedef GUI<ControlPreamble, FormPreamble,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC>
|
||||
PreambleDialog;
|
||||
|
||||
typedef FormPreferences PreferencesDialog;
|
||||
|
||||
typedef GUI<ControlPrint, FormPrint, OkApplyCancelPolicy, xformsBC>
|
||||
PrintDialog;
|
||||
|
||||
typedef GUI<ControlRef, FormRef, NoRepeatedApplyReadOnlyPolicy, xformsBC>
|
||||
RefDialog;
|
||||
|
||||
typedef GUI<ControlSearch, FormSearch, NoRepeatedApplyReadOnlyPolicy, xformsBC>
|
||||
SearchDialog;
|
||||
|
||||
typedef GUI<ControlSendto, FormSendto, OkApplyCancelPolicy, xformsBC>
|
||||
SendtoDialog;
|
||||
|
||||
typedef GUI<ControlSpellchecker, FormSpellchecker,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC>
|
||||
SpellcheckerDialog;
|
||||
|
||||
typedef FormTabular TabularDialog;
|
||||
|
||||
typedef GUI<ControlTabularCreate, FormTabularCreate,
|
||||
OkApplyCancelReadOnlyPolicy, xformsBC>
|
||||
TabularCreateDialog;
|
||||
|
||||
typedef GUI<ControlTexinfo, FormTexinfo, OkCancelPolicy, xformsBC>
|
||||
TexinfoDialog;
|
||||
|
||||
#ifdef HAVE_LIBAIKSAURUS
|
||||
typedef GUI<ControlThesaurus, FormThesaurus,
|
||||
OkApplyCancelReadOnlyPolicy, xformsBC>
|
||||
ThesaurusDialog;
|
||||
#endif
|
||||
|
||||
typedef GUI<ControlToc, FormToc, OkCancelPolicy, xformsBC>
|
||||
TocDialog;
|
||||
|
||||
typedef GUI<ControlUrl, FormUrl, NoRepeatedApplyReadOnlyPolicy, xformsBC>
|
||||
UrlDialog;
|
||||
|
||||
typedef GUI<ControlVCLog, FormVCLog, OkCancelPolicy, xformsBC>
|
||||
VCLogFileDialog;
|
||||
|
||||
struct Dialogs::Impl {
|
||||
Impl(LyXView & lv, Dialogs & d) : lv_(lv), d_(d) {}
|
||||
|
||||
template <typename T>
|
||||
T & dialog(boost::scoped_ptr<T> & var)
|
||||
{
|
||||
if (!var.get())
|
||||
var.reset(new T(lv_, d_));
|
||||
return *var;
|
||||
}
|
||||
|
||||
boost::scoped_ptr<AboutlyxDialog> aboutlyx;
|
||||
boost::scoped_ptr<BibitemDialog> bibitem;
|
||||
boost::scoped_ptr<BibtexDialog> bibtex;
|
||||
boost::scoped_ptr<CharacterDialog> character;
|
||||
boost::scoped_ptr<CitationDialog> citation;
|
||||
boost::scoped_ptr<DocumentDialog> document;
|
||||
boost::scoped_ptr<ErrorDialog> error;
|
||||
boost::scoped_ptr<ERTDialog> ert;
|
||||
boost::scoped_ptr<ExternalDialog> external;
|
||||
boost::scoped_ptr<FileDialog> file;
|
||||
boost::scoped_ptr<FloatDialog> floats;
|
||||
boost::scoped_ptr<ForksDialog> forks;
|
||||
boost::scoped_ptr<GraphicsDialog> graphics;
|
||||
boost::scoped_ptr<IncludeDialog> include;
|
||||
boost::scoped_ptr<IndexDialog> index;
|
||||
boost::scoped_ptr<LogFileDialog> logfile;
|
||||
boost::scoped_ptr<MathPanelDialog> mathpanel;
|
||||
boost::scoped_ptr<MinipageDialog> minipage;
|
||||
boost::scoped_ptr<ParagraphDialog> paragraph;
|
||||
boost::scoped_ptr<PreambleDialog> preamble;
|
||||
boost::scoped_ptr<PreferencesDialog> preferences;
|
||||
boost::scoped_ptr<PrintDialog> print;
|
||||
boost::scoped_ptr<RefDialog> ref;
|
||||
boost::scoped_ptr<SearchDialog> search;
|
||||
boost::scoped_ptr<SendtoDialog> sendto;
|
||||
boost::scoped_ptr<SpellcheckerDialog> spellchecker;
|
||||
boost::scoped_ptr<TabularDialog> tabular;
|
||||
boost::scoped_ptr<TabularCreateDialog> tabularcreate;
|
||||
boost::scoped_ptr<TexinfoDialog> texinfo;
|
||||
|
||||
#ifdef HAVE_LIBAIKSAURUS
|
||||
boost::scoped_ptr<ThesaurusDialog> thesaurus;
|
||||
#endif
|
||||
|
||||
boost::scoped_ptr<TocDialog> toc;
|
||||
boost::scoped_ptr<UrlDialog> url;
|
||||
boost::scoped_ptr<VCLogFileDialog> vclogfile;
|
||||
|
||||
private:
|
||||
LyXView & lv_;
|
||||
Dialogs & d_;
|
||||
};
|
||||
|
||||
#endif // DIALOGS_IMPL_H
|
@ -69,7 +69,7 @@ void FormBaseDeprecated::redraw()
|
||||
void FormBaseDeprecated::connect()
|
||||
{
|
||||
fl_set_form_minsize(form(), minw_, minh_);
|
||||
r_ = d_.redrawGUI.connect(boost::bind(&FormBaseDeprecated::redraw, this));
|
||||
r_ = d_.redrawGUI().connect(boost::bind(&FormBaseDeprecated::redraw, this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -416,7 +416,7 @@ FileDialog::Private::Private(Dialogs & dia)
|
||||
fl_hide_object(file_dlg_form_->User1);
|
||||
fl_hide_object(file_dlg_form_->User2);
|
||||
|
||||
r_ = dia.redrawGUI.connect(boost::bind(&FileDialog::Private::redraw, this));
|
||||
r_ = dia.redrawGUI().connect(boost::bind(&FileDialog::Private::redraw, this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -48,6 +48,9 @@ libxforms_la_SOURCES = \
|
||||
ColorHandler.C \
|
||||
ColorHandler.h \
|
||||
Dialogs.C \
|
||||
Dialogs2.C \
|
||||
Dialogs3.C \
|
||||
Dialogs_impl.h \
|
||||
DropDown.h \
|
||||
DropDown.C \
|
||||
FeedbackController.C \
|
||||
|
@ -67,7 +67,7 @@ XFormsView::XFormsView(int width, int height)
|
||||
|
||||
// Make sure the buttons are disabled if needed.
|
||||
updateToolbar();
|
||||
redraw_con = getDialogs().redrawGUI.connect(boost::bind(&XFormsView::redraw, this));
|
||||
redraw_con = getDialogs().redrawGUI().connect(boost::bind(&XFormsView::redraw, this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,533 +0,0 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "guiapi.h"
|
||||
|
||||
#include "FormAboutlyx.h"
|
||||
#include "forms/form_aboutlyx.h"
|
||||
|
||||
#include "FormBibitem.h"
|
||||
#include "forms/form_bibitem.h"
|
||||
|
||||
#include "FormBibtex.h"
|
||||
#include "forms/form_bibtex.h"
|
||||
|
||||
#include "FormBrowser.h"
|
||||
#include "forms/form_browser.h"
|
||||
|
||||
#include "FormCharacter.h"
|
||||
#include "forms/form_character.h"
|
||||
|
||||
#include "FormCitation.h"
|
||||
#include "forms/form_citation.h"
|
||||
|
||||
#include "FormDocument.h"
|
||||
#include "forms/form_document.h"
|
||||
|
||||
#include "FormError.h"
|
||||
#include "forms/form_error.h"
|
||||
|
||||
#include "FormERT.h"
|
||||
#include "forms/form_ert.h"
|
||||
|
||||
#include "FormExternal.h"
|
||||
#include "forms/form_external.h"
|
||||
|
||||
#include "FormFloat.h"
|
||||
#include "forms/form_float.h"
|
||||
|
||||
#include "FormForks.h"
|
||||
#include "forms/form_forks.h"
|
||||
|
||||
#include "FormGraphics.h"
|
||||
#include "forms/form_graphics.h"
|
||||
|
||||
#include "FormInclude.h"
|
||||
#include "forms/form_include.h"
|
||||
|
||||
#include "FormIndex.h"
|
||||
#include "forms/form_index.h"
|
||||
|
||||
#include "FormLog.h"
|
||||
|
||||
#include "FormMathsPanel.h"
|
||||
#include "FormMathsBitmap.h"
|
||||
#include "FormMathsDeco.h"
|
||||
#include "FormMathsDelim.h"
|
||||
#include "FormMathsMatrix.h"
|
||||
#include "FormMathsSpace.h"
|
||||
#include "FormMathsStyle.h"
|
||||
|
||||
#include "forms/form_maths_deco.h"
|
||||
#include "forms/form_maths_delim.h"
|
||||
#include "forms/form_maths_matrix.h"
|
||||
#include "forms/form_maths_panel.h"
|
||||
#include "forms/form_maths_space.h"
|
||||
#include "forms/form_maths_style.h"
|
||||
|
||||
#include "FormMinipage.h"
|
||||
#include "forms/form_minipage.h"
|
||||
|
||||
#include "FormParagraph.h"
|
||||
#include "forms/form_paragraph.h"
|
||||
|
||||
#include "FormPreamble.h"
|
||||
#include "forms/form_preamble.h"
|
||||
|
||||
#include "FormPreferences.h"
|
||||
#include "forms/form_preferences.h"
|
||||
|
||||
#include "FormPrint.h"
|
||||
#include "forms/form_print.h"
|
||||
|
||||
#include "FormRef.h"
|
||||
#include "forms/form_ref.h"
|
||||
|
||||
#include "FormSearch.h"
|
||||
#include "forms/form_search.h"
|
||||
|
||||
#include "FormSendto.h"
|
||||
#include "forms/form_sendto.h"
|
||||
|
||||
#include "FormShowFile.h"
|
||||
|
||||
#include "FormSpellchecker.h"
|
||||
#include "forms/form_spellchecker.h"
|
||||
|
||||
#include "FormTabular.h"
|
||||
#include "forms/form_tabular.h"
|
||||
|
||||
#include "FormTabularCreate.h"
|
||||
#include "forms/form_tabular_create.h"
|
||||
|
||||
#include "FormTexinfo.h"
|
||||
#include "forms/form_texinfo.h"
|
||||
|
||||
#ifdef HAVE_LIBAIKSAURUS
|
||||
#include "FormThesaurus.h"
|
||||
#include "forms/form_thesaurus.h"
|
||||
#endif
|
||||
|
||||
#include "FormToc.h"
|
||||
#include "forms/form_toc.h"
|
||||
|
||||
#include "FormUrl.h"
|
||||
#include "forms/form_url.h"
|
||||
|
||||
#include "FormVCLog.h"
|
||||
|
||||
#include "xformsBC.h"
|
||||
#include "combox.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, FormCharacter,
|
||||
OkApplyCancelReadOnlyPolicy, xformsBC> >
|
||||
controlCharacterSingleton;
|
||||
|
||||
GUISingleton<GUI<ControlCitation, FormCitation,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC> >
|
||||
controlCitationSingleton;
|
||||
|
||||
|
||||
GUISingleton<GUI<ControlERT, FormERT,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC> >
|
||||
controlERTSingleton;
|
||||
|
||||
GUISingleton<GUI<ControlIndex, FormIndex,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC> >
|
||||
controlIndexSingleton;
|
||||
|
||||
GUISingleton<GUI<ControlMinipage, FormMinipage,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC> >
|
||||
controlMinipageSingleton;
|
||||
|
||||
GUISingleton<FormPreferences> formPreferencesSingleton;
|
||||
|
||||
GUISingleton<GUI<ControlRef, FormRef,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC> >
|
||||
controlRefSingleton;
|
||||
|
||||
GUISingleton<FormTabular> formTabularSingleton;
|
||||
|
||||
GUISingleton<GUI<ControlToc, FormToc,
|
||||
OkCancelPolicy, xformsBC> >
|
||||
controlTocSingleton;
|
||||
|
||||
GUISingleton<GUI<ControlUrl, FormUrl,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC> >
|
||||
controlUrlSingleton;
|
||||
|
||||
} // anon
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
void gui_ShowAboutlyx(LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static GUI<ControlAboutlyx, FormAboutlyx,
|
||||
OkCancelPolicy, xformsBC> cal(lv, d);
|
||||
cal.controller().show();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowBibitem(InsetCommand * ic, LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static GUI<ControlBibitem, FormBibitem,
|
||||
OkCancelReadOnlyPolicy, xformsBC> cbi(lv, d);
|
||||
cbi.controller().showInset(ic);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowBibtex(InsetCommand * ic, LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static GUI<ControlBibtex, FormBibtex,
|
||||
OkCancelReadOnlyPolicy, xformsBC> 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 FormDocument fd(lv, d);
|
||||
fd.show();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowError(InsetError * ie, LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static GUI<ControlError, FormError,
|
||||
OkCancelPolicy, xformsBC> 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, FormExternal,
|
||||
OkApplyCancelReadOnlyPolicy, xformsBC> ce(lv, d);
|
||||
ce.controller().showInset(ie);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowFile(string const & f, LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static GUI<ControlShowFile, FormShowFile,
|
||||
OkCancelPolicy, xformsBC> csf(lv, d);
|
||||
csf.controller().showFile(f);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowFloat(InsetFloat * ifl, LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static GUI<ControlFloat, FormFloat,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC> cf(lv, d);
|
||||
cf.controller().showInset(ifl);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowForks(LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static GUI<ControlForks, FormForks,
|
||||
OkApplyCancelPolicy, xformsBC> cf(lv, d);
|
||||
cf.controller().show();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowGraphics(InsetGraphics * ig, LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static GUI<ControlGraphics, FormGraphics,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC> cg(lv, d);
|
||||
cg.controller().showInset(ig);
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowInclude(InsetInclude * ii, LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static GUI<ControlInclude, FormInclude,
|
||||
OkCancelReadOnlyPolicy, xformsBC> 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("");
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowLogFile(LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static GUI<ControlLog, FormLog,
|
||||
OkCancelPolicy, xformsBC> cl(lv, d);
|
||||
cl.controller().show();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowMathPanel(LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static FormMathsPanel 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)
|
||||
{
|
||||
static GUI<ControlParagraph, FormParagraph,
|
||||
OkApplyCancelReadOnlyPolicy, xformsBC> cp(lv, d);
|
||||
cp.controller().show();
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
void gui_UpdateParagraph(LyXView & lv, Dialogs & d)
|
||||
{
|
||||
#warning FIXME!
|
||||
// This should be the same object as in gui_ShowParagraph
|
||||
static GUI<ControlParagraph, FormParagraph,
|
||||
OkApplyCancelReadOnlyPolicy, xformsBC> cp(lv, d);
|
||||
#if 0
|
||||
cp.
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void gui_ShowPreamble(LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static GUI<ControlPreamble, FormPreamble,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC> 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, FormPrint,
|
||||
OkApplyCancelPolicy, xformsBC> 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, FormSearch,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC> cs(lv, d);
|
||||
cs.controller().show();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowSendto(LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static GUI<ControlSendto, FormSendto,
|
||||
OkApplyCancelPolicy, xformsBC> cs(lv, d);
|
||||
cs.controller().show();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowSpellchecker(LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static GUI<ControlSpellchecker, FormSpellchecker,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC> 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, FormTabularCreate,
|
||||
OkApplyCancelReadOnlyPolicy, xformsBC> ctc(lv, d);
|
||||
ctc.controller().show();
|
||||
}
|
||||
|
||||
|
||||
void gui_ShowTexinfo(LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static GUI<ControlTexinfo, FormTexinfo,
|
||||
OkCancelPolicy, xformsBC> ct(lv, d);
|
||||
ct.controller().show();
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_LIBAIKSAURUS
|
||||
|
||||
void gui_ShowThesaurus(string const & s, LyXView & lv, Dialogs & d)
|
||||
{
|
||||
static GUI<ControlThesaurus, FormThesaurus,
|
||||
OkApplyCancelReadOnlyPolicy, xformsBC> ct(lv, d);
|
||||
ct.controller().showEntry(s);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void gui_ShowThesaurus(string const &, LyXView &, Dialogs &)
|
||||
{}
|
||||
|
||||
#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, FormVCLog,
|
||||
OkCancelPolicy, xformsBC> cv(lv, d);
|
||||
cv.controller().show();
|
||||
}
|
||||
|
||||
} // extern "C"
|
Loading…
Reference in New Issue
Block a user