mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
The reducing file dependencies in the frontends patch.
Ok, Ok, I know this touches a lot of files, but the benefits are worth the huge re-compilation now. Trust me. Would I lie to you? Actually, this also fixes a bug in ControlInset, so you'd have had to recompile 31 files anyway. Happy now? git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3391 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a86ed9bea2
commit
ec8da0035d
@ -1,14 +1,9 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright 2000-2001 The LyX Team.
|
||||
*
|
||||
* ======================================================
|
||||
*
|
||||
/*
|
||||
* \file ButtonController.h
|
||||
* Copyright 2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* \author Allan Rae, rae@lyx.org
|
||||
* \author Angus Leeming, a.leeming@ic.ac.uk
|
||||
* \author Baruch Even, baruch.even@writeme.com
|
||||
@ -17,12 +12,16 @@
|
||||
#ifndef BUTTONCONTROLLER_H
|
||||
#define BUTTONCONTROLLER_H
|
||||
|
||||
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "gettext.h"
|
||||
#include <list>
|
||||
|
||||
#include "gettext.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "debug.h"
|
||||
|
||||
/** A templatised instantiation of the ButtonController requiring the
|
||||
* gui-frontend widgets.
|
||||
* The template declarations are in ButtonController.tmpl, which should
|
||||
* be #included in the gui-frontend BC class, see e.g. xforms/xformsBC.C
|
||||
*/
|
||||
template <class Button, class Widget>
|
||||
class GuiBC : public ButtonControllerBase
|
||||
{
|
||||
@ -66,55 +65,6 @@ private:
|
||||
};
|
||||
|
||||
|
||||
template <class Button, class Widget>
|
||||
GuiBC<Button, Widget>::GuiBC(string const & cancel, string const & close)
|
||||
: ButtonControllerBase(cancel, close),
|
||||
okay_(0), apply_(0), cancel_(0), restore_(0)
|
||||
{}
|
||||
|
||||
|
||||
template <class Button, class Widget>
|
||||
void GuiBC<Button, Widget>::refresh()
|
||||
{
|
||||
lyxerr[Debug::GUI] << "Calling BC refresh()" << std::endl;
|
||||
|
||||
if (okay_) {
|
||||
bool const enabled = bp().buttonStatus(ButtonPolicy::OKAY);
|
||||
setButtonEnabled(okay_, enabled);
|
||||
}
|
||||
if (apply_) {
|
||||
bool const enabled = bp().buttonStatus(ButtonPolicy::APPLY);
|
||||
setButtonEnabled(apply_, enabled);
|
||||
}
|
||||
if (restore_) {
|
||||
bool const enabled = bp().buttonStatus(ButtonPolicy::RESTORE);
|
||||
setButtonEnabled(restore_, enabled);
|
||||
}
|
||||
if (cancel_) {
|
||||
bool const enabled = bp().buttonStatus(ButtonPolicy::CANCEL);
|
||||
if (enabled)
|
||||
setButtonLabel(cancel_, cancel_label_);
|
||||
else
|
||||
setButtonLabel(cancel_, close_label_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <class Button, class Widget>
|
||||
void GuiBC<Button, Widget>::refreshReadOnly()
|
||||
{
|
||||
if (read_only_.empty()) return;
|
||||
|
||||
bool const enable = !bp().isReadOnly();
|
||||
|
||||
typename Widgets::const_iterator end = read_only_.end();
|
||||
typename Widgets::const_iterator iter = read_only_.begin();
|
||||
for (; iter != end; ++iter) {
|
||||
setWidgetEnabled(*iter, enable);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <class BP, class GUIBC>
|
||||
class ButtonController: public GUIBC
|
||||
{
|
||||
@ -131,10 +81,4 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
template <class BP, class GUIBC>
|
||||
ButtonController<BP, GUIBC>::ButtonController(string const & cancel,
|
||||
string const & close)
|
||||
: GUIBC(cancel, close)
|
||||
{}
|
||||
|
||||
#endif // BUTTONCONTROLLER_H
|
||||
|
71
src/frontends/controllers/ButtonController.tmpl
Normal file
71
src/frontends/controllers/ButtonController.tmpl
Normal file
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* \file ButtonController.tmpl
|
||||
* Copyright 2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* \author Allan Rae, rae@lyx.org
|
||||
* \author Angus Leeming, a.leeming@ic.ac.uk
|
||||
* \author Baruch Even, baruch.even@writeme.com
|
||||
*
|
||||
* GuiBC is a base class and so these templatised methods will be
|
||||
* instantiated if this file is #included in the derived classes' .C file.
|
||||
* see, e.g., xforms/xformsBC.C
|
||||
*/
|
||||
|
||||
#include "ButtonController.h"
|
||||
#include "debug.h"
|
||||
|
||||
template <class Button, class Widget>
|
||||
GuiBC<Button, Widget>::GuiBC(string const & cancel, string const & close)
|
||||
: ButtonControllerBase(cancel, close),
|
||||
okay_(0), apply_(0), cancel_(0), restore_(0)
|
||||
{}
|
||||
|
||||
|
||||
template <class Button, class Widget>
|
||||
void GuiBC<Button, Widget>::refresh()
|
||||
{
|
||||
lyxerr[Debug::GUI] << "Calling BC refresh()" << std::endl;
|
||||
|
||||
if (okay_) {
|
||||
bool const enabled = bp().buttonStatus(ButtonPolicy::OKAY);
|
||||
setButtonEnabled(okay_, enabled);
|
||||
}
|
||||
if (apply_) {
|
||||
bool const enabled = bp().buttonStatus(ButtonPolicy::APPLY);
|
||||
setButtonEnabled(apply_, enabled);
|
||||
}
|
||||
if (restore_) {
|
||||
bool const enabled = bp().buttonStatus(ButtonPolicy::RESTORE);
|
||||
setButtonEnabled(restore_, enabled);
|
||||
}
|
||||
if (cancel_) {
|
||||
bool const enabled = bp().buttonStatus(ButtonPolicy::CANCEL);
|
||||
if (enabled)
|
||||
setButtonLabel(cancel_, cancel_label_);
|
||||
else
|
||||
setButtonLabel(cancel_, close_label_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <class Button, class Widget>
|
||||
void GuiBC<Button, Widget>::refreshReadOnly()
|
||||
{
|
||||
if (read_only_.empty()) return;
|
||||
|
||||
bool const enable = !bp().isReadOnly();
|
||||
|
||||
typename Widgets::const_iterator end = read_only_.end();
|
||||
typename Widgets::const_iterator iter = read_only_.begin();
|
||||
for (; iter != end; ++iter) {
|
||||
setWidgetEnabled(*iter, enable);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <class BP, class GUIBC>
|
||||
ButtonController<BP, GUIBC>::ButtonController(string const & cancel,
|
||||
string const & close)
|
||||
: GUIBC(cancel, close)
|
||||
{}
|
@ -1,3 +1,55 @@
|
||||
2002-01-16 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* ButtonController.h: split into two. The definition remains in
|
||||
ButtonController.h, the declaration is now in ButtonController.tmpl.
|
||||
These template methods should be #included when the derived class is
|
||||
instantiated, in this case in xforms/xformsBC.C and xforms/Dialogs.C
|
||||
and in the qt2 and gnome equivalents.
|
||||
|
||||
* ControlDialogs.h: removed. The definition of class ControlDialog is
|
||||
now to be found in ControlDialog.h and the declaration of the methods
|
||||
is in ControlDialog.tmpl. The two template instantiations are performed
|
||||
in ControlDialog_impl.[Ch], new files also.
|
||||
|
||||
* ControlInset.h: split into two. The definition remains in
|
||||
ControlInset.h, the declaration is now in ControlInset.tmpl.
|
||||
These template methods should be #included derived class is
|
||||
instantiated, in this case in 8 other .C files in this directory.
|
||||
|
||||
* ControlAboutlyx.[Ch]:
|
||||
* ControlCharacter.[Ch]:
|
||||
* ControlCommand.C:
|
||||
* ControlERT.C:
|
||||
* ControlError.C:
|
||||
* ControlExternal.C:
|
||||
* ControlFloat.C:
|
||||
* ControlGraphics.C:
|
||||
* ControlInclude.C:
|
||||
* ControlLog.[Ch]:
|
||||
* ControlMinipage.C:
|
||||
* ControlPreamble.[Ch]:
|
||||
* ControlPrint.[Ch]:
|
||||
* ControlSearch.[Ch]:
|
||||
* ControlShowFile.[Ch]:
|
||||
* ControlSpellchecker.[Ch]:
|
||||
* ControlTabularCreate.[Ch]:
|
||||
* ControlTexinfo.[Ch]:
|
||||
* ControlThesaurus.[Ch]:
|
||||
* ControlVCLog.[Ch]: small changes associated with the above ones.
|
||||
|
||||
* GUI.h: #include the ButtonController and dialog controller files
|
||||
here, rather than forward declare them. This is the correct place
|
||||
for these #includes.
|
||||
|
||||
* Makefile.am: add ControlDialog_impl.[Ch] to libcontrollers_la_SOURCES.
|
||||
Rename ControlDialogs.h as ControlDialog.h.
|
||||
Add ButtonController.tmpl ControlDialog.tmpl ControlInset.tmpl to
|
||||
EXTRA_DIST.
|
||||
|
||||
2002-01-15 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* ControlInset.h (apply): fix bug unearthed by Michael Koziarski.
|
||||
|
||||
2002-01-14 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||
|
||||
* ControlExternal.C (Browse): use Buffer::filePath; simplify (more
|
||||
|
@ -30,7 +30,7 @@ extern string system_lyxdir;
|
||||
extern string user_lyxdir;
|
||||
|
||||
ControlAboutlyx::ControlAboutlyx(LyXView & lv, Dialogs & d)
|
||||
: ControlDialog<ControlConnectBI>(lv, d)
|
||||
: ControlDialogBI(lv, d)
|
||||
{
|
||||
d_.showAboutlyx.connect(SigC::slot(this, &ControlAboutlyx::show));
|
||||
}
|
||||
|
@ -17,11 +17,11 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "ControlDialogs.h"
|
||||
#include "ControlDialog_impl.h"
|
||||
|
||||
/** A controller for the About LyX dialogs.
|
||||
*/
|
||||
class ControlAboutlyx : public ControlDialog<ControlConnectBI> {
|
||||
class ControlAboutlyx : public ControlDialogBI {
|
||||
public:
|
||||
///
|
||||
ControlAboutlyx(LyXView &, Dialogs &);
|
||||
|
@ -32,7 +32,7 @@ using std::vector;
|
||||
|
||||
|
||||
ControlCharacter::ControlCharacter(LyXView & lv, Dialogs & d)
|
||||
: ControlDialog<ControlConnectBD>(lv, d),
|
||||
: ControlDialogBD(lv, d),
|
||||
font_(0), toggleall_(false)
|
||||
{
|
||||
d_.showCharacter.connect(slot(this, &ControlCharacter::show));
|
||||
|
@ -16,12 +16,12 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "ControlDialogs.h"
|
||||
#include "ControlDialog_impl.h"
|
||||
#include "character.h"
|
||||
|
||||
/** A controller for Character dialogs.
|
||||
*/
|
||||
class ControlCharacter : public ControlDialog<ControlConnectBD>
|
||||
class ControlCharacter : public ControlDialogBD
|
||||
{
|
||||
public:
|
||||
///
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlCommand.h"
|
||||
#include "ControlInset.tmpl"
|
||||
#include "buffer.h"
|
||||
#include "Dialogs.h"
|
||||
#include "LyXView.h"
|
||||
|
50
src/frontends/controllers/ControlDialog.h
Normal file
50
src/frontends/controllers/ControlDialog.h
Normal file
@ -0,0 +1,50 @@
|
||||
// -*- C++ -*-
|
||||
/*
|
||||
* \file ControlDialog.h
|
||||
* Copyright 2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
||||
*
|
||||
* ControlDialog is to be used as a parent class for dialogs that are not
|
||||
* views onto parameters of insets. (An ugly description I know, but I hope
|
||||
* the meaning is clear! Can anyone do any better?) Examples would be the
|
||||
* Document and Paragraph dialogs.
|
||||
*/
|
||||
|
||||
#ifndef CONTROLDIALOG_H
|
||||
#define CONTROLDIALOG_H
|
||||
|
||||
class LyXView;
|
||||
class Dialogs;
|
||||
|
||||
/** Base class to control connection/disconnection of signals with the LyX
|
||||
kernel for dialogs NOT used with insets.
|
||||
The Base class will be either ControlConnectBI or ControlConnectBD.
|
||||
*/
|
||||
template <class Base>
|
||||
class ControlDialog : public Base
|
||||
{
|
||||
public:
|
||||
///
|
||||
ControlDialog(LyXView &, Dialogs &);
|
||||
|
||||
protected:
|
||||
/// Show the dialog.
|
||||
virtual void show();
|
||||
/// Hide the dialog.
|
||||
virtual void hide();
|
||||
/// Update the dialog.
|
||||
virtual void update();
|
||||
|
||||
/// clean-up on hide.
|
||||
virtual void clearParams() {}
|
||||
/// set the params before show or update
|
||||
virtual void setParams() {}
|
||||
|
||||
private:
|
||||
/// is the dialog built ?
|
||||
bool dialog_built_;
|
||||
};
|
||||
|
||||
#endif // CONTROLDIALOG_H
|
75
src/frontends/controllers/ControlDialog.tmpl
Normal file
75
src/frontends/controllers/ControlDialog.tmpl
Normal file
@ -0,0 +1,75 @@
|
||||
// -*- C++ -*-
|
||||
/*
|
||||
* \file ControlDialog.tmpl
|
||||
* Copyright 2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
||||
*
|
||||
* ControlDialog is a base class and so these templatised methods will be
|
||||
* instantiated if this file is #included in the derived classes' .C file.
|
||||
*/
|
||||
|
||||
#include "ControlDialog.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlConnections.h"
|
||||
#include "LyXView.h"
|
||||
#include "BufferView.h"
|
||||
#include "ViewBase.h"
|
||||
#include "debug.h"
|
||||
|
||||
template <class Base>
|
||||
ControlDialog<Base>::ControlDialog(LyXView & lv, Dialogs & d)
|
||||
: Base(lv, d), dialog_built_(false)
|
||||
{}
|
||||
|
||||
|
||||
template <class Base>
|
||||
void ControlDialog<Base>::show()
|
||||
{
|
||||
if (isBufferDependent() && !lv_.view()->available())
|
||||
return;
|
||||
|
||||
connect();
|
||||
|
||||
setParams();
|
||||
if (emergency_exit_) {
|
||||
hide();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dialog_built_) {
|
||||
view().build();
|
||||
dialog_built_ = true;
|
||||
}
|
||||
|
||||
bc().readOnly(isReadonly());
|
||||
view().show();
|
||||
}
|
||||
|
||||
template <class Base>
|
||||
void ControlDialog<Base>::update()
|
||||
{
|
||||
if (isBufferDependent() && !lv_.view()->available())
|
||||
return;
|
||||
|
||||
setParams();
|
||||
if (emergency_exit_) {
|
||||
hide();
|
||||
return;
|
||||
}
|
||||
|
||||
bc().readOnly(isReadonly());
|
||||
view().update();
|
||||
}
|
||||
|
||||
template <class Base>
|
||||
void ControlDialog<Base>::hide()
|
||||
{
|
||||
emergency_exit_ = false;
|
||||
clearParams();
|
||||
|
||||
disconnect();
|
||||
view().hide();
|
||||
}
|
||||
|
22
src/frontends/controllers/ControlDialog_impl.C
Normal file
22
src/frontends/controllers/ControlDialog_impl.C
Normal file
@ -0,0 +1,22 @@
|
||||
// -*- C++ -*-
|
||||
/*
|
||||
* \file ControlDialog_impl.C
|
||||
* Copyright 2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "ControlDialog_impl.h"
|
||||
#include "ControlDialog.tmpl"
|
||||
|
||||
ControlDialogBD::ControlDialogBD(LyXView & lv, Dialogs & d)
|
||||
: ControlDialog<ControlConnectBD>(lv, d)
|
||||
{}
|
||||
|
||||
|
||||
ControlDialogBI::ControlDialogBI(LyXView & lv, Dialogs & d)
|
||||
: ControlDialog<ControlConnectBD>(lv, d)
|
||||
{}
|
39
src/frontends/controllers/ControlDialog_impl.h
Normal file
39
src/frontends/controllers/ControlDialog_impl.h
Normal file
@ -0,0 +1,39 @@
|
||||
// -*- C++ -*-
|
||||
/*
|
||||
* \file ControlDialog_impl.h
|
||||
* Copyright 2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
||||
*
|
||||
* Instatiate the two possible instantiations of the ControlDialog template
|
||||
* class, thus reducing file dependencies enormously.
|
||||
*/
|
||||
|
||||
#ifndef CONTROLDIALOG_IMPL_H
|
||||
#define CONTROLDIALOG_IMPL_H
|
||||
|
||||
#include "ControlDialog.h"
|
||||
#include "ControlConnections.h"
|
||||
|
||||
class Dialogs;
|
||||
class LyXView;
|
||||
|
||||
|
||||
class ControlDialogBD : public ControlDialog<ControlConnectBD>
|
||||
{
|
||||
public:
|
||||
///
|
||||
ControlDialogBD(LyXView &, Dialogs &);
|
||||
};
|
||||
|
||||
|
||||
class ControlDialogBI : public ControlDialog<ControlConnectBD>
|
||||
{
|
||||
public:
|
||||
///
|
||||
ControlDialogBI(LyXView &, Dialogs &);
|
||||
};
|
||||
|
||||
|
||||
#endif // CONTROLDIALOG_IMPL_H
|
@ -1,113 +0,0 @@
|
||||
// -*- C++ -*-
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright 2001 The LyX Team.
|
||||
*
|
||||
* ======================================================
|
||||
*
|
||||
* \file ControlDialogs.h
|
||||
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
||||
*
|
||||
* ControlDialog is to be used as a parent class for dialogs that are not
|
||||
* views onto parameters of insets. (An ugly description I know, but I hope
|
||||
* the meaning is clear! Can anyone do any better?) Examples would be the
|
||||
* Document and Paragraph dialogs.
|
||||
*/
|
||||
|
||||
#ifndef CONTROLDIALOGS_H
|
||||
#define CONTROLDIALOGS_H
|
||||
|
||||
#include "ControlConnections.h"
|
||||
#include "debug.h"
|
||||
|
||||
/** Base class to control connection/disconnection of signals with the LyX
|
||||
kernel for dialogs NOT used with insets.
|
||||
The Base class will be either ControlConnectBI or ControlConnectBD.
|
||||
*/
|
||||
template <class Base>
|
||||
class ControlDialog : public Base
|
||||
{
|
||||
public:
|
||||
///
|
||||
ControlDialog(LyXView &, Dialogs &);
|
||||
|
||||
protected:
|
||||
/// Show the dialog.
|
||||
virtual void show();
|
||||
/// Hide the dialog.
|
||||
virtual void hide();
|
||||
/// Update the dialog.
|
||||
virtual void update();
|
||||
|
||||
/// clean-up on hide.
|
||||
virtual void clearParams() {}
|
||||
/// set the params before show or update
|
||||
virtual void setParams() {}
|
||||
|
||||
private:
|
||||
/// is the dialog built ?
|
||||
bool dialog_built_;
|
||||
};
|
||||
|
||||
|
||||
#include "LyXView.h"
|
||||
|
||||
template <class Base>
|
||||
ControlDialog<Base>::ControlDialog(LyXView & lv, Dialogs & d)
|
||||
: Base(lv, d), dialog_built_(false)
|
||||
{}
|
||||
|
||||
|
||||
template <class Base>
|
||||
void ControlDialog<Base>::show()
|
||||
{
|
||||
if (isBufferDependent() && !lv_.view()->available())
|
||||
return;
|
||||
|
||||
connect();
|
||||
|
||||
setParams();
|
||||
if (emergency_exit_) {
|
||||
hide();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dialog_built_) {
|
||||
view().build();
|
||||
dialog_built_ = true;
|
||||
}
|
||||
|
||||
bc().readOnly(isReadonly());
|
||||
view().show();
|
||||
}
|
||||
|
||||
template <class Base>
|
||||
void ControlDialog<Base>::update()
|
||||
{
|
||||
if (isBufferDependent() && !lv_.view()->available())
|
||||
return;
|
||||
|
||||
setParams();
|
||||
if (emergency_exit_) {
|
||||
hide();
|
||||
return;
|
||||
}
|
||||
|
||||
bc().readOnly(isReadonly());
|
||||
view().update();
|
||||
}
|
||||
|
||||
template <class Base>
|
||||
void ControlDialog<Base>::hide()
|
||||
{
|
||||
emergency_exit_ = false;
|
||||
clearParams();
|
||||
|
||||
disconnect();
|
||||
view().hide();
|
||||
}
|
||||
|
||||
#endif // CONTROLDIALOGS_H
|
@ -20,6 +20,7 @@
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlERT.h"
|
||||
#include "ControlInset.tmpl"
|
||||
#include "Dialogs.h"
|
||||
#include "LyXView.h"
|
||||
#include "buffer.h"
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlError.h"
|
||||
#include "ControlInset.tmpl"
|
||||
#include "Dialogs.h"
|
||||
#include "LyXView.h"
|
||||
#include "buffer.h"
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlExternal.h"
|
||||
#include "ControlInset.tmpl"
|
||||
#include "buffer.h"
|
||||
#include "Dialogs.h"
|
||||
#include "Liason.h"
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlFloat.h"
|
||||
#include "ControlInset.tmpl"
|
||||
#include "Dialogs.h"
|
||||
#include "LyXView.h"
|
||||
#include "buffer.h"
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlGraphics.h"
|
||||
#include "ControlInset.tmpl"
|
||||
#include "buffer.h"
|
||||
#include "Dialogs.h"
|
||||
#include "LyXView.h"
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlInclude.h"
|
||||
#include "ControlInset.tmpl"
|
||||
#include "buffer.h"
|
||||
#include "BufferView.h"
|
||||
#include "Dialogs.h"
|
||||
|
@ -19,8 +19,6 @@
|
||||
#ifndef CONTROLINSET_H
|
||||
#define CONTROLINSET_H
|
||||
|
||||
#include "support/LAssert.h"
|
||||
#include "debug.h"
|
||||
#include "ControlConnections.h"
|
||||
|
||||
class Inset;
|
||||
@ -107,166 +105,4 @@ private:
|
||||
};
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
ControlInset<Inset, Params>::ControlInset(LyXView & lv, Dialogs & d)
|
||||
: ControlConnectBD(lv, d),
|
||||
inset_(0), ih_(0), params_(0), dialog_built_(false)
|
||||
{}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::showInset(Inset * inset)
|
||||
{
|
||||
if (inset == 0) return; // maybe we should Assert this?
|
||||
|
||||
connectInset(inset);
|
||||
show(getParams(*inset));
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::createInset(string const & arg)
|
||||
{
|
||||
connectInset();
|
||||
|
||||
if (!arg.empty())
|
||||
bc().valid(); // so that the user can press Ok
|
||||
|
||||
show(getParams(arg));
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::show(Params const & params)
|
||||
{
|
||||
if (params_) delete params_;
|
||||
params_ = new Params(params);
|
||||
|
||||
setDaughterParams();
|
||||
if (emergency_exit_) {
|
||||
hide();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dialog_built_) {
|
||||
view().build();
|
||||
dialog_built_ = true;
|
||||
}
|
||||
|
||||
bc().readOnly(isReadonly());
|
||||
view().show();
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::hide()
|
||||
{
|
||||
emergency_exit_ = false;
|
||||
if (params_) {
|
||||
delete params_;
|
||||
params_ = 0;
|
||||
}
|
||||
inset_ = 0;
|
||||
|
||||
clearDaughterParams();
|
||||
|
||||
ih_.disconnect();
|
||||
disconnect();
|
||||
view().hide();
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::update()
|
||||
{
|
||||
if (params_) delete params_;
|
||||
|
||||
if (inset_)
|
||||
params_ = new Params(getParams(*inset_));
|
||||
else
|
||||
params_ = new Params();
|
||||
|
||||
if (emergency_exit_) {
|
||||
hide();
|
||||
return;
|
||||
}
|
||||
|
||||
bc().readOnly(isReadonly());
|
||||
view().update();
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::apply()
|
||||
{
|
||||
if (lv_.buffer()->isReadonly())
|
||||
return;
|
||||
|
||||
view().apply();
|
||||
|
||||
if (inset_ && params() != getParams(*inset_))
|
||||
applyParamsToInset();
|
||||
else
|
||||
applyParamsNoInset();
|
||||
|
||||
if (disconnectOnApply() && !isClosing()) {
|
||||
*params_ = getParams(string());
|
||||
inset_ = 0;
|
||||
ih_.disconnect();
|
||||
|
||||
view().update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
Params & ControlInset<Inset, Params>::params()
|
||||
{
|
||||
lyx::Assert(params_);
|
||||
return *params_;
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
Params const & ControlInset<Inset, Params>::params() const
|
||||
{
|
||||
lyx::Assert(params_);
|
||||
return *params_;
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
Inset * ControlInset<Inset, Params>::inset() const
|
||||
{
|
||||
lyx::Assert(inset_);
|
||||
return inset_;
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::updateSlot(bool switched)
|
||||
{
|
||||
if (switched)
|
||||
hide();
|
||||
else
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::connectInset(Inset * inset)
|
||||
{
|
||||
// If connected to another inset, disconnect from it.
|
||||
if (inset_) {
|
||||
ih_.disconnect();
|
||||
inset_ = 0;
|
||||
}
|
||||
|
||||
if (inset) {
|
||||
inset_ = inset;
|
||||
ih_ = inset->hideDialog.connect(
|
||||
SigC::slot(this, &ControlInset::hide));
|
||||
}
|
||||
connect();
|
||||
}
|
||||
#endif // CONTROLINSET_H
|
||||
|
185
src/frontends/controllers/ControlInset.tmpl
Normal file
185
src/frontends/controllers/ControlInset.tmpl
Normal file
@ -0,0 +1,185 @@
|
||||
// -*- C++ -*-
|
||||
/*
|
||||
* \file ControlInset.tmpl
|
||||
* Copyright 2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
||||
*
|
||||
* ControlInset is a base class and so these templatised methods will be
|
||||
* instantiated if this file is #included in the derived classes' .C file.
|
||||
*/
|
||||
|
||||
#include "ControlInset.h"
|
||||
#include "support/LAssert.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
ControlInset<Inset, Params>::ControlInset(LyXView & lv, Dialogs & d)
|
||||
: ControlConnectBD(lv, d),
|
||||
inset_(0), ih_(0), params_(0), dialog_built_(false)
|
||||
{}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::showInset(Inset * inset)
|
||||
{
|
||||
if (inset == 0) return; // maybe we should Assert this?
|
||||
|
||||
connectInset(inset);
|
||||
show(getParams(*inset));
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::createInset(string const & arg)
|
||||
{
|
||||
connectInset();
|
||||
|
||||
if (!arg.empty())
|
||||
bc().valid(); // so that the user can press Ok
|
||||
|
||||
show(getParams(arg));
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::show(Params const & params)
|
||||
{
|
||||
// paranoia check
|
||||
if (params_) delete params_;
|
||||
|
||||
params_ = new Params(params);
|
||||
setDaughterParams();
|
||||
|
||||
if (emergency_exit_) {
|
||||
hide();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dialog_built_) {
|
||||
view().build();
|
||||
dialog_built_ = true;
|
||||
}
|
||||
|
||||
bc().readOnly(isReadonly());
|
||||
view().show();
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::update()
|
||||
{
|
||||
// paranoia check
|
||||
if (params_) delete params_;
|
||||
|
||||
if (inset_)
|
||||
params_ = new Params(getParams(*inset_));
|
||||
else
|
||||
params_ = new Params();
|
||||
|
||||
if (emergency_exit_) {
|
||||
hide();
|
||||
return;
|
||||
}
|
||||
|
||||
bc().readOnly(isReadonly());
|
||||
view().update();
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::hide()
|
||||
{
|
||||
emergency_exit_ = false;
|
||||
if (params_) {
|
||||
delete params_;
|
||||
params_ = 0;
|
||||
}
|
||||
inset_ = 0;
|
||||
|
||||
clearDaughterParams();
|
||||
|
||||
ih_.disconnect();
|
||||
disconnect();
|
||||
view().hide();
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::apply()
|
||||
{
|
||||
if (lv_.buffer()->isReadonly())
|
||||
return;
|
||||
|
||||
view().apply();
|
||||
|
||||
if (inset_) {
|
||||
if (params() != getParams(*inset_)) {
|
||||
applyParamsToInset();
|
||||
}
|
||||
} else {
|
||||
applyParamsNoInset();
|
||||
}
|
||||
|
||||
if (disconnectOnApply() && !isClosing()) {
|
||||
*params_ = getParams(string());
|
||||
inset_ = 0;
|
||||
ih_.disconnect();
|
||||
|
||||
view().update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
Params & ControlInset<Inset, Params>::params()
|
||||
{
|
||||
lyx::Assert(params_);
|
||||
return *params_;
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
Params const & ControlInset<Inset, Params>::params() const
|
||||
{
|
||||
lyx::Assert(params_);
|
||||
return *params_;
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
Inset * ControlInset<Inset, Params>::inset() const
|
||||
{
|
||||
lyx::Assert(inset_);
|
||||
return inset_;
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::updateSlot(bool switched)
|
||||
{
|
||||
if (switched)
|
||||
hide();
|
||||
else
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
void ControlInset<Inset, Params>::connectInset(Inset * inset)
|
||||
{
|
||||
// If connected to another inset, disconnect from it.
|
||||
if (inset_) {
|
||||
ih_.disconnect();
|
||||
inset_ = 0;
|
||||
}
|
||||
|
||||
if (inset) {
|
||||
inset_ = inset;
|
||||
ih_ = inset->hideDialog.connect(
|
||||
SigC::slot(this, &ControlInset::hide));
|
||||
}
|
||||
connect();
|
||||
}
|
@ -29,7 +29,7 @@
|
||||
using SigC::slot;
|
||||
|
||||
ControlLog::ControlLog(LyXView & lv, Dialogs & d)
|
||||
: ControlDialog<ControlConnectBD>(lv, d)
|
||||
: ControlDialogBD(lv, d)
|
||||
{
|
||||
d_.showLogFile.connect(slot(this, &ControlLog::show));
|
||||
}
|
||||
|
@ -22,13 +22,13 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "ControlDialogs.h"
|
||||
#include "ControlDialog_impl.h"
|
||||
#include "buffer.h" // Buffer::LogType
|
||||
|
||||
/**
|
||||
* A controller for a read-only text browser.
|
||||
*/
|
||||
class ControlLog : public ControlDialog<ControlConnectBD> {
|
||||
class ControlLog : public ControlDialogBD {
|
||||
public:
|
||||
///
|
||||
ControlLog(LyXView &, Dialogs &);
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlMinipage.h"
|
||||
#include "ControlInset.tmpl"
|
||||
#include "Dialogs.h"
|
||||
#include "LyXView.h"
|
||||
#include "buffer.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "support/LAssert.h"
|
||||
|
||||
ControlPreamble::ControlPreamble(LyXView & lv, Dialogs & d)
|
||||
: ControlDialog<ControlConnectBD>(lv, d),
|
||||
: ControlDialogBD(lv, d),
|
||||
params_(0)
|
||||
{
|
||||
d_.showPreamble.connect(SigC::slot(this, &ControlPreamble::show));
|
||||
|
@ -14,11 +14,11 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "ControlDialogs.h"
|
||||
#include "ControlDialog_impl.h"
|
||||
|
||||
/** A controller for Preamble dialogs.
|
||||
*/
|
||||
class ControlPreamble : public ControlDialog<ControlConnectBD> {
|
||||
class ControlPreamble : public ControlDialogBD {
|
||||
public:
|
||||
///
|
||||
ControlPreamble(LyXView &, Dialogs &);
|
||||
|
@ -38,8 +38,8 @@ using Liason::getPrinterParams;
|
||||
using std::make_pair;
|
||||
|
||||
ControlPrint::ControlPrint(LyXView & lv, Dialogs & d)
|
||||
: ControlDialog<ControlConnectBD>(lv, d),
|
||||
params_(0)
|
||||
: ControlDialogBD(lv, d),
|
||||
params_(0)
|
||||
{
|
||||
d_.showPrint.connect(SigC::slot(this, &ControlPrint::show));
|
||||
}
|
||||
|
@ -19,13 +19,13 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "ControlDialogs.h"
|
||||
#include "ControlDialog_impl.h"
|
||||
|
||||
class PrinterParams;
|
||||
|
||||
/** A controller for Print dialogs.
|
||||
*/
|
||||
class ControlPrint : public ControlDialog<ControlConnectBD> {
|
||||
class ControlPrint : public ControlDialogBD {
|
||||
public:
|
||||
///
|
||||
ControlPrint(LyXView &, Dialogs &);
|
||||
|
@ -34,7 +34,7 @@ using Liason::setMinibuffer;
|
||||
using SigC::slot;
|
||||
|
||||
ControlSearch::ControlSearch(LyXView & lv, Dialogs & d)
|
||||
: ControlDialog<ControlConnectBD>(lv, d)
|
||||
: ControlDialogBD(lv, d)
|
||||
{
|
||||
d_.showSearch.connect(SigC::slot(this, &ControlSearch::show));
|
||||
|
||||
|
@ -19,11 +19,11 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "ControlDialogs.h"
|
||||
#include "ControlDialog_impl.h"
|
||||
|
||||
/** A controller for Search dialogs.
|
||||
*/
|
||||
class ControlSearch : public ControlDialog<ControlConnectBD> {
|
||||
class ControlSearch : public ControlDialogBD {
|
||||
public:
|
||||
///
|
||||
ControlSearch(LyXView &, Dialogs &);
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "support/filetools.h" // FileSearch
|
||||
|
||||
ControlShowFile::ControlShowFile(LyXView & lv, Dialogs & d)
|
||||
: ControlDialog<ControlConnectBI>(lv, d)
|
||||
: ControlDialogBI(lv, d)
|
||||
{
|
||||
d_.showFile.connect(SigC::slot(this, &ControlShowFile::showFile));
|
||||
}
|
||||
|
@ -13,11 +13,11 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "ControlDialogs.h"
|
||||
#include "ControlDialog_impl.h"
|
||||
|
||||
/** A controller for the ShowFile dialog. */
|
||||
|
||||
class ControlShowFile : public ControlDialog<ControlConnectBI> {
|
||||
class ControlShowFile : public ControlDialogBI {
|
||||
public:
|
||||
///
|
||||
ControlShowFile(LyXView &, Dialogs &);
|
||||
|
@ -54,7 +54,7 @@
|
||||
using SigC::slot;
|
||||
|
||||
ControlSpellchecker::ControlSpellchecker(LyXView & lv, Dialogs & d)
|
||||
: ControlDialog<ControlConnectBD>(lv, d),
|
||||
: ControlDialogBD(lv, d),
|
||||
rtl_(false), newval_(0.0), oldval_(0), newvalue_(0), count_(0),
|
||||
stop_(false), result_(SpellBase::ISP_OK), speller_(0)
|
||||
{
|
||||
|
@ -19,12 +19,12 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "ControlDialogs.h"
|
||||
#include "ControlDialog_impl.h"
|
||||
#include "sp_base.h"
|
||||
|
||||
/** A controller for Spellchecker dialogs.
|
||||
*/
|
||||
class ControlSpellchecker : public ControlDialog<ControlConnectBD> {
|
||||
class ControlSpellchecker : public ControlDialogBD {
|
||||
public:
|
||||
///
|
||||
ControlSpellchecker(LyXView &, Dialogs &);
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "support/lstrings.h"
|
||||
|
||||
ControlTabularCreate::ControlTabularCreate(LyXView & lv, Dialogs & d)
|
||||
: ControlDialog<ControlConnectBD>(lv, d)
|
||||
: ControlDialogBD(lv, d)
|
||||
{
|
||||
d_.showTabularCreate.connect(SigC::slot(this,
|
||||
&ControlTabularCreate::show));
|
||||
|
@ -20,11 +20,11 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "ControlDialogs.h"
|
||||
#include "ControlDialog_impl.h"
|
||||
|
||||
/** A controller for the TabularCreate Dialog.
|
||||
*/
|
||||
class ControlTabularCreate : public ControlDialog<ControlConnectBD> {
|
||||
class ControlTabularCreate : public ControlDialogBD {
|
||||
public:
|
||||
///
|
||||
ControlTabularCreate(LyXView &, Dialogs &);
|
||||
|
@ -33,7 +33,7 @@
|
||||
extern string user_lyxdir; // home of *Files.lst
|
||||
|
||||
ControlTexinfo::ControlTexinfo(LyXView & lv, Dialogs & d)
|
||||
: ControlDialog<ControlConnectBI>(lv, d)
|
||||
: ControlDialogBI(lv, d)
|
||||
{
|
||||
d_.showTexinfo.connect(SigC::slot(this, &ControlTexinfo::show));
|
||||
}
|
||||
|
@ -19,11 +19,11 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "ControlDialogs.h"
|
||||
#include "ControlDialog_impl.h"
|
||||
|
||||
/** A controller for Texinfo dialogs. */
|
||||
|
||||
class ControlTexinfo : public ControlDialog<ControlConnectBI> {
|
||||
class ControlTexinfo : public ControlDialogBI {
|
||||
public:
|
||||
/// the file extensions
|
||||
enum texFileSuffix {cls, sty, bst};
|
||||
|
@ -28,7 +28,7 @@ using Liason::setMinibuffer;
|
||||
using SigC::slot;
|
||||
|
||||
ControlThesaurus::ControlThesaurus(LyXView & lv, Dialogs & d)
|
||||
: ControlDialog<ControlConnectBD>(lv, d)
|
||||
: ControlDialogBD(lv, d)
|
||||
{
|
||||
d_.showThesaurus.connect(SigC::slot(this, &ControlThesaurus::showEntry));
|
||||
}
|
||||
|
@ -19,11 +19,11 @@
|
||||
|
||||
#include "LString.h"
|
||||
#include "Thesaurus.h"
|
||||
#include "ControlDialogs.h"
|
||||
#include "ControlDialog_impl.h"
|
||||
|
||||
/** A controller for Thesaurus dialogs.
|
||||
*/
|
||||
class ControlThesaurus : public ControlDialog<ControlConnectBD> {
|
||||
class ControlThesaurus : public ControlDialogBD {
|
||||
public:
|
||||
///
|
||||
ControlThesaurus(LyXView &, Dialogs &);
|
||||
|
@ -35,7 +35,7 @@ using SigC::slot;
|
||||
using std::endl;
|
||||
|
||||
ControlVCLog::ControlVCLog(LyXView & lv, Dialogs & d)
|
||||
: ControlDialog<ControlConnectBD>(lv, d)
|
||||
: ControlDialogBD(lv, d)
|
||||
{
|
||||
d_.showVCLogFile.connect(slot(this, &ControlVCLog::show));
|
||||
}
|
||||
|
@ -20,13 +20,13 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "ControlDialogs.h"
|
||||
#include "ControlDialog_impl.h"
|
||||
#include "Lsstream.h"
|
||||
|
||||
/**
|
||||
* A controller for the Version Control log viewer.
|
||||
*/
|
||||
class ControlVCLog : public ControlDialog<ControlConnectBD> {
|
||||
class ControlVCLog : public ControlDialogBD {
|
||||
public:
|
||||
///
|
||||
ControlVCLog(LyXView &, Dialogs &);
|
||||
|
@ -10,6 +10,38 @@
|
||||
#ifndef GUI_H
|
||||
#define GUI_H
|
||||
|
||||
#include "ButtonController.h"
|
||||
#include "ButtonController.tmpl"
|
||||
#include "ButtonPolicies.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 "ControlGraphics.h"
|
||||
#include "insets/insetgraphicsParams.h"
|
||||
#include "ControlInclude.h"
|
||||
#include "ControlIndex.h"
|
||||
#include "ControlLog.h"
|
||||
#include "ControlMinipage.h"
|
||||
#include "ControlPreamble.h"
|
||||
#include "ControlPrint.h"
|
||||
#include "ControlRef.h"
|
||||
#include "ControlSearch.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"
|
||||
|
||||
|
||||
/** This class instantiates and makes available the GUI-specific
|
||||
ButtonController and View.
|
||||
*/
|
||||
@ -30,15 +62,8 @@ private:
|
||||
GUIview view_;
|
||||
};
|
||||
|
||||
/// Forward declaration of ButtonPolicies
|
||||
class OkCancelPolicy;
|
||||
class OkCancelReadOnlyPolicy;
|
||||
class NoRepeatedApplyReadOnlyPolicy;
|
||||
|
||||
/** Specialization for About LyX dialog
|
||||
*/
|
||||
class ControlAboutlyx;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIAboutlyx :
|
||||
public GUI<ControlAboutlyx, GUIview, OkCancelPolicy, GUIbc> {
|
||||
@ -50,8 +75,6 @@ public:
|
||||
|
||||
/** Specialization for Bibitem dialog
|
||||
*/
|
||||
class ControlBibitem;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIBibitem :
|
||||
public GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
|
||||
@ -64,8 +87,6 @@ public:
|
||||
|
||||
/** Specialization for Bibtex dialog
|
||||
*/
|
||||
class ControlBibtex;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIBibtex :
|
||||
public GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
|
||||
@ -78,8 +99,6 @@ public:
|
||||
|
||||
/** Specialization for Character dialog
|
||||
*/
|
||||
class ControlCharacter;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUICharacter : public GUI<ControlCharacter, GUIview,
|
||||
OkApplyCancelReadOnlyPolicy, GUIbc>
|
||||
@ -94,8 +113,6 @@ public:
|
||||
|
||||
/** Specialization for Citation dialog
|
||||
*/
|
||||
class ControlCitation;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUICitation : public GUI<ControlCitation, GUIview,
|
||||
NoRepeatedApplyReadOnlyPolicy, GUIbc>
|
||||
@ -110,8 +127,6 @@ public:
|
||||
|
||||
/** Specialization for Error dialog
|
||||
*/
|
||||
class ControlError;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIError :
|
||||
public GUI<ControlError, GUIview, OkCancelPolicy, GUIbc> {
|
||||
@ -124,8 +139,6 @@ public:
|
||||
|
||||
/** Specialization for ERT dialog
|
||||
*/
|
||||
class ControlERT;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIERT :
|
||||
public GUI<ControlERT, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
|
||||
@ -138,8 +151,6 @@ public:
|
||||
|
||||
/** Specialization for External dialog
|
||||
*/
|
||||
class ControlExternal;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIExternal :
|
||||
public GUI<ControlExternal, GUIview, OkApplyCancelReadOnlyPolicy, GUIbc> {
|
||||
@ -152,8 +163,6 @@ public:
|
||||
|
||||
/** Specialization for Graphics dialog
|
||||
*/
|
||||
class ControlGraphics;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIGraphics :
|
||||
public GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
|
||||
@ -166,8 +175,6 @@ public:
|
||||
|
||||
/** Specialization for Include dialog
|
||||
*/
|
||||
class ControlInclude;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIInclude :
|
||||
public GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
|
||||
@ -180,8 +187,6 @@ public:
|
||||
|
||||
/** Specialization for Index dialog
|
||||
*/
|
||||
class ControlIndex;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIIndex :
|
||||
public GUI<ControlIndex, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
|
||||
@ -194,8 +199,6 @@ public:
|
||||
|
||||
/** Specialization for Log dialog
|
||||
*/
|
||||
class ControlLog;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUILog :
|
||||
public GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc> {
|
||||
@ -208,8 +211,6 @@ public:
|
||||
|
||||
/** Specialization for Minipage dialog
|
||||
*/
|
||||
class ControlMinipage;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIMinipage :
|
||||
public GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
|
||||
@ -222,8 +223,6 @@ public:
|
||||
|
||||
/** Specialization for Float dialog
|
||||
*/
|
||||
class ControlFloat;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIFloat :
|
||||
public GUI<ControlFloat, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
|
||||
@ -236,8 +235,6 @@ public:
|
||||
|
||||
/** Specialization for Preamble dialog
|
||||
*/
|
||||
class ControlPreamble;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIPreamble :
|
||||
public GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
|
||||
@ -250,8 +247,6 @@ public:
|
||||
|
||||
/** Specialization for Print dialog
|
||||
*/
|
||||
class ControlPrint;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIPrint :
|
||||
public GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc> {
|
||||
@ -264,8 +259,6 @@ public:
|
||||
|
||||
/** Specialization for Ref dialog
|
||||
*/
|
||||
class ControlRef;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIRef :
|
||||
public GUI<ControlRef, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
|
||||
@ -278,8 +271,6 @@ public:
|
||||
|
||||
/** Specialization for Search dialog
|
||||
*/
|
||||
class ControlSearch;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUISearch :
|
||||
public GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
|
||||
@ -291,8 +282,6 @@ public:
|
||||
|
||||
/** Specialization for ShowFile dialog
|
||||
*/
|
||||
class ControlShowFile;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIShowFile :
|
||||
public GUI<ControlShowFile, GUIview, OkCancelPolicy, GUIbc> {
|
||||
@ -304,8 +293,6 @@ public:
|
||||
|
||||
/** Specialization for Spellchecker dialog
|
||||
*/
|
||||
class ControlSpellchecker;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUISpellchecker :
|
||||
public GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
|
||||
@ -317,8 +304,6 @@ public:
|
||||
|
||||
/** Specialization for Toc dialog
|
||||
*/
|
||||
class ControlToc;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIToc :
|
||||
public GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc> {
|
||||
@ -331,8 +316,6 @@ public:
|
||||
|
||||
/** Specialization for TabularCreate dialog
|
||||
*/
|
||||
class ControlTabularCreate;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUITabularCreate :
|
||||
public GUI<ControlTabularCreate, GUIview,
|
||||
@ -347,8 +330,6 @@ public:
|
||||
|
||||
/** Specialization for Texinfo dialog
|
||||
*/
|
||||
class ControlTexinfo;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUITexinfo :
|
||||
public GUI<ControlTexinfo, GUIview, OkCancelPolicy, GUIbc> {
|
||||
@ -360,8 +341,6 @@ public:
|
||||
|
||||
/** Specialization for Thesaurus dialog
|
||||
*/
|
||||
class ControlThesaurus;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIThesaurus :
|
||||
public GUI<ControlThesaurus, GUIview,
|
||||
@ -376,8 +355,6 @@ public:
|
||||
|
||||
/** Specialization for Url dialog
|
||||
*/
|
||||
class ControlUrl;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIUrl :
|
||||
public GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
|
||||
@ -390,8 +367,6 @@ public:
|
||||
|
||||
/** Specialization for VCLog dialog
|
||||
*/
|
||||
class ControlVCLog;
|
||||
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIVCLog :
|
||||
public GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc> {
|
||||
|
@ -8,6 +8,9 @@ INCLUDES = -I${top_srcdir}/src/ \
|
||||
${SIGC_CFLAGS} $(BOOST_INCLUDES)
|
||||
LIBS =
|
||||
ETAGS_ARGS = --lang=c++
|
||||
|
||||
EXTRA_DIST = ButtonController.tmpl ControlDialog.tmpl ControlInset.tmpl
|
||||
|
||||
libcontrollers_la_SOURCES=\
|
||||
biblio.C \
|
||||
biblio.h \
|
||||
@ -34,7 +37,9 @@ libcontrollers_la_SOURCES=\
|
||||
ControlCommand.h \
|
||||
ControlConnections.C \
|
||||
ControlConnections.h \
|
||||
ControlDialogs.h \
|
||||
ControlDialog.h \
|
||||
ControlDialog_impl.C \
|
||||
ControlDialog_impl.h \
|
||||
ControlError.h \
|
||||
ControlError.C \
|
||||
ControlERT.h \
|
||||
|
@ -1,3 +1,11 @@
|
||||
2002-01-16 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* Dialogs.C: no longer need to #include the Controller classes, as this
|
||||
is how done in GUI.h.
|
||||
|
||||
* xformsBC.C: #include ButtonController.tmpl, containing the
|
||||
instatiation of the button controller.
|
||||
|
||||
2002-01-15 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* FormThesaurus.C: fix a crash
|
||||
|
@ -16,39 +16,9 @@
|
||||
#endif
|
||||
|
||||
#include "Dialogs.h"
|
||||
#include "BufferView.h"
|
||||
|
||||
#include "xformsBC.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 "ControlGraphics.h"
|
||||
#include "insets/insetgraphicsParams.h"
|
||||
#include "ControlInclude.h"
|
||||
#include "ControlIndex.h"
|
||||
#include "ControlLog.h"
|
||||
#include "ControlMinipage.h"
|
||||
#include "ControlPreamble.h"
|
||||
#include "ControlPrint.h"
|
||||
#include "ControlRef.h"
|
||||
#include "ControlSearch.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"
|
||||
|
||||
#include "GUI.h"
|
||||
#include "xformsBC.h"
|
||||
|
||||
#include "combox.h" // needed for clean destruction of boost::scoped_ptr
|
||||
#include "form_aboutlyx.h"
|
||||
|
@ -20,6 +20,7 @@
|
||||
#endif
|
||||
|
||||
#include "xformsBC.h"
|
||||
#include "ButtonController.tmpl"
|
||||
#include "xforms_helpers.h"
|
||||
|
||||
xformsBC::xformsBC(string const & cancel, string const & close)
|
||||
|
Loading…
Reference in New Issue
Block a user